()
| 110 | |
| 111 | |
| 112 | def main() -> int: |
| 113 | print("PaperFlow doctor") |
| 114 | print(f"Project root: {PROJECT_ROOT}\n") |
| 115 | |
| 116 | hard_ok = True |
| 117 | hard_ok = check_python() and hard_ok |
| 118 | hard_ok = check_imports() and hard_ok |
| 119 | check_env_file() |
| 120 | check_paths() |
| 121 | feishu_ok = check_env_group("Feishu / Lark", REQUIRED_FEISHU_ENV) |
| 122 | model_ok = check_env_group("Model API", REQUIRED_MODEL_ENV) |
| 123 | check_optional_tools() |
| 124 | |
| 125 | print("\nSummary") |
| 126 | if hard_ok and feishu_ok and model_ok: |
| 127 | status(True, "PaperFlow is ready to run") |
| 128 | return 0 |
| 129 | |
| 130 | status(False, "PaperFlow is not fully configured") |
| 131 | print("Fill .env and rerun: python scripts/doctor.py") |
| 132 | return 1 |
| 133 | |
| 134 | |
| 135 | if __name__ == "__main__": |
no test coverage detected