Enforce reproducibility & dashboard load in CI, add Python matrix and docs polish - #2
Merged
Conversation
Regenerate the results dict from the committed fixed seeds and assert it matches data/results.json: the stochastic CA curves bit-for-bit, the solve_ivp-derived ode_validation block to a 1e-6 tolerance, excluding the non-deterministic speedup timings and generated_at. Add a headless streamlit AppTest that runs app.py end-to-end and asserts it loads without an uncaught exception (the class of breakage the use_container_width deprecation caused). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI ran only 3.12 though pyproject declares target-version py310; test the full supported range. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Factor the repeated pip install lines out of Running Locally into a single Installation section, and add a CITATION.cff so GitHub shows a Cite this repository button. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Drafted by an LLM-based AI tool (Claude Code/Fable 5).
What & why
Two verification steps that were previously only run by hand are now enforced in CI, plus a Python-version matrix and a small docs/typing polish. No change to model behaviour:
data/results.jsonis byte-for-byte unchanged andseiqr.pyis untouched.Changes
tests/test_reproducibility.py) — regenerates the results dict from the committed fixed seeds viarun_experiments.run_all()and asserts it matchesdata/results.json. The stochastic CA curves are compared bit-for-bit (every transition is a PCG64 draw against a constant probability plus an exact integer infected-neighbour test, so they reproduce exactly across platforms and numpy versions); thesolve_ivp-derivedode_validationblock is compared to a1e-6relative tolerance; the non-deterministicspeeduptimings andgenerated_attimestamp are excluded.tests/test_app.py) — a headlessstreamlit.testing.v1.AppTestrunsapp.pyend-to-end (loading the results, rendering all three tabs, executing one live simulation) and asserts it finishes without an uncaught exception. This catches the class of breakage theuse_container_widthdeprecation caused previously.target-version = "py310".## Installationsection in the README (de-duplicating the repeatedpip installlines in "Running Locally"), aCITATION.cffso GitHub shows a "Cite this repository" button, and the two missing type hints flagged inode_reference.py(foi,_interior_counts).Verification
ruff check .clean;pytest -q→ 43 passed locally (Python 3.13, numpy 2.4.6, scipy 1.17.1, streamlit 1.58.0).data/results.jsonis unmodified after running the suite.🤖 Generated with Claude Code