Skip to content

Changelog

All notable changes to this project are documented here. The format follows Keep a Changelog and the project uses Semantic Versioning.

[Unreleased]

[0.11.0] - 2026-11-30

Added

  • Two cutoffs at an alert budget in limen_core.verification, moved from Limen's backtest with the same answers (numbers already published depend on them):
  • cutoff_for_share(values, share) -> tuple[float, float] (Limen's _soglia_a_carico): the k-th highest value, k = max(1, round(share * n)), and the share that really fires; a tie may exceed the share, zero never fires, no values give (inf, 0.0);
  • cutoff_at_most(rows, share) -> float (Limen's _soglia_quota): the cutoff that fires at most the share of all the values of rows (one piece per hour, read as one with heapq.nlargest); on a tie at the k-th value it rises to the next distinct value (Limen #483); a share that rounds to nothing, or a cutoff of zero, gives inf. Neither is rainfall_thresholds.measure.cutoff_at_budget, which keeps the k-th value (as cutoff_for_share does) but drops None/NaN, checks the budget and returns no share.

[0.10.0] - 2026-11-29

Added

  • Three readings in limen_core.evidence, each in READINGS and callable one by one (an Evidence, its failure raised, through the new read_one(name, ask)):
  • ground_motion_before(lon, lat, day, *, window_days=180, min_points=5, min_acquisitions=10, min_history_days=365, z=2.0, component="U", release=None, include_day=False, directory=None) (egms-client asof): what the EGMS L3 series of the 1 km cell around a point said before a day (velocity_before, velocity_long, change, change_z, share_changed, the counts, reasons), nothing on or after the day read. Offline, from the tile's CSV with its series on disk (egms init ... --keep tiff --keep csv); without it, SourceNotConfiguredError says how to fetch it. The minimums are limen-core's conservative defaults (MOTION_*), not calibrated, and every answer carries MOTION_NOTE: a measure, not a verdict;
  • flood_activation_summary(code, *, hazard="flood") (copernicus-ems activation_summary): one activation per product and per AOI;
  • flood_water_over_place(code, place) and flood_water_around(code, lon, lat, radius_km) (copernicus-ems water_over_a_place): the water one activation observed over a GeoJSON place, or over the circle(lon, lat, radius_km) around a point (at most MAX_RADIUS_KM, 50).
  • A client factory egms_tables: the folder of the EGMS tables (egms-client's default_directory).

Changed

  • The evidence extra installs egms-client[raster,tables]~=0.12.0 (pandas and pyarrow, for the series).
  • DEFAULT_PLAN is unchanged: the new readings need a day inside the EGMS release and a heavy table, or an activation code.

[0.9.0] - 2026-11-29

Added

  • limen_core.iffi, moved from Limen (limen.core.affidabilita_iffi): how far to trust the IFFI inventory in a municipality or a region, read from the table of ispra_idrogeo.reliability. iffi_reliability(level, code) gives an IffiReliability or None; NOT_MEASURED_IT and the Level type come with it. The field names of the model stay in Italian (livello, codice, frane, lettura, lettura_en, fonte, ...): they are the JSON contract of Limen's API, its frontend, its prompts and its grounding rules.
  • limen_core.idrogeo_grounding, moved from Limen (limen.core.grounding_idrogeo): source_of(response), unsupported_numbers(text, facts, question=""), misattributed_numbers(text, facts) and LIMEN_RULES, which go before the library's RULES; Misquote is re-exported.
  • limen_core.rain_grounding.check_rain_text(text, facts, question=): the check of rainfall_thresholds.check, so that an agent reaches the grounding of rain and of IdroGEO through limen-core alone.
  • New extra idrogeo (ispra-idrogeo~=0.17.0), needed by iffi and idrogeo_grounding; evidence includes it.

[0.8.0] - 2026-11-29

Added

  • Three readings in limen_core.evidence:
  • river_discharge (glofas-ewds): the GloFAS place stored nearest a cell, within within_km (10), with its river and trust, the last day of discharge and the forecast peak (Facts.summary, without the day-by-day table). Read from the store on disk, no network;
  • flood_activations (copernicus-ems): the Copernicus EMS Rapid Mapping activations of a country (Italy) in the Flood and Storm categories over the last days (30), at most limit (5). The list has no geometry: it is by country, not by box;
  • ground_motion (egms-client): the EGMS Ortho L3 velocity of the 100 m cell at a point, component U (vertical) or E, with its reliability. Needs a CLMS service key (EGMS_SERVICE_KEY or EGMS_SERVICE_KEY_FILE).
  • SourceNotConfiguredError: what a reading raises when the machine lacks what the source needs (a key that is not set, a GloFAS store with no places). Such a reading is left out, as a source that is down.
  • The evidence extra installs glofas-ewds~=0.5.0, copernicus-ems[geo]~=0.13.0 and egms-client[raster]~=0.12.0.

Changed

  • DEFAULT_PLAN: a flood also reads river_discharge (3 cells) and flood_activations (the area); a landslide also reads ground_motion (1 cell, vertical).

[0.7.0] - 2026-11-29

Added

  • limen_core.evidence, which reads what the libraries say about the cells ranked first, through their Python functions (the libraries no longer have MCP servers):
  • plan(hazard, cells, at=, bbox=) gives the readings of a hazard, following DEFAULT_PLAN;
  • gather(asks, timeout_s=, budget_s=) runs them concurrently. A source that fails or is slow is logged and left out;
  • render(evidence) turns the result into a block for a model, labelled as data and not as instructions.

The readings: radar_rain, radar_storms (dpc-radar), landslides_near (ispra-idrogeo), earthquakes (ingv-shakemap), fire_danger (effis-client) and fires_in_area (firms-client). New extra: evidence.

Changed

  • rainfall-thresholds ~=0.6.0 and fwi-chain ~=2.0: the releases without MCP servers, with the same functions used here.
  • The measure group uses egms-client 0.12.0 and ispra-idrogeo 0.17.0 from PyPI, no longer a branch.

[0.6.0] - 2026-11-28

Added

  • verification: the measures Limen kept a copy of in each backtest and measure, once, in plain Python (no numpy, no scikit-learn).
  • Separation: auc (Mann-Whitney, ties half; None, NaN and infinite scores left out), auc_of (scores and labels), paired_auc (each case against its own controls), stratified_auc (weighted by the pairs of each stratum).
  • Contingency at a threshold, with hit_rate, false_alarm_ratio, specificity, tss and csi; threshold_for_recall; quantile (linear, numpy's default).
  • Calibration: brier, reliability_bins.
  • Lead time: mean_lead_hours; event_outcome and lead_above_background, the rules of Limen's daily check of the events (ahead, same time, missed, not verifiable, judged against the background class of the place), on a typed EventRecord with reason codes in place of Limen's Italian sentences.
  • Checked against a frozen copy of Limen's functions on 300 seeded inputs each, and 2,000 for the event outcome. One deliberate difference: a rate with an empty denominator is None, where Limen wrote 0.0.

[0.5.0] - 2026-11-28

Added

  • wildfire.latest_fire: when each cell of a grid last burnt and how hard, {cell: (months_since_fire, severity)}, from the perimeters that touch it and the confirmed days of FIRMS detections. The rule of Limen's fire_check (the decision after its query; the spatial join stays in SQL): the newest source wins, a day counts only with min_hotspots detections over the region, the severity only when a perimeter is the newest fire, a cell older than window_months_max is left out. Checked against a frozen copy of Limen's query and loop on 300 random grids. One deliberate difference: of two perimeters of the same newest day the denser is read, where Limen's SQL took either.
  • wildfire.DAYS_PER_MONTH (30).

[0.4.1] - 2026-11-28

The first release on PyPI: pip install limen-core. The code is that of 0.4.0.

Added

  • A documentation site (Zensical, make docs): the README as the guide, one reference page per join and per engine from the docstrings, the changelog; llms.txt, llms-full.txt and the agent skill (skills/limen-core) built with it. Published to GitHub Pages from main by .github/workflows/docs.yml.
  • publiccode.yml for the catalogue of Developers Italia, checked in CI; SECURITY.md; CONTRIBUTING.md; the release.yml workflow (trusted publishing to PyPI).

[0.4.0] - 2026-11-28

Added

  • limen_core.landslide: rain_before, assess, lowered and last_hour. The landslide join for one place and one instant: the hours of rain of any RainSource that ended by the instant, the event against the threshold of the place lowered after an earthquake and scaled for radar rain. An hour that ends after the instant is never read.
  • limen_core.wildfire: seen_inside, seen_inside_all, contains, detection_of, perimeter_of, with Detection, Perimeter and FireSeen. The wildfire join: the fires FIRMS saw inside an EFFIS perimeter around its day, their total power and the power per hectare, which post_fire turns into a severity. Limen's rule (its fire_events_repo SQL): vegetation fires with a power, within window_days of the fire's date, inside or on the edge. Not measured stays None; two EFFIS layers are never mixed; no geometry library (checked against shapely in the tests, which is a test dependency).
  • limen_core.flood: fluvial_evidence, hold_back and observed, with FluvialEvidence. The flood join: a forecast river peak with its credibility and the trust of its river (glofas-ewds), the reasons not to let the fluvial branch speak alone (too few members, a first run, a river too small to see a flash flood: every limit the caller's), and what the satellite says of a place afterwards (copernicus-ems): flooded, dry, or not_observed when too little of it was looked at.

[0.3.0] - 2026-11-28

Added

  • limen_core.cases: cell_at, around, matched_controls and compare_scores, with CellBox and Separation. The rows of a measure: cells with a landslide against cells without one, read as of the same days.
  • tools/measure_motion_asof.py and the dependency group measure: does the ground motion of EGMS read before a dated landslide tell its cell from the others? It needs the full L3 series of the tiles, and egms-client from its branch feat/motion-as-of until that is released.

Changed

  • Five moved modules call their twin instead of carrying their own copy, with the same names, signatures and messages: scoring.api calls rainfall_thresholds (api_kohler_linsley, api_factor), scoring.seismic_decay calls limen_core.seismic, scoring.post_fire calls limen_core.post_fire, scoring.wildfire.confronto calls limen_core.agreement, and scoring.wildfire.climatology calls fwi_chain.climatology. Limen's tests of those modules pass unchanged.
  • It now depends on fwi-chain 1.3 too.

[0.2.0] - 2026-11-28

Added

  • The scoring engines of Limen, moved as they are from Limen at 9fbdd2d with the tests they had (187 tests): limen_core.models, limen_core.scoring (the landslide, flood and wildfire engines, their factors, the calibration schema) and limen_core.cascades. Same code, same numbers.
  • limen_core.calibration: use(folder), directory(), hazard_file(name), clear(), and the environment variable LIMEN_CALIBRATION_DIR. The package ships no calibration: the application names the folder of its YAML files.
  • Tests that the moved scoring.seismic_decay and scoring.wildfire.confronto give the same numbers as seismic and agreement.

Changed

  • It now depends on pydantic, PyYAML and rainfall-thresholds 0.5.
  • DEFAULT_THRESHOLDS_PATH (in scoring and scoring.regional_thresholds) is resolved when it is read, not when the module is imported: the folder is known only after the application has named it.

Not moved

  • scoring.registry, scoring.resolver and scoring.ml_engine: they read Limen's settings, its model registry and its training code. They stay in Limen.

[0.1.0] - 2026-11-28

Added

  • limen_core.seismic: decayed_pga, seismic_factor, seismic and rain_threshold_reduction, with Shaking, SeismicParams and ThresholdMemory. From Limen's core/scoring/seismic_decay.py.
  • limen_core.post_fire: frp_density, frp_severity, severity_multiplier and post_fire_factor, with PostFireParams. From Limen's core/scoring/post_fire.py; frp_density is the division Limen did in SQL.
  • limen_core.agreement: pair, compare, pearson and bands, with Agreement. From Limen's core/scoring/wildfire/confronto.py; the classes are the caller's (classify), no longer Limen's cutoffs.
  • Parity tests against Limen's code at 952edd2, frozen in tests/limen_reference.py: equal on hundreds of seeded inputs.