Repository navigation
test: CIF headers and pin scripts say what they hold, not which session made them - #42
Merged
Merged
Conversation
Fixture move. The first comment line of the nine origin-shift, supercell, co-sited and rhombohedral CIFs named a past review session. Each header now says which structure the file holds and what RefuterRegressionTests (and, for the 7x supercell, the conventional-cell pins) checks with it. Only comment lines change. No pin file locks these CIFs by sha256: they are not in pymatgen-cells-pins.json or numpy-structure-factor-pins.json. Regenerating cells/pins.py, structure-factors/pins.py and conventional-cell/pins.py with the pinned pymatgen environment on the edited files gives byte-identical pins apart from the generated_at stamp, so no pin file is committed. Tests/Fixtures/README.md carries the new file sizes. Part of #40. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comments, docstrings, READMEs and check messages of the pin scripts and the consumer check said slice 1, slice 2, slice 3a, slice 4. They now name the pin file, the generator or the rule they mean (the cells pins and tools/pins/cells/pins.py, the structure-factor pins, the ring-calibration pins). In conventional-cell/pins.py and phase-vectors/pins.py the variables SLICE1_PINS, slice1, SLICE2_PINS and slice2 are now CELLS_PINS, cells_pins, STRUCTURE_FACTOR_PINS and sf_pins. Strings written into fixtures (the source label slice-1, purpose, the families and rings descriptions, the vs_slice2 keys) stay: no fixture is regenerated here. The first docstring lines of seven scripts are left to PR #41. Rerunning structure-factors/pins.py and conventional-cell/pins.py with the pinned environment gives byte-identical pins apart from generated_at; every edited script compiles. Part of #40. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release-please hides test: commits by default, so a fixture move had no CHANGELOG line. The config now lists the default sections and shows test: under Fixtures and tests; the hidden sections stay hidden. Part of #40. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tests/Fixtures/README.md conflicted: main added the licence Note column, this branch changed the sizes of the rewritten CIFs. Resolved with the Note column from main and the sizes from this branch (checked with wc -c). Co-Authored-By: Claude Opus 5.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.
Requested by Paul · project thread
Fixes #40, together with #41 (this PR does the parts #41 left open). The two branches merge cleanly into each other and into main.
Fixture move: the nine review regression CIF headers (own commit)
The first comment line of
alpha_quartz_P1_origin_shifted.cif,magnesium_P1_origin_shifted.cif,polonium_P1_supercell_7x.cif,mixed_centring.cif,rocksalt_P1_origin_shifted.cif,iron_P1_general_position.cif,corundum_P1_rhombohedral.cif,gold_P1_origin_shifted_exact_decimals.cifandmagnesium_P63mmc_origin_shifted_loop.cifnamed a past review session. Each header now says which structure the file holds and whatRefuterRegressionTestschecks with it (for the 7x supercell, also the conventional-cell pins). Only comment lines change.Tests/Fixtures/README.mdhas the new sizes.The pins do not change. These nine CIFs are not sha256-locked anywhere. Neither
pymatgen-cells-pins.jsonnornumpy-structure-factor-pins.jsonlists them: theircif_fileandcif_sha256entries cover the other CIF fixtures only. To check this, I rerantools/pins/cells/pins.py,tools/pins/structure-factors/pins.pyandtools/pins/conventional-cell/pins.py(the only generator that reads one of the nine, the polonium supercell) on the edited files, using the pinned environment (pymatgen 2026.9.24, pymatgen-core 2026.10.16, spglib 2.8.0, NumPy 2.5.4):numpy-structure-factor-pins.json: byte-identical.pymatgen-cells-pins.jsonandspglib-conventional-cell-pins.json: byte-identical except thegenerated_atstamp.No pin file is committed, so the pinned values and the sha256 values stay as they are.
Pin script comments
The comments, docstrings, READMEs and failure messages in
tools/pins(cells/tetragonal-pins.py,structure-factors/pins.pyand its README,conventional-cell/pins.py,phase-vectors/pins.pyand its README,ring-calibration/ring-pins.pyandq-pins.py,ring-indexing/pins.py) and intools/consumer-checksaid slice 1, 2, 3a, 3b or 4. They now name the pin file, generator or rule they mean. VariablesSLICE1_PINS,slice1,SLICE2_PINSandslice2are renamedCELLS_PINS,cells_pins,STRUCTURE_FACTOR_PINSandsf_pins. The first docstring lines of the seven scripts that #41 edits are left to #41.Not changed: strings written into fixtures
These strings are written into fixtures and stay as they are, because no fixture is regenerated here:
"source": "slice-1"label in the conventional-cell pins (so theConventionalSymmetryTestsfilter stays too, as docs: name what tests, parity rows and pin scripts hold #41 documents)"purpose","families"and"rings"vs_slice2_*keyspredictlabelsChange them the next time those pins are regenerated for another reason.
CHANGELOG
release-please hides
test:entries by default.release-please-config.jsonnow shows them under "Fixtures and tests", as in ImagoKit. The override below gives the fixture move its CHANGELOG line.BEGIN_COMMIT_OVERRIDE
test: the nine review regression CIF headers say which structure each holds and what it tests (comment lines only; no pin or value changes)
END_COMMIT_OVERRIDE
Tests
swift test -c release -j 1 --skip DiffractoKitParityTests --filter DiffractoCoreTests: 170 tests in 28 suites passed. This coversRefuterRegressionTestsand the tests that read every CIF in the fixtures folder. CI runs the full unit gate.phase-vectors/pins.pywas not rerun: it needs the py4DSTEM environment. Its changes are comments, failure messages and the two renamed variables, checked by search.🤖 Generated with Claude Code