Support tab (agents:support on a range with a question, instructions/support.md, its answer in labeling/auto/support/); the weather read from data/<STATION>/weather/ (pumped), no call to MeteoSwiss from the app; plots in mm (corr_x_mm, corr_y_mm); analyst instructions: the weather pumped, the targets in mm and their distance
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
60d10a282c
commit
161fb0212f
12 files changed
+414
-104
No files matched your search
+34
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
The FastAPI server serves the built React page (app/web/dist, `npm run build` in app/web) and the API under /api.
|
||||
The Data page reads data/ and the labels of labeling/ (station.py); its Analysis tab launches the analyst, and the
|
||||
optimization of the detectors (analysis.py).
|
||||
optimization of the detectors (analysis.py); its Support tab, the support (support.py).
|
||||
Settings: AIMSIGHT_DATA (data), AIMSIGHT_LABELS (labels), AIMSIGHT_PORT (port, 8770).
|
||||
"""
|
||||
import json
|
||||
@@ -20,6 +20,7 @@ from fastapi.responses import FileResponse, HTMLResponse, JSONResponse
|
||||
|
||||
import analysis
|
||||
import station
|
||||
import support
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
APP = Path(__file__).resolve().parents[1]
|
||||
@@ -167,6 +168,38 @@ def analysis_file(name: str, path: str):
|
||||
return FileResponse(analysis.file(name, path))
|
||||
|
||||
|
||||
# --- the Support tab of the Data page (support.py): the support launched by claude -p on a range, with a question
|
||||
|
||||
@app.post("/api/support")
|
||||
def launch_support(body: dict):
|
||||
return support.launch(body)
|
||||
|
||||
|
||||
@app.get("/api/support")
|
||||
def supports():
|
||||
return support.list_supports()
|
||||
|
||||
|
||||
@app.get("/api/support/{name}")
|
||||
def support_state(name: str):
|
||||
return support.state(name)
|
||||
|
||||
|
||||
@app.post("/api/support/{name}/message")
|
||||
def support_message(name: str, body: dict):
|
||||
return support.message(name, body)
|
||||
|
||||
|
||||
@app.get("/api/support/{name}/report.html")
|
||||
def support_answer(name: str, dark: bool = False):
|
||||
return HTMLResponse(support.answer(name, dark))
|
||||
|
||||
|
||||
@app.get("/api/support/{name}/{path:path}")
|
||||
def support_file(name: str, path: str):
|
||||
return FileResponse(analysis.file(name, path, support.FOLDER))
|
||||
|
||||
|
||||
if PAGE.is_dir():
|
||||
app.mount("/", StaticFiles(directory=PAGE, html=True), name="page")
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user