Standardize dirty flag#211
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #211 +/- ##
==========================================
Coverage ? 97.99%
==========================================
Files ? 52
Lines ? 3639
Branches ? 650
==========================================
Hits ? 3566
Misses ? 41
Partials ? 32
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
rozyczko
left a comment
There was a problem hiding this comment.
Minor issue raised.
Also, consider removing .claude directory from pushed content
Every user/dev interested will recreate it with their own setup by running claude init
| if ( | ||
| self.sample_model._component_collections_is_dirty # noqa: SLF001 | ||
| or self.instrument_model.resolution_model._component_collections_is_dirty # noqa: SLF001 | ||
| ): | ||
| self._convolver_is_dirty = True |
There was a problem hiding this comment.
This is querying two other objects' private dirty flags. It works, but aren't we trying to actually remove this behaviouir?
Consider exposing a public is_dirty/needs_rebuild on ModelBase, or having those mutations notify subscribers. At minimum, a comment explaining why this particular query is needed would help.
…check - Add ModelBase.component_collections_is_dirty public property so Analysis1d.fit() no longer accesses private attributes on external objects - Replace _prospective_Q_len pre-check in Analysis.rebin() with a post-rebin np.allclose comparison (same logic as ModelBase.Q setter), catching Q value changes even when count stays the same; rolls back _binned_data if confirm=True is not given - Remove .claude/ from git tracking and add to .gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Standardizes how to deal with changes to e.g. Q, adding components etc., to always prefer flagging as dirty and rebuilding lazily.
Also a bunch of minor cleanups.