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 ofrows(one piece per hour, read as one withheapq.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, givesinf. Neither israinfall_thresholds.measure.cutoff_at_budget, which keeps the k-th value (ascutoff_for_sharedoes) but dropsNone/NaN, checks the budget and returns no share.
[0.10.0] - 2026-11-29¶
Added¶
- Three readings in
limen_core.evidence, each inREADINGSand callable one by one (anEvidence, its failure raised, through the newread_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-clientasof): 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,SourceNotConfiguredErrorsays how to fetch it. The minimums are limen-core's conservative defaults (MOTION_*), not calibrated, and every answer carriesMOTION_NOTE: a measure, not a verdict;flood_activation_summary(code, *, hazard="flood")(copernicus-emsactivation_summary): one activation per product and per AOI;flood_water_over_place(code, place)andflood_water_around(code, lon, lat, radius_km)(copernicus-emswater_over_a_place): the water one activation observed over a GeoJSON place, or over thecircle(lon, lat, radius_km)around a point (at mostMAX_RADIUS_KM, 50).- A client factory
egms_tables: the folder of the EGMS tables (egms-client'sdefault_directory).
Changed¶
- The
evidenceextra installsegms-client[raster,tables]~=0.12.0(pandas and pyarrow, for the series). DEFAULT_PLANis 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 ofispra_idrogeo.reliability.iffi_reliability(level, code)gives anIffiReliabilityorNone;NOT_MEASURED_ITand theLeveltype 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)andLIMEN_RULES, which go before the library'sRULES;Misquoteis re-exported.limen_core.rain_grounding.check_rain_text(text, facts, question=): the check ofrainfall_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 byiffiandidrogeo_grounding;evidenceincludes 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, withinwithin_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 theFloodandStormcategories over the lastdays(30), at mostlimit(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,componentU(vertical) orE, with its reliability. Needs a CLMS service key (EGMS_SERVICE_KEYorEGMS_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
evidenceextra installsglofas-ewds~=0.5.0,copernicus-ems[geo]~=0.13.0andegms-client[raster]~=0.12.0.
Changed¶
DEFAULT_PLAN: a flood also readsriver_discharge(3 cells) andflood_activations(the area); a landslide also readsground_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, followingDEFAULT_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.0and fwi-chain~=2.0: the releases without MCP servers, with the same functions used here. - The
measuregroup 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). Contingencyat a threshold, withhit_rate,false_alarm_ratio,specificity,tssandcsi;threshold_for_recall;quantile(linear, numpy's default).- Calibration:
brier,reliability_bins. - Lead time:
mean_lead_hours;event_outcomeandlead_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 typedEventRecordwith 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'sfire_check(the decision after its query; the spatial join stays in SQL): the newest source wins, a day counts only withmin_hotspotsdetections over the region, the severity only when a perimeter is the newest fire, a cell older thanwindow_months_maxis 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.txtand the agent skill (skills/limen-core) built with it. Published to GitHub Pages from main by.github/workflows/docs.yml. publiccode.ymlfor the catalogue of Developers Italia, checked in CI;SECURITY.md;CONTRIBUTING.md; therelease.ymlworkflow (trusted publishing to PyPI).
[0.4.0] - 2026-11-28¶
Added¶
limen_core.landslide:rain_before,assess,loweredandlast_hour. The landslide join for one place and one instant: the hours of rain of anyRainSourcethat 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, withDetection,PerimeterandFireSeen. The wildfire join: the fires FIRMS saw inside an EFFIS perimeter around its day, their total power and the power per hectare, whichpost_fireturns into a severity. Limen's rule (itsfire_events_repoSQL): vegetation fires with a power, withinwindow_daysof the fire's date, inside or on the edge. Not measured staysNone; 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_backandobserved, withFluvialEvidence. 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, ornot_observedwhen too little of it was looked at.
[0.3.0] - 2026-11-28¶
Added¶
limen_core.cases:cell_at,around,matched_controlsandcompare_scores, withCellBoxandSeparation. The rows of a measure: cells with a landslide against cells without one, read as of the same days.tools/measure_motion_asof.pyand the dependency groupmeasure: 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 branchfeat/motion-as-ofuntil that is released.
Changed¶
- Five moved modules call their twin instead of carrying their own copy, with
the same names, signatures and messages:
scoring.apicallsrainfall_thresholds(api_kohler_linsley,api_factor),scoring.seismic_decaycallslimen_core.seismic,scoring.post_firecallslimen_core.post_fire,scoring.wildfire.confrontocallslimen_core.agreement, andscoring.wildfire.climatologycallsfwi_chain.climatology. Limen's tests of those modules pass unchanged. - It now depends on
fwi-chain1.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) andlimen_core.cascades. Same code, same numbers. limen_core.calibration:use(folder),directory(),hazard_file(name),clear(), and the environment variableLIMEN_CALIBRATION_DIR. The package ships no calibration: the application names the folder of its YAML files.- Tests that the moved
scoring.seismic_decayandscoring.wildfire.confrontogive the same numbers asseismicandagreement.
Changed¶
- It now depends on pydantic, PyYAML and
rainfall-thresholds0.5. DEFAULT_THRESHOLDS_PATH(inscoringandscoring.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.resolverandscoring.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,seismicandrain_threshold_reduction, withShaking,SeismicParamsandThresholdMemory. From Limen'score/scoring/seismic_decay.py.limen_core.post_fire:frp_density,frp_severity,severity_multiplierandpost_fire_factor, withPostFireParams. From Limen'score/scoring/post_fire.py;frp_densityis the division Limen did in SQL.limen_core.agreement:pair,compare,pearsonandbands, withAgreement. From Limen'score/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.