Changelog

0.12.5 (unreleased)

  • Add src/laser/cholera/calc_log_likelihood_distributions.py: Python translation of calc_log_likelihood_distributions.R (Beta, Binomial, Gamma, NegBin, Normal, Poisson)

  • Rename src/laser/cholera/spring_likelihood.py → calc_model_likelihood.py

  • Add tests/test_calc_log_likelihood_negbin.py: Python translation of test_calc_log_likelihood_negbin.R; update import to calc_log_likelihood_distributions

  • Add tests/test_calc_model_likelihood.py: Python translation of test_calc_model_likelihood.R

  • Add tests/test_calc_model_likelihood_extreme.py: Python translation of test_calc_model_likelihood_extreme.R

  • Add tests/test_calc_model_likelihood_reference.py: Python translation of test_calc_model_likelihood_reference.R

  • Add tests/test_compute_wis_parametric_row.py: Python translation of test_compute_wis_parametric_row.R

  • Add tests/test_ll_cumulative_progressive_nb.py: Python translation of test_ll_cumulative_progressive_nb.R

  • Add tests/test_nb_size_from_obs_weighted.py: Python translation of test_nb_size_from_obs_weighted.R

  • Update src/laser/cholera/calc_model_likelihood.py: replace the config dict argument on calc_model_likelihood with explicit epidemic_peaks (DataFrame with iso_code, peak_date, loc_idx columns), date_start, and date_stop kwargs.

  • Update src/laser/cholera/metapop/params.py: ingestion of epidemic_peaks now asserts each iso_code is in location_name and appends a loc_idx column mapping each row to its simulation location index.

  • Remove HDF5 config-parameter loading from src/laser/cholera/metapop/params.py (load_hdf5_parameters, load_compressed_hdf5_parameters, load_hdf5 and the .h5/.hdf/.hdf5 entries in get_parameters dispatch). HDF5 output via recorder.py is unaffected, as is the hdf5_output flag in utils.py. Add a parametrized regression test in tests/test_params.py confirming HDF5 suffixes are now rejected by get_parameters.

  • Add tests/test_recorder.py: 20-test coverage of Recorder — init/model identity, check() warn-on-missing for people/patches, per-tick gating in __call__ (final-tick timing, hdf5_output + return quadrants), outdir routing, compress.h5.gz, low-level save_hdf5_parameters / save_compressed_hdf5_parameters (groups, datasets, underscore + method filtering, AttributeError on missing frames), and an end-to-end happy-path round-trip.

  • Docs: clean up the calc_model_likelihood module docstring (drop “Spring” prefix and translation-progress narrative), reorder its Args: block to match the call signature, fix grammar (“a”→”an”), document the all-zero weights_location / weights_time ValueError, add a runnable Example doctest for the core-NB call, and clarify in calc_multi_peak_timing_ll / calc_multi_peak_magnitude_ll that loc_idx is not required (with Raises: KeyError from pandas indexing). Replace the docs/usage.rst placeholder with a likelihood-focused usage guide (doctest-verified) covering the minimal call, the shape-term weights, and the analyzer-integration recipe.

  • Port the R upstream commit’s in-window peak filter to calc_model_likelihood, calc_multi_peak_timing_ll, and calc_multi_peak_magnitude_ll: peak rows whose peak_date falls outside [date_start, date_stop] are now dropped before index assignment instead of being clamped by np.argmin to t=0 or t=n-1. Add test_out_of_window_peaks_are_filtered and test_mixed_window_peaks_only_in_window_counted in tests/test_calc_model_likelihood.py to pin the new behavior.

  • Update tests/test_params.py: add tests covering epidemic_peaks ingestion (list-of-dicts and dict-of-lists → DataFrame, optional/absent case, loc_idx mapping correctness, unknown-ISO AssertionError) and validate_parameters enforcement of iso_code and peak_date columns.

0.10.1 (2026-01-16)

  • Add tests for new IFR implementation

0.10.0 (2026-01-15)

  • New IFR model (Infection Fatality Ratio)

  • Update observation process with rho and chi based on infectious prevalence and diagnostic rates

  • Update default_parameters.json and LICENSE copyright dates

  • Test fixes for NumPy scalar serialization

  • Remove MacOS x86_64 from test matrix

  • Linter issues and GitHub runner fixes

0.9.1 (2025-10-02)

  • Fix typo infective -> ineffective

  • Add checks against populations going negative

  • Expose new_symptomatic

  • Only print if verbose is True in parameters

  • Skip likelihood check unless “calc_likelihood” is in parameters

  • Address linter issues

  • Bugfix for parameter constraints (alphas)

0.9.0 (2025-08-19)

  • Support single location configuration

0.8.0 (2025-07-24)

  • Spatial hazard computation fix (don’t transpose pi_ij in model.results)

0.7.11 (2025-07-11)

  • Trim and transpose for convenience in MOSAIC

0.7.10 (2025-07-10)

  • Fix bug in double counting Vxinf

  • Fix bug in suitability to decay calculations

  • Update default parameters

  • Fix indexing for human daily seasonality

0.7.9 (2025-06-06)

  • Rename beta_env to beta_jt_env

  • Rename beta_j_seasonality to beta_jt_human and use directly in spatial hazard calculation

  • Update pre-commit

  • Fix handling of pi_ij matrix math

  • Track vaccine doses delivered

  • Births should be Poisson rather than binomial

  • Rename estimated to simulated for clarity

  • Switch from ‘agents’ to ‘people’ terminology

  • Fix coupling calculation for denominator == 0

0.7.8 (2025-05-16)

  • Likelihood cleanup for NaNs and all zeros

0.7.7 (2025-05-13)

  • Calculate log likelihood at end of simulation

0.7.6 (2025-05-13)

  • Fix logging setup and np.var() usage

0.7.5 (2025-05-13)

  • Add Python implementation of R tests for likelihood functions

0.7.4 (2025-05-07)

  • Fix up reading JSON files back into memory (handle actual NaN vs “NA” or “NaN”)

  • Record incidence (total and per source)

  • Adding likelihood functions

  • Adding likelihood function tests

  • More consistent variable names

0.7.3 (2025-04-30)

  • Gate file output on hdf5_output and “return” config parameters

  • Clean up console output with logging infrastructure

  • Add “quiet” parameter to suppress console progress bar (defaults to False for CLI, True for programmatic interface)

  • Update GHA to run tests on push to main

  • Support params from R (numeric values come in as doubles, but we need an integer for p)

0.7.2 (2025-04-24)

  • Support for passing dict to get_parameters()

  • Tests for run_model() function

  • Additional tests for tracking vital statistics (births, non-disease deaths, disease deaths)

0.7.1 (2025-04-24)

  • Minor version bump

0.7.0 (2025-04-23)

  • Initial alpha release

  • Support passing parameter dictionary to run_model()

  • Fix mapping of environmental suitability (psi_jt) to decay parameter (delta_jt)

  • Update default_parameters.json with matrices

  • Update parameter loading for matrices

  • Clean up plotting and fix seasonality phase

  • Handle command line parameter overrides

  • Enable parameter overrides correctly

  • Allow test parameter sets to skip validation

  • Pin numpy, numba, and llvmlite versions

  • Remove subpackages

  • Update laser-core dependency

  • Return model from run_model()

  • Require Numba that supports NumPy>=2.0

  • Update shedding to environment based on theta_j

  • Updated parameters including switch from delta_min/delta_max to decay_days_fast/decay_days_slow

  • Use decay_shape_1 and decay_shape_2 to parameterize scipy.stats.beta.cdf

  • Add version bump, build, and release GHA

  • Metapop implementation work-in-progress commits

0.0.0 (2024-09-30)

  • First release on PyPI