Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---------------------------------------------------
Expand Down
10 changes: 3 additions & 7 deletions templateflow/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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]
2 changes: 1 addition & 1 deletion templateflow/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
Expand Down
6 changes: 3 additions & 3 deletions templateflow/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading