Repository navigation
feat(migrate): the missing lookup tables, from their upstream sources (T02) - #24
Merged
Merged
Conversation
… (T02) The 54 segmentations of the Archive without a lookup table get one, and the MNI152NLin6Asym Harvard-Oxford tables are rebuilt (HOCPAL had FSL's 0-based index and 52 of 96 rows). 24 tables under migrate/config/tables/, each with a tables.sources entry that cites the upstream file (URL, version, sha256) and says how the table was written from it: FSL's Harvard-Oxford XML files, FreeSurfer 7.4.1's color table (aseg, DKT31, with Mindboggle's names for 91, 92 and 630 to 632), HCP Pipelines' subcortical table, the MouseIn authors' table on OSF, the UNC infant atlases' release document (AAL), and the Waxholm Space v3 label file (44 named from v2). The order of 4D probseg volumes (aseg, MIAL67, SUIT) and the tissue maps (Fischer344, NMT31Sym, RESILIENT, UNCInfant, WHS) are checked against the data and their papers. WHS's res-2 atlas-v3 image is RESILIENT's tissue image, not the atlas: it becomes desc-tissues. A table a source replaces is no longer converted first (the FSL layout goes), and planning a migrated template writes no source table again. On the Archive, nothing is blocked any more; M202, M206, TF401 and TF407 are gone (260 to 206 strict errors). Closes templateflow/templateflow#203. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oesteban
marked this pull request as ready for review
December 5, 2026 06:14
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
PR 5b2 of the migration to TemplateFlow 2.0: the 54 segmentations without a lookup table get one, and the MNI152NLin6Asym Harvard-Oxford tables are rebuilt. Each table is committed under
migrate/config/tables/, and itstables.sourcesentry cites the upstream file (URL, version, sha256) and how the table was written from it. Stacked on #23.tfmanager/migrate/config/ ├── 2.0.0.yaml # + tables.sources (24), + rename tissues-WHS, │ # - layout FSL-Harvard-Oxford-xyz (its tables are replaced) +└── tables/ # 24 TSVs, shipped in the wheelxyzFreeSurferSubcorticalLabelTableLut.txtxyz)FreeSurferColorLUT.txt; DKT31's 91, 92, 630 to 632 named from Mindboggle'slabels.pyfreesurfer_labelcolumn.abbreviationand the BIDS 1.11.0mappingwhere a class is a common label,n/aotherwise (NMT's blood vasculature, Fischer344's "other").tpl-WHS_res-2_atlas-v3_dseg.nii.gzis not the v3 atlas but the GM/WM/CSF tissue image RESILIENT was built with. It becomestpl-WHS_res-2_desc-tissues_dseg.nii.gz(renametissues-WHS; the golden renames change by that one row).Evidence
Planning the whole Archive from the pinned v2 skeleton (
test_archive):5d05ffb): 260 strict errors, including TF401 42 (missing tables) and TF407 12 (4D probseg without a table). MNI152NLin6Asym blocked (M206: 43 to 45 HOCPAL values without a row in each of 6 images). M202 54.After: 206 strict errors; TF401, TF407, M202 and M206 are gone, and no template is blocked.
tpl-MNI152NLin6AsymEvery table passes the label check against its images: no value without a row, no new row that labels nothing, and probseg rows equal to volumes 1 to N in every resolution.
Notes for the WP5 template PRs:
Tests:
test_sources: a replaced table needs no layout; planning the result again writes nothing and finds nothing, whateverreplacesays.test_bundled_sources: each TSV undertables/belongs to exactly one source.test_archive,test_archive_rulesand the golden renames are updated. Planning the migrated Archive again is still idempotent.6b04d42: 341 passed on 3.13 and 3.15, ruff clean; sdist and wheel pass twine check, and the wheel ships the 24 tables.Closes templateflow/templateflow#203.
Merge Danger
Door: two-way
Config, package data and a small engine change; nothing in the Archive changes until a template's WP5 PR applies its plan.
Blast Radius: MNI152NLin6Asym
xyz.