Skip to content

feat(migrate): atlases tables from cited rows (T04), authors, new sidecars - #26

Merged
oesteban merged 1 commit into
masterfrom
feat/migrate-atlases
Dec 6, 2026
Merged

oesteban merged 1 commit into
masterfrom
feat/migrate-atlases

Conversation

@oesteban

@oesteban oesteban commented Dec 5, 2026

Copy link
Copy Markdown
Member

Summary

PR 5c2 of the migration to TemplateFlow 2.0 covers the atlases and the last description fields. Each of the 35 atlases of the Archive gets a cited row of its template's atlases table. A new transform, T04, writes those tables and moves the fields of the atlas as a whole out of the sidecars. This PR is stacked on #25, because T04 takes each atlas's license from 5c1's table.

migrate/config/2.0.0.yaml
├── edits     +20: authors (4 templates), broken links (2), dhcp cohort ages (2),
│                  12 new sidecars (create: true) for the desc and atlas values the renames drop
└── atlases    35 rows in 11 templates: name, description, authors, curators,
               references_and_links, derived_from_atlas (fsaverage Schaefer2018 from Yeo2011);
               license from licenses.table; each row cites its evidence

The sources of each field:

  • Authors: the atlas's primary paper, from Crossref. Europe PMC fills the gaps (Sabuncu 2011). For MASSP20 and Lausanne2018, the authors are the creators of the dataset record that distributes them.
  • Curators: the sidecars where they name some; otherwise the author of the commit that added the atlas, cited by hash.
  • Names and descriptions: the sidecars where they exist (Name, ShortDesc, LongDesc); otherwise drafted from the cited paper.
 plan_content
   T05 references
-  config edits
+  config edits; with create: true, a missing sidecar is written next to its data file (none: M108)
   T01-T03 tables, label check
   T06 template_description.json
+    Authors and Curators: "Family, I." becomes "Family I" (by rule)
+  T04 plan_atlases (migrate/atlases.py)
+    tpl-<label>_atlases.tsv: one row per atlas the files name, license from licenses.table
+    sidecars of those atlases lose ATLAS_LEVEL_FIELDS and the fields that described the atlas
+      before 2.0 (Name, ShortDesc, LongDesc, IsDerivedFrom, BIDSVersion, Maps, Type, MapDesc);
+      fields about the files stay (Description, Provenance, DeprecationNote, Source...)
+    an atlas without a row: M212 (non-blocking); the table leaves it out, its sidecars stay
+    a row without files: M108
   T07 licenses
   T10, T08 (now also atlas-<label>_description.json from each table), T09, flip trial
   T11 CHANGES
+    "Atlases: tpl-X_atlases.tsv describes the atlases (...); fields of the atlas as a whole
+     left N JSON sidecars." Created sidecars are listed with the new files.

The config loader checks the new sections:

  • one row per atlas;
  • a license entry for each atlas;
  • authors and curators written "Family I";
  • no atlas derived from itself;
  • no create edit that also removes fields.

Evidence

Migrated Archive (pinned v2 skeleton, test_archive):

Before (1c25869) After (this PR)
Strict errors 133: TF301 5, TF310 50, TF314 26, TF340 24, TF508 6, TF601 11, TF608 11 56: TF301 2, TF314 24, TF340 24, TF508 6
Templates that flip 4 6 (+NMT31Sym, +SUIT)
Blocked plans none none
  • TF310 (authors), TF601 (no atlases table) and TF608 (atlas fields in sidecars) are gone.
  • TF301 goes from 5 to 2:
    • fsaverage's empty Authors is filled;
    • NMT31Sym's missing versions come with its flip;
    • VALiDATe29's missing versions stay until it flips too, once it has a README (TF340, WP5).
  • T04 writes 22 files: 11 tables and 11 sidecars. T08 now also writes the 35 atlas descriptions.
  • Every config edit applies exactly once (asserted).
  • Planning the migrated Archive again writes nothing (test_archive_idempotent).

New tests (test_migrate_atlases.py):

  • the table, its columns and cells, the stripped sidecar and the generated descriptions, with the flip and idempotence;
  • the CHANGES item;
  • missing rows (M212) and stale rows (M108);
  • created sidecars, including one with no data file (M108);
  • the "Family I" rule;
  • the shipped rows, 7 config errors, and the create/remove check.

Local CI on 2a7bc79. GitHub CI does not run on this stacked PR:

== test (3.13)   All checks passed!   382 passed
== test (3.15)   All checks passed!   382 passed
== build (3.13)  twine check PASSED (sdist, wheel)
installed sdist and wheel: load_config() -> 8 texts, 68 license entries, 35 atlas rows, 21 edits

Decisions to look at again (all approved on 2026-12-05):

  • Authors replaced in 7 rows whose sidecars said otherwise:
    • fsaverage Desikan2006, Sabuncu2011, Schaefer2018, Yeo2011 and brainnetome take the authors of their papers;
    • fsaverage Lausanne2018 takes the creators of CMTKLIB-data v1.1 (zenodo 4593058), which distributes the 2018 version, where the sidecar had Aleman-Gomez Y, Cammoun L and Hagmann P;
    • SUIT Buckner2011's initials are completed (Krienen FM, Yeo BTT).
  • The same person, written the same way: Dale AM and Yeo BTT everywhere, also where a record gives fewer initials (Destrieux 2010 on Crossref, Sabuncu 2011 on Europe PMC).
  • Curators of the atlases that a bot committed (MouseIn CCFv3, VALiDATe29 VALiDATe): Esteban O.
  • MouseIn's former desc-DC is described by content; "DC" stays unexpanded until its authors say what it means (WP5).
  • dhcpAsym and dhcpSym cohorts are postmenstrual weeks, as their upstream pages say; the Archive said months.
  • Broken links: RESILIENT's osf.io/nwy9e (gone) becomes osf.io/u4gtw, which its paper cites. NMT31Sym's truncated SARM preprint DOI is fixed.

Merge Danger

Door: two-way

The config and the code only plan migrations. Nothing changes in the Archive until each template's WP5 PR applies its plan. Merge after #25: this PR's base then becomes master.

Blast Radius: migration plans

tfmgr validate, tfmgr add and the client are untouched. NMT31Sym and SUIT now flip, so they get a 2.0.0 CHANGES entry and new versions in their WP5 PRs.

…ecars

The config's `atlases` section gives a row of tpl-<label>_atlases.tsv for each
of the 35 atlases of the Archive (11 templates): name, description, authors of
the atlas's primary paper (Crossref, Europe PMC, or the dataset record), curators
(sidecars, else the commit that added the atlas), references, and the license of
its licenses.table entry. Each row cites its evidence. T04 writes the table and
strips the fields of the atlas as a whole from the sidecars of its files; T08
then generates atlas-<label>_description.json. An atlas without a row keeps its
sidecars (M212, non-blocking); a row without files is stale (M108).

T06 writes "Family, I." Authors and Curators as "Family I". Config edits correct
the authors it cannot rewrite (UNCInfant, fsLR, fsaverage, VALiDATe29), two broken
links (RESILIENT, NMT31Sym) and the dhcp cohort ages (postmenstrual weeks), and
may now create a sidecar (`create: true`): 12 new sidecars say what the desc and
atlas values dropped by the renames meant.

Archive: strict errors 133 -> 56 (TF310, TF601 and TF608 gone); NMT31Sym and
SUIT flip; idempotent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-06T08:34:19.217300Z 2a7bc79 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Base automatically changed from feat/migrate-licenses to master December 6, 2026 09:08
@oesteban
oesteban merged commit 6d3577f into master Dec 6, 2026
@oesteban
oesteban deleted the feat/migrate-atlases branch December 6, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant