Skip to content

Verify reproducibility fixture - #34

Merged
sergioald merged 1 commit into
mainfrom
verify-reproducibility-fixture
Jul 22, 2026
Merged

sergioald merged 1 commit into
mainfrom
verify-reproducibility-fixture

Conversation

@sergioald

Copy link
Copy Markdown
Owner

Summary

Adds a real regression check for the bundled short reproducibility fixture.

Changed

  • examples/reproducible_case1_short/README.md

    • clarifies which reproducibility checks are portable across machines;
    • explains that floating-point reference values are only compared when the recorded scientific-Python environment matches.
  • examples/reproducible_case1_short/expected_tree.txt

    • records the final partial variable-history file produced by the documented short run.
  • examples/reproducible_case1_short/regenerate.py

    • adds a helper script to regenerate the fixture output tree and record the local Python/scientific stack.
  • tests/test_reproducible_example.py

    • runs the documented short case in a temporary workspace;
    • checks the produced output tree against expected_tree.txt;
    • checks stable integer counters and stop criteria against expected_summary.json;
    • checks portable physical/output invariants for generated CSV snapshots;
    • compares pinned floating-point values only when the recorded environment matches the current one.

Why

The repository already ships a short reproducibility fixture under examples/reproducible_case1_short/, but that fixture was not being checked by the test suite.

This PR turns it into an executable regression test while avoiding brittle cross-machine failures from BLAS/NumPy/SciPy floating-point differences.

It also fixes the expected output tree so the documented command includes the final partial variable-history block.

Validation

python -m py_compile examples/reproducible_case1_short/regenerate.py tests/test_reproducible_example.py
python -m pytest tests/test_reproducible_example.py
python -m pytest
python -m run_ldsfl --base-dir . --cases 1 --max-steps 100 --no-plots

Notes

This is a fixture/test/documentation PR.

It does not change the morphodynamic update algorithm, flow solvers, curvature calculation, stability diagnostics, CLI interface, GUI interface, or output naming.

The floating-point comparison is intentionally guarded by environment.json so the test remains useful on CI and on local machines with different scientific-Python stacks.

@sergioald
sergioald merged commit ce0436e into main Jul 22, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 00cf711c25

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/reproducible_case1_short/regenerate.py
Comment thread examples/reproducible_case1_short/expected_tree.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant