WilliamK112 commited on
Commit ·
4b22898
1
Parent(s): cd2eec7
feat: add environment compatibility checker for robust local setup
Browse files- README.md +10 -1
- docs/ENV_COMPAT.md +13 -0
- logs/progress.md +4 -0
- src/env_compat_check.py +50 -0
README.md
CHANGED
|
@@ -140,7 +140,7 @@ Outputs:
|
|
| 140 |
|
| 141 |
<!-- LATEST_PROGRESS_START -->
|
| 142 |
## Latest Progress
|
| 143 |
-
- 2026-03-22 15:
|
| 144 |
- Full log: `logs/progress.md`
|
| 145 |
<!-- LATEST_PROGRESS_END -->
|
| 146 |
|
|
@@ -462,3 +462,12 @@ python src/space_smoke_test.py
|
|
| 462 |
```
|
| 463 |
Output:
|
| 464 |
- `docs/SPACE_SMOKE_TEST.md`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
<!-- LATEST_PROGRESS_START -->
|
| 142 |
## Latest Progress
|
| 143 |
+
- 2026-03-22 15:22:20 UTC — Added environment compatibility guardrail
|
| 144 |
- Full log: `logs/progress.md`
|
| 145 |
<!-- LATEST_PROGRESS_END -->
|
| 146 |
|
|
|
|
| 462 |
```
|
| 463 |
Output:
|
| 464 |
- `docs/SPACE_SMOKE_TEST.md`
|
| 465 |
+
|
| 466 |
+
|
| 467 |
+
## Environment Compatibility Check
|
| 468 |
+
Validate runtime compatibility before full dependency install:
|
| 469 |
+
```bash
|
| 470 |
+
python src/env_compat_check.py
|
| 471 |
+
```
|
| 472 |
+
Output:
|
| 473 |
+
- `docs/ENV_COMPAT.md`
|
docs/ENV_COMPAT.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Environment Compatibility Check
|
| 2 |
+
|
| 3 |
+
Generated: 2026-03-22 15:22 UTC
|
| 4 |
+
- Python: `3.14.3`
|
| 5 |
+
- Platform: `macOS-26.1-arm64-arm-64bit-Mach-O`
|
| 6 |
+
|
| 7 |
+
## Issues
|
| 8 |
+
- Python 3.14 may fail building scipy from source on some macOS setups (Fortran toolchain missing).
|
| 9 |
+
|
| 10 |
+
## Recommendations
|
| 11 |
+
- Use Python 3.11/3.12 for smoother scientific package installation.
|
| 12 |
+
- Prefer virtualenv: `python3 -m venv .venv && source .venv/bin/activate`
|
| 13 |
+
- Install base test deps for lightweight checks: `pip install numpy joblib`
|
logs/progress.md
CHANGED
|
@@ -167,3 +167,7 @@ Implemented `src/space_smoke_test.py` to verify both Hugging Face page URL and h
|
|
| 167 |
## 2026-03-22 15:21:52 UTC — Improved QA: added inference fallback unit tests + CI test stage
|
| 168 |
|
| 169 |
Added `tests/test_infer_fallback_unittest.py` and extended CI workflow to run unit tests for streaming + inference fallback reliability.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
## 2026-03-22 15:21:52 UTC — Improved QA: added inference fallback unit tests + CI test stage
|
| 168 |
|
| 169 |
Added `tests/test_infer_fallback_unittest.py` and extended CI workflow to run unit tests for streaming + inference fallback reliability.
|
| 170 |
+
|
| 171 |
+
## 2026-03-22 15:22:20 UTC — Added environment compatibility guardrail
|
| 172 |
+
|
| 173 |
+
Implemented `src/env_compat_check.py` to detect Python/scipy compatibility risks (e.g., py3.14 + Fortran build issues) and provide setup recommendations in `docs/ENV_COMPAT.md`.
|
src/env_compat_check.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Environment compatibility check for reliable local setup.
|
| 3 |
+
Focus: Python version and scientific stack installability constraints.
|
| 4 |
+
"""
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
import platform
|
| 7 |
+
from datetime import datetime, timezone
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def main():
|
| 11 |
+
py = platform.python_version()
|
| 12 |
+
major_minor = tuple(map(int, py.split('.')[:2]))
|
| 13 |
+
|
| 14 |
+
issues = []
|
| 15 |
+
recs = []
|
| 16 |
+
|
| 17 |
+
if major_minor >= (3, 14):
|
| 18 |
+
issues.append('Python 3.14 may fail building scipy from source on some macOS setups (Fortran toolchain missing).')
|
| 19 |
+
recs.append('Use Python 3.11/3.12 for smoother scientific package installation.')
|
| 20 |
+
else:
|
| 21 |
+
recs.append('Python version is compatible with common scipy wheels.')
|
| 22 |
+
|
| 23 |
+
recs.append('Prefer virtualenv: `python3 -m venv .venv && source .venv/bin/activate`')
|
| 24 |
+
recs.append('Install base test deps for lightweight checks: `pip install numpy joblib`')
|
| 25 |
+
|
| 26 |
+
ts = datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M UTC')
|
| 27 |
+
lines = [
|
| 28 |
+
'# Environment Compatibility Check',
|
| 29 |
+
'',
|
| 30 |
+
f'Generated: {ts}',
|
| 31 |
+
f'- Python: `{py}`',
|
| 32 |
+
f'- Platform: `{platform.platform()}`',
|
| 33 |
+
'',
|
| 34 |
+
'## Issues',
|
| 35 |
+
]
|
| 36 |
+
if issues:
|
| 37 |
+
lines += [f'- {x}' for x in issues]
|
| 38 |
+
else:
|
| 39 |
+
lines += ['- None detected.']
|
| 40 |
+
|
| 41 |
+
lines += ['', '## Recommendations']
|
| 42 |
+
lines += [f'- {x}' for x in recs]
|
| 43 |
+
|
| 44 |
+
out = Path('docs/ENV_COMPAT.md')
|
| 45 |
+
out.write_text('\n'.join(lines) + '\n', encoding='utf-8')
|
| 46 |
+
print(f'Generated {out}')
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
if __name__ == '__main__':
|
| 50 |
+
main()
|