From 582b187979b1d8874428689758b9563cf028623b Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 12 Aug 2025 12:13:21 -0400 Subject: [PATCH 1/2] sty: ruff format [ignore-rev] --- docs/conf.py | 3 +-- templateflow/api.py | 10 +++------- templateflow/cli.py | 2 +- templateflow/tests/test_api.py | 6 +++--- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6d778bcb..a9d8b88d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,8 +24,7 @@ # The short X.Y version version = ( - __version__ if Version(release).public == release - else f"dev ({release.partition('+')[0]})" + __version__ if Version(release).public == release else f'dev ({release.partition("+")[0]})' ) # -- General configuration --------------------------------------------------- diff --git a/templateflow/api.py b/templateflow/api.py index 6d1d51f0..b1aa8ca5 100644 --- a/templateflow/api.py +++ b/templateflow/api.py @@ -176,22 +176,18 @@ def get(template, raise_empty=False, **kwargs): if not_fetched: msg = 'Could not fetch template files: {}.'.format(', '.join(not_fetched)) if dl_missing and not TF_USE_DATALAD: - msg += ( - f"""\ + msg += f"""\ The $TEMPLATEFLOW_HOME folder {TF_LAYOUT.root} seems to contain an initiated DataLad \ dataset, but the environment variable $TEMPLATEFLOW_USE_DATALAD is not \ set or set to one of (false, off, 0). Please set $TEMPLATEFLOW_USE_DATALAD \ on (possible values: true, on, 1).""" - ) if s3_missing and TF_USE_DATALAD: - msg += ( - f"""\ + msg += f"""\ The $TEMPLATEFLOW_HOME folder {TF_LAYOUT.root} seems to contain an plain \ dataset, but the environment variable $TEMPLATEFLOW_USE_DATALAD is \ set to one of (true, on, 1). Please set $TEMPLATEFLOW_USE_DATALAD \ off (possible values: false, off, 0).""" - ) raise RuntimeError(msg) @@ -394,5 +390,5 @@ def _normalize_ext(value): return value if isinstance(value, str): - return f"{'' if value.startswith('.') else '.'}{value}" + return f'{"" if value.startswith(".") else "."}{value}' return [_normalize_ext(v) for v in value] diff --git a/templateflow/cli.py b/templateflow/cli.py index ce04d26e..59453ced 100644 --- a/templateflow/cli.py +++ b/templateflow/cli.py @@ -61,7 +61,7 @@ def entity_opts(): entities = json.loads(Path(load_data('conf/config.json')).read_text())['entities'] args = [ - (f"--{e['name']}", *ENTITY_SHORTHANDS.get(e['name'], ())) + (f'--{e["name"]}', *ENTITY_SHORTHANDS.get(e['name'], ())) for e in entities if e['name'] not in ENTITY_EXCLUDE ] diff --git a/templateflow/tests/test_api.py b/templateflow/tests/test_api.py index fe2aea3b..6cf83eb6 100644 --- a/templateflow/tests/test_api.py +++ b/templateflow/tests/test_api.py @@ -85,9 +85,9 @@ def assert_same(self, other): assert self.citekey == other.citekey, 'Mismatched citekeys' for key in self.pairs.keys(): assert key in other.pairs, f'Key ({key}) missing from other' - assert ( - self.pairs[key] == other.pairs[key] - ), f'Key ({key}) mismatched\n\n{self.pairs[key]}\n\n{other.pairs[key]}' + assert self.pairs[key] == other.pairs[key], ( + f'Key ({key}) mismatched\n\n{self.pairs[key]}\n\n{other.pairs[key]}' + ) for key in other.pairs.keys(): assert key in self.pairs, f'Key ({key}) missing from pairs' From 33240f182b81b9180712d7ae5ac4130a0bab1676 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 12 Aug 2025 12:15:10 -0400 Subject: [PATCH 2/2] doc: 25.0.0 release notes --- CHANGES.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 2b79878a..99b9e103 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +25.0.0 (August 12, 2025) +======================== +Minor release including updated templates. + +* FIX: Fix crash in templateflow get when matching one file (#140) +* MAINT: Update Python support, datalad and git-annex deps (#143) + 24.2.2 (September 14, 2024) =========================== Patch release containing one bugfix and updating the default skeleton.