Drop tissue-mask transforms from longitudinal anat (Stage 4 of #301)#314
Merged
Conversation
Tissue masks (csf/gm/wm) were being warped into longitudinal template space even though nothing downstream consumes them there; per Jason's handover note #5 this is wasted work. Removes the fields from `AnatomicalLongOutputs`, the `_xfm()` calls in `longitudinal_process`, and the matching resolve/export entries under `space-longitudinal`. Adds a unit test asserting the tissue masks are not produced, and trims the three obsolete rows from `docs/data_dictionary.md`.
- Flag the xfm filename quirk (space-longitudinal + from-/to- is redundant) with a comment pointing at handover note #18, so the hard-coded expected names are not mistaken for a spec. - Replace the Mock-based longitudinal anat outputs in the orchestration tests with a real AnatomicalLongOutputs NamedTuple so attribute typos fail loudly instead of silently returning a new Mock. - Add resolve_longitudinal_anat unit tests covering the happy path, brain_mask optionality, and bids_safe_label round-trip for session labels with non-alphanumerics.
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
csf_mask/gm_mask/wm_maskfromAnatomicalLongOutputs, the matching_xfm(...)calls inworkflows/longitudinal/anatomical.py::longitudinal_process, and the corresponding entries inbids/longitudinal/anatomical.py::{resolve_longitudinal_anat, export_longitudinal_anat}.*_space-longitudinal_desc-{csf,gm,wm}_mask.nii.gzrows fromdocs/data_dictionary.md.Stage checklist
AnatomicalLongOutputs_xfm()calls inlongitudinal_processexport_longitudinal_anatto keep only brain + brain_mask + xfmsresolve_longitudinal_anatspace-longitudinaldocs/data_dictionary.mdTest plan
uv run pytest -m unit— 769 passed, 1 skippeduv run ruff check src/ tests/uv run ruff format src/ tests/uv run mypy src/ tests/pytest -m integration --runner dockeronce merged (per plan; longitudinal integration tier reuses the ds000114 fixture from Add ds000114 fixture infrastructure for longitudinal tests #307)