Ignore the .h5 files generated by the scripts - #265
Merged
Merged
Conversation
scripts/symplectic_autoencoders/integration.jl writes a ~7.9 MB snapshot matrix, and .gitignore did not cover it, so every run left the working tree dirty and put the artefact one staging sweep away from the history. The file name reaches h5open as a bare relative string, so it lands in the process working directory rather than beside the script: at the repository root, or in scripts/symplectic_autoencoders/, depending on where the script is started from. A pattern confined to scripts/ covers only the second case, so the root is matched as well, by an anchored /snapshot_matrix*.h5 that also takes in the snapshot_matrix2.h5 named by the script's p_zero branch -- a branch not taken as committed. Neither pattern reaches docs/src/tutorials/, where the six committed network weights are .h5 too and the tutorials load them in @setup and @example blocks instead of retraining. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved issues were identified, and tracked tutorial weights remain preserved.
Pull request overview
This pull request prevents generated .h5 snapshot files from appearing as untracked changes while preserving tracked tutorial weights.
Changes:
- Adds scoped ignore rules for generated snapshot files.
- Documents the behavior and scope in the changelog.
File summaries
| File | Summary |
|---|---|
CHANGELOG.md |
Documents the ignore-rule behavior and scope. |
.gitignore |
Ignores generated HDF5 files in supported locations. |
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #265 +/- ##
=======================================
Coverage 72.40% 72.40%
=======================================
Files 99 99
Lines 3606 3606
=======================================
Hits 2611 2611
Misses 995 995 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
michakraus
enabled auto-merge
September 14, 2026 19:49
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.
scripts/symplectic_autoencoders/integration.jlwrites a 7.9 MiBsnapshot_matrix.h5into thesource tree on every run, and
.gitignoredid not cover it. The script passes a bare relative nameto
h5open, so the file lands in the process working directory — at the repository root when thescript is run from there, or in the script's own directory when run from there. Two anchored rules
cover both, and the six committed network weights under
docs/src/tutorials/stay tracked.Sub-task T3 of
Tasks/Restructure the GeometricMachineLearning test and script trees.md.Note what this does and does not do: the script still writes the file on every run, and deleting it
is still manual. What changed is that
git statusno longer reports it.Pre-PR verification
Fixed
.gitignore:15— dropped the trailing full stop from the block's header comment, which the file's other ten header comments do not carry.Unresolved — none.
Pre-existing, adjacent — none fixed.
scripts/symplectic_autoencoders/integration.jlpasses a bare relative file name toh5open; changing that is a behaviour decision, andtraining.jlandplot_waves.jlread the same bare name.Checked and clean
git check-ignore -v:snapshot_matrix.h5andsnapshot_matrix2.h5at the root match/snapshot_matrix*.h5;scripts/**/*.h5matches at every depth underscripts/, including directly in it;docs/src/tutorials/sae_parameters.h5and a hypothetical seventh weight file there are not ignored.git ls-files -c -i --exclude-standardis empty — no tracked file became ignored..github/references.h5..gitignorecomment blocks describe the rules as they are, and carry no history markers.Float64= 8 320 000 B = 7.9346 MiB) fromÑ = 128,n_params = 20,n_time_steps = 200;p_zero = falseas committed; the six tracked weight files are exactly those named, and all six are loaded from@setupor@exampleblocks in the two tutorials. The entry sits under### Fixedwithin## [Unreleased] — 0.8.0, both existing headings.Not checked
fatou lint, the load test and the test suite: not applicable — the diff contains no Julia source.docs/.psis blocked in the sandbox. No measured point depended on it.Verification
integration.jlwas run in an isolated process both ways — from the repository root, and withits own directory as the working directory — each writing 8,322,056 bytes. After each run
git status --shortwas empty, andgit ls-files '*.h5'returned the same sixdocs/src/tutorials/weights before and after the change.The one counterfactual claim the changelog makes — that a bare
*.h5would leave the six trackedweights alone but would make
git addrefuse a seventh — was reproduced in a throwaway repositoryrather than reasoned about.
🤖 Generated with Claude Code