Repository navigation
Conversation
New homes start from the v2 skeleton (current names, renames.tsv and a manifest); existing homes keep the legacy skeleton until `templateflow update --migrate`. ls() and get() resolve old names through renames.tsv with a TemplateFlowAliasWarning (FutureWarning), serve removed files until 27.0, and, in homes not yet migrated, find old files with current queries. Adds get_atlas_metadata(), the inversion entity, `+` in label and letters in scale, and fixes get_metadata() and get() with DataLad. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d58b69f4e
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| paths.append(path) | ||
| notes.append(f'{row.old} was removed from the Archive and S3 no longer serves it.') | ||
|
|
||
| if paths or not renames and self.cache.generation != 'legacy': |
There was a problem hiding this comment.
Resolve rename fallbacks alongside direct matches
When a query has any directly indexed results, this returns before checking renamed or removed entries. For example, in a v2 home ls('fsaverage', suffix='dseg', segmentation=None) finds current dseg files but skips the renamed tpl-fsaverage_dseg.tsv, whose old name matches that query. Merge the fallback results with direct matches instead of only checking fallbacks when paths is empty.
Useful? React with 👍 / 👎.
| continue | ||
| none = None in values or Query.NONE in values | ||
| required = Query.REQUIRED in values | ||
| values = [v for v in values if v is not None and not isinstance(v, Query)] |
There was a problem hiding this comment.
Treat
Query.ANY as an entity-presence check
Alias matching uses match_entities(), but this removes Query.ANY from values without treating it as a presence requirement. The subsequent comparison against the empty list returns false even when the entity is present, so a current-name query such as ls('A', label=Query.ANY, suffix='probseg') cannot resolve old-name files in a legacy home. Handle Query.ANY as a presence check before filtering query sentinels.
Useful? React with 👍 / 👎.
Summary
WP3, part 1: client 26.0 reads the v2 skeleton (templateflow/templateflow#217) and resolves the TemplateFlow 2.0 renames. Part 2 adds the compatibility matrix against released clients.
Behaviour decided for the TemplateFlow 2.0 overhaul:
n/a) are served until 27.0, with a warning.Smaller changes:
.templateflow/skeleton.zip, 1.3 MB). Every update applies it again, so deleted folders come back, offline too.inversion(inv-),+inlabel, letters inscale, as in the python-manager rule set.TEMPLATEFLOW_SKEL_URLreplaces the base URL of the skeletons.get_metadata()called_datalad_getwith the wrong arguments;get()skipped files when DataLad fetched several (it removed items from the list it iterated);ConnectionError.Evidence
pytest -n 4 --doctest-modules templateflow), including the existing suite against live S3. The 40 new tests run offline:test_sync.py: new homes, migration (move, delete, prune, reset, refresh; root files and foreign files kept), published skeleton updates, corrupt downloads, DataLad refusal, deleted folders coming back.test_renames.py: the table, and alias resolution in v2, legacy, both-names and DataLad-style homes. It also has a parity check:match_entitiesagainstBIDSLayout.get()over the 2,539 indexed files of the real skeleton, for 22 queries coveringNone,Query.*, lists, dtype casts and regex.tpl-MNI152NLin2009cAsym_res-02_T1w.nii.gz;templateflow update --migrate, which adds 26 files and keeps the download;get()s the same file from the migrated home.Merge Danger
Door: two-way
Blast Radius: client users
Until a release, only
masterinstalls see it. After a release:--migrate;update().The Archive has 23 renames today (the canaries), so most queries see no difference. Part 2 runs released clients from 0.8.1 on against both skeletons.