release: stable professional quant UI v1.0 and backend stabilization
This commit is contained in:
@@ -138,4 +138,10 @@ Associate the `frontend` directory as the project root on Vercel for automatic C
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**📅 Last Updated**: 2026-03-06
|
---
|
||||||
|
|
||||||
|
**📅 Last Updated**: 2026-03-08
|
||||||
|
**🚀 Status**: v1.0 Stable - Professional Quant UI Locked
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> **Production Note**: The current dashboard utilizes the high-density "Professional Quant" UI (v1.0-legacy) which integrates real-time METAR/MGM data, DEB ensemble blending, and multi-model probability distribution in a single high-performance view.
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
POLYWEATHER_API_BASE_URL=http://127.0.0.1:8000
|
||||||
+30
-20
@@ -1,4 +1,4 @@
|
|||||||
"""
|
"""
|
||||||
PolyWeather Web Map API
|
PolyWeather Web Map API
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
FastAPI backend that reuses existing weather data collection and analysis modules.
|
FastAPI backend that reuses existing weather data collection and analysis modules.
|
||||||
@@ -13,9 +13,13 @@ from datetime import datetime, timezone, timedelta
|
|||||||
from typing import Dict, Any, Optional
|
from typing import Dict, Any, Optional
|
||||||
|
|
||||||
# Project root setup
|
# Project root setup
|
||||||
_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
_file_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
_root = os.path.dirname(_file_dir)
|
||||||
if _root not in sys.path:
|
if _root not in sys.path:
|
||||||
sys.path.insert(0, _root)
|
sys.path.insert(0, _root)
|
||||||
|
# Ensure current dir is also in path for local imports if any
|
||||||
|
if _file_dir not in sys.path:
|
||||||
|
sys.path.insert(0, _file_dir)
|
||||||
|
|
||||||
from fastapi import FastAPI, HTTPException
|
from fastapi import FastAPI, HTTPException
|
||||||
from fastapi.middleware.cors import CORSMiddleware
|
from fastapi.middleware.cors import CORSMiddleware
|
||||||
@@ -539,24 +543,30 @@ def _analyze(city: str, force_refresh: bool = False) -> Dict[str, Any]:
|
|||||||
@app.get("/api/cities")
|
@app.get("/api/cities")
|
||||||
async def list_cities():
|
async def list_cities():
|
||||||
"""Return all supported cities with coordinates and risk level."""
|
"""Return all supported cities with coordinates and risk level."""
|
||||||
out = []
|
try:
|
||||||
for name, info in CITIES.items():
|
out = []
|
||||||
risk = CITY_RISK_PROFILES.get(name, {})
|
for name, info in CITIES.items():
|
||||||
out.append(
|
risk = CITY_RISK_PROFILES.get(name, {})
|
||||||
{
|
out.append(
|
||||||
"name": name,
|
{
|
||||||
"display_name": name.title(),
|
"name": name,
|
||||||
"lat": info["lat"],
|
"display_name": name.title(),
|
||||||
"lon": info["lon"],
|
"lat": info["lat"],
|
||||||
"risk_level": risk.get("risk_level", "low"),
|
"lon": info["lon"],
|
||||||
"risk_emoji": risk.get("risk_emoji", "🟢"),
|
"risk_level": risk.get("risk_level", "low"),
|
||||||
"airport": risk.get("airport_name", ""),
|
"risk_emoji": risk.get("risk_emoji", "🟢"),
|
||||||
"icao": risk.get("icao", ""),
|
"airport": risk.get("airport_name", ""),
|
||||||
"temp_unit": "fahrenheit" if info["f"] else "celsius",
|
"icao": risk.get("icao", ""),
|
||||||
"is_major": CITY_REGISTRY.get(name, {}).get("is_major", True),
|
"temp_unit": "fahrenheit" if info["f"] else "celsius",
|
||||||
}
|
"is_major": CITY_REGISTRY.get(name, {}).get("is_major", True),
|
||||||
)
|
}
|
||||||
return {"cities": out}
|
)
|
||||||
|
return {"cities": out}
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"❌ Error in list_cities: {str(e)}")
|
||||||
|
import traceback
|
||||||
|
logger.error(traceback.format_exc())
|
||||||
|
raise HTTPException(status_code=500, detail=str(e))
|
||||||
|
|
||||||
|
|
||||||
@app.get("/api/city/{name}")
|
@app.get("/api/city/{name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user