Feature/globals#126
Merged
francois-drielsma merged 5 commits intomainfrom Apr 28, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #126 +/- ##
==========================================
+ Coverage 44.41% 44.98% +0.56%
==========================================
Files 283 289 +6
Lines 21933 22194 +261
==========================================
+ Hits 9742 9983 +241
- Misses 12191 12211 +20
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Summary
This PR introduces a new
spine.constantspackage, migrates internal code away fromspine.utils.globals, and fixes a full-chain HDF5 writer regression that could crash during truth-object serialization. It also updates the docs to expose the new constants module and cleans up several documentation issues.Main changes
spine.constantsas the canonical home for:spine.constants.factoryspine.utils.globals/spine.utils.enumstospine.constantsspine.utils.globalsandspine.utils.enumsas deprecated compatibility shimsLArSoftNuInteractionTypeGenieNuInteractionTypeNuInteractionSchemeint64)Validation
Validated in
ghcr.io/deeplearnphysics/spine:latestwithconfig/test_full_chain.yaml.Full-chain stability
Output comparison
Compared current output against the minimally patched clean-main baseline.
Result:
loss/accuracy: identical across all 3 iterationsrun_infometapointspoints_labeldepositionsdepositions_labelreco_particlestruth_particlesreco_interactionstruth_interactions.interaction_schemeadded in current outputImportant test-gap note
The regression fixed here was on the writer-backed full-chain path.
Existing CI passed because the current full-chain regression test removes
io.writerand only checks deterministic loss/accuracy. It does not exercise end-to-end HDF5 output serialization.Schema / compatibility notes
int64)int32truth_interactions.interaction_schemeis a new stored fieldspine.utils.globalscompatibility remains temporarily, but all internal code now usesspine.constantsDocs
Docs were updated to:
spine.constantsto the API docsFollow-ups
spine.utils.globals/spine.utils.enumscompatibility once downstream users have migrated