- Add Astro site in
site/— single page EN (/) and IT (/it), design system fromDESIGN.md - Add GitHub Actions workflow
deploy-site.yml(trigger onsite/**, useswithastro/action@v3) - Local build verified: 2 pages generated
- Add
tests/test_get_concepts.py— 10 unit tests forhandle_get_conceptstool (subprocess mocking pattern)- Covers: IT/EN description, not-found, subprocess error, non-zero exit, invalid lang, missing concept_id, default lang, fallback to English, invalid JSON output
- Refactor
get_conceptsinto two layers:- CLI
src/istat_mcp_server/cli/get_concepts_cli.py: standalone commandistat-get-concepts-cli <concept_id>, JSON output, persistent cache (TTL 1 month) - MCP tool
src/istat_mcp_server/tools/get_concepts.py: wraps CLI viaasyncio.create_subprocess_exec, readsname_it/name_enfrom JSON output
- CLI
- Remove old
cli/get_concepts.py(printed all schemes, no concept_id filter) - Register
istat-get-concepts-clias console script inpyproject.toml - Cache key
api:conceptschemes:allshared between CLI and MCP tool
- Refactor
get_datafor token optimization:- No longer calls
handle_get_constraintsinternally — usesget_cached_constraints()directly (no codelist descriptions loaded) - New
_extract_dimension_order(ConstraintInfo)reads Pydantic model directly without JSON roundtrip _fetch_parse_filter()caches processed TSV (fetch XML → parse → filter) as a unit — cache hits return ready-to-use TSV- Cache TTL for observed data updated: 1 hour → 24 hours (86400 seconds)
- No longer calls
- Add
cod_istat,den_rip,cod_ripcolumns toterritorial_subdivisionsDuckDB table cod_istat: numeric ISTAT code for join with TopoJSON (COD_REG, COD_PROV, PRO_COM_T)den_rip/cod_rip: ripartizione geografica (Nord-ovest, Nord-est, Centro, Sud, Isole)- Mapping derivato da
resources/geo/unit_territoriali.csv(NUTS3 2024); match province per nome normalizzato - 20/20 regioni e 110/110 province matchano con i TopoJSON
- Add
scripts/build_admin_boundaries.shto download ISTAT 2026 admin boundaries (comuni, province, regioni) and produce TopoJSON inresources/geo/ - Input CRS EPSG:32632; output GeoJSON 4326 singlepart + TopoJSON fedele (no simplification)
- Add
get_territorial_codestool (8th tool) with DuckDB backend - Store territorial data in
resources/istat_lookup.duckdb(reusable for future lookup tables) - Include
resources/build_territorial_subdivisions.pyscript to rebuild the DB from ISTAT sources - Add
duckdbdependency topyproject.toml - 12 unit tests for territorial codes (level, name, region, province, capoluogo filters)
- Update skill docs with territorial codes workflow note