From fe813e1d2d0ba2f18e6bf70d60955de5672900b4 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 3 Dec 2026 11:22:54 +0100 Subject: [PATCH 1/5] feat: read the v2 skeleton and resolve TemplateFlow 2.0 renames 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 --- CHANGES.rst | 29 +++ docs/installation.rst | 22 ++ templateflow/cli.py | 21 +- templateflow/client.py | 159 ++++++++++++- templateflow/conf/_s3.py | 364 ++++++++++++++++++++++++++--- templateflow/conf/cache.py | 149 ++++++++++-- templateflow/conf/config.json | 9 +- templateflow/conf/renames.py | 296 +++++++++++++++++++++++ templateflow/tests/skeletons.py | 93 ++++++++ templateflow/tests/test_cli.py | 12 + templateflow/tests/test_renames.py | 273 ++++++++++++++++++++++ templateflow/tests/test_sync.py | 245 +++++++++++++++++++ 12 files changed, 1612 insertions(+), 60 deletions(-) create mode 100644 templateflow/conf/renames.py create mode 100644 templateflow/tests/skeletons.py create mode 100644 templateflow/tests/test_renames.py create mode 100644 templateflow/tests/test_sync.py diff --git a/CHANGES.rst b/CHANGES.rst index 9de2765d..62e52d7d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,32 @@ +Unreleased (26.0.0) +=================== +TemplateFlow 2.0 file names: the client reads the v2 skeleton and resolves old names. + +* New home folders start from the v2 skeleton (``templateflow-skel-v2.zip``): current + names only, with ``renames.tsv`` and a manifest of every file's size and checksum. + Updates make the home match it: they add files, refresh text files, prune stubs of + names the Archive no longer uses, and reset downloads the Archive changed. +* Existing home folders keep the legacy skeleton, which older clients read, until + ``templateflow update --migrate`` (or ``templateflow.update(migrate=True)``) moves + them to the v2 skeleton. Files downloaded under an old name move to the new one when + their checksum matches. ``templateflow config`` shows the home's layout. +* ``ls()`` and ``get()`` resolve old names through ``renames.tsv``: old-style queries + find the renamed files with a ``TemplateFlowAliasWarning`` (a ``FutureWarning``) + that gives the query to use instead, and files removed from the Archive are still + served until templateflow 27.0. In homes that have not migrated, current queries + find the old names, and ``ls()`` returns one file when a home holds both names. +* New ``get_atlas_metadata(template, atlas)`` reads + ``tpl-