feat(application): integrate measured-load ingestion training and planner source

This commit is contained in:
ENELIX Agent
2026-10-02 21:00:05 +00:00
parent 44362e4bf5
commit fc024fcfba
96 changed files with 8933 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
"""Run against the exact server working tree; no live data or credentials used."""
from pathlib import Path
import hashlib,json,os,sys,unittest
ROOT=Path(__file__).resolve().parent
DEPS=Path('/home/agent/services/qa/netplan-v4-candidate-20261001/python-dependencies')
if DEPS.exists():sys.path.insert(0,str(DEPS))
sys.path.insert(0,str(ROOT))
if __name__=='__main__':
import numpy,scipy,fastapi,httpx
versions={'python':sys.version.split()[0],**{m.__name__:m.__version__ for m in (numpy,scipy,fastapi,httpx)}}
print('Runtime',json.dumps(versions),flush=True)
reports=Path(os.getenv('NETPLAN_V4_TEST_REPORT_DIR',str(ROOT)))
reports.mkdir(parents=True,exist_ok=True)
suite=unittest.defaultTestLoader.discover(str(ROOT/'tests'))
with (reports/'TEST_RESULTS.txt').open('w') as output:
output.write('Actual server/target tests; synthetic data only.\n'+json.dumps(versions)+'\n\n')
result=unittest.TextTestRunner(stream=output,verbosity=2).run(suite)
print((reports/'TEST_RESULTS.txt').read_text())
hashes={str(p.relative_to(ROOT)):hashlib.sha256(p.read_bytes()).hexdigest() for p in sorted(ROOT.rglob('*.py')) if '__pycache__' not in p.parts}
(reports/'TESTED_SOURCE_HASHES.json').write_text(json.dumps(hashes,indent=2)+'\n')
raise SystemExit(0 if result.wasSuccessful() else 1)