Skip to content

Fix reproducibility fixture regeneration - #35

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

sergioald merged 1 commit into
mainfrom
fix-reproducibility-fixture-regeneration

Conversation

@sergioald

Copy link
Copy Markdown
Owner

Summary

Fixes the reproducibility-fixture regeneration helper added in PR #34.

Changed

  • examples/reproducible_case1_short/regenerate.py

    • now runs the short fixture case in a temporary workspace;
    • no longer deletes the repository-level ignored Output/ directory;
    • refreshes expected_summary.json automatically;
    • refreshes expected_tree.txt, environment.json, and expected_output/ together.
  • tests/test_reproducible_example.py

    • strengthens the floating-point fixture guard by checking Python, platform, NumPy, SciPy, pandas, and BLAS details before comparing pinned floating-point values.
  • examples/reproducible_case1_short/expected_output/

    • includes the final variable-history fixture file referenced by expected_tree.txt.

Why

Codex correctly flagged two issues in PR #34:

  1. regenerate.py removed the whole repository-level Output/ directory, which could wipe unrelated local experiment results.
  2. expected_tree.txt referenced the final var_*_6.csv file, but that file was not actually tracked in the bundled fixture output tree.

This PR fixes both issues and also makes regeneration safer by refreshing the pinned summary at the same time as the output tree.

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

@sergioald
sergioald merged commit 4f9d31e into main Jul 22, 2026
3 checks passed
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