Skip to content

Commit 1845d0d

Browse files
committed
chore: Use acres.Loader
1 parent f757ce2 commit 1845d0d

File tree

4 files changed

+5
-198
lines changed

4 files changed

+5
-198
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ classifiers = [
2121
license = {file = "LICENSE"}
2222
requires-python = ">=3.9"
2323
dependencies = [
24+
"acres >= 0.5.0",
2425
"pybids >= 0.15.2",
25-
"importlib_resources >= 5.7; python_version < '3.11'",
2626
"requests",
2727
"tqdm",
2828
]

templateflow/_loader.py

Lines changed: 0 additions & 193 deletions
This file was deleted.

templateflow/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from click.decorators import FC, Option, _param_memo
3232

3333
from templateflow import __package__, api
34-
from templateflow._loader import Loader as _Loader
34+
from acres import Loader as _Loader
3535
from templateflow.conf import TF_AUTOUPDATE, TF_HOME, TF_USE_DATALAD
3636

3737
load_data = _Loader(__package__)
@@ -58,7 +58,7 @@ def _nulls(s):
5858
def entity_opts():
5959
"""Attaches all entities as options to the command."""
6060

61-
entities = json.loads(Path(load_data('conf/config.json')).read_text())['entities']
61+
entities = json.loads(load_data('conf/config.json').read_text())['entities']
6262

6363
args = [
6464
(f'--{e["name"]}', *ENTITY_SHORTHANDS.get(e['name'], ()))

templateflow/conf/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from pathlib import Path
88
from warnings import warn
99

10-
from .._loader import Loader
10+
from acres import Loader
1111

12-
load_data = Loader(__package__)
12+
load_data = Loader(__spec__.name)
1313

1414

1515
def _env_to_bool(envvar: str, default: bool) -> bool:

0 commit comments

Comments
 (0)