Skip to content

Commit c8760ae

Browse files
authored
Merge branch 'master' into enh-codespell
2 parents acf466b + 5c3b769 commit c8760ae

File tree

24 files changed

+517
-703
lines changed

24 files changed

+517
-703
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
pip install -U pip
3232
pip install -r /tmp/src/templateflow/requirements.txt
3333
pip install datalad
34-
pip install "setuptools>=45" "setuptools_scm >= 6.2" nipreps-versions build twine codecov
34+
pip install -U build hatch hatchling nipreps-versions build twine codecov
3535
3636
- run:
3737
name: Install git and git-annex
@@ -173,8 +173,8 @@ jobs:
173173
name: Build only this commit
174174
command: |
175175
export PATH="$HOME/.conda/bin:$PATH"
176-
python -m pip install "setuptools_scm>=8"
177-
python -m setuptools_scm
176+
python -m pip install -U build hatch hatchling
177+
python -m hatch version
178178
make -C docs SPHINXOPTS="-W" BUILDDIR="$HOME/html" CURBRANCH="${CIRCLE_TAG}" html
179179
- store_artifacts:
180180
path: ~/html

.git_archival.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
ref-names: $Format:%D$
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
4+
ref-names: $Format:%D$

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ jobs:
4949
run: |
5050
python -m venv /tmp/buildenv
5151
source /tmp/buildenv/bin/activate
52-
python -m pip install --upgrade setuptools setuptools_scm nipreps-versions
52+
python -m pip install -U build hatch hatchling nipreps-versions
5353
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
5454
TAG=${GITHUB_REF##*/}
5555
fi
56-
THISVERSION=$( python -m setuptools_scm )
56+
THISVERSION=$( python -m hatch version | tail -n1 | xargs )
5757
THISVERSION=${TAG:-$THISVERSION}
5858
echo "Expected VERSION: \"${THISVERSION}\""
5959
echo "version=${THISVERSION}" >> $GITHUB_OUTPUT

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# setuptools_scm
2-
templateflow/_version.py
1+
# hatchling
2+
_version.py
33

44
# circleci hash checking
55
requirements.txt

docs/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ Information on specific functions, classes, and methods.
44

55
.. toctree::
66

7+
api/templateflow.cli
78
api/templateflow.api
89
api/templateflow.conf

docs/cli.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Using the client with the Command-line interface (CLI)
2+
======================================================
3+
4+
.. click:: templateflow.cli:main
5+
:prog: templateflow
6+
:nested: full
7+
8+
Examples
9+
--------
10+
Listing all the compressed NIfTI files in ``fsaverage``::
11+
12+
$ templateflow ls fsaverage -x .nii.gz
13+
~/.cache/templateflow/tpl-fsaverage/tpl-fsaverage_res-01_den-41k_T1w.nii.gz
14+
~/.cache/templateflow/tpl-fsaverage/tpl-fsaverage_res-01_desc-brain_mask.nii.gz
15+
~/.cache/templateflow/tpl-fsaverage/tpl-fsaverage_res-01_T1w.nii.gz

docs/conf.py

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
1313
from packaging.version import Version
14-
from templateflow import __version__, __copyright__, __packagename__
14+
15+
from templateflow import __copyright__, __packagename__, __version__
1516

1617
# -- Project information -----------------------------------------------------
1718
project = __packagename__
1819
copyright = __copyright__
19-
author = "The TemplateFlow Developers"
20+
author = 'The NiPreps Developers'
2021

2122
# The full version, including alpha/beta/rc tags
2223
release = __version__
@@ -29,30 +30,31 @@
2930

3031
# -- General configuration ---------------------------------------------------
3132
extensions = [
32-
"sphinx.ext.autodoc",
33-
"sphinx.ext.coverage",
34-
"sphinx.ext.doctest",
35-
"sphinx.ext.githubpages",
36-
"sphinx.ext.ifconfig",
37-
"sphinx.ext.intersphinx",
38-
"sphinx.ext.mathjax",
39-
"sphinx.ext.napoleon",
40-
"sphinx.ext.viewcode",
41-
"sphinxcontrib.apidoc",
42-
"nbsphinx",
33+
'sphinx.ext.autodoc',
34+
'sphinx.ext.coverage',
35+
'sphinx.ext.doctest',
36+
'sphinx.ext.githubpages',
37+
'sphinx.ext.ifconfig',
38+
'sphinx.ext.intersphinx',
39+
'sphinx.ext.mathjax',
40+
'sphinx.ext.napoleon',
41+
'sphinx.ext.viewcode',
42+
'sphinxcontrib.apidoc',
43+
'nbsphinx',
44+
'sphinx_click',
4345
]
4446

4547
autodoc_mock_imports = [
46-
"matplotlib",
47-
"nilearn",
48-
"nipy",
49-
"nitime",
50-
"numpy",
51-
"pandas",
52-
"seaborn",
53-
"skimage",
54-
"svgutils",
55-
"transforms3d",
48+
'matplotlib',
49+
'nilearn',
50+
'nipy',
51+
'nitime',
52+
'numpy',
53+
'pandas',
54+
'seaborn',
55+
'skimage',
56+
'svgutils',
57+
'transforms3d',
5658
]
5759
autodoc_autoreload = True
5860

@@ -67,16 +69,16 @@
6769
# ]
6870

6971
# Add any paths that contain templates here, relative to this directory.
70-
templates_path = ["_templates"]
72+
templates_path = ['_templates']
7173

7274
# The suffix(es) of source filenames.
7375
# You can specify multiple suffix as a list of string:
7476
#
7577
# source_suffix = ['.rst', '.md']
76-
source_suffix = ".rst"
78+
source_suffix = '.rst'
7779

7880
# The master toctree document.
79-
master_doc = "index"
81+
master_doc = 'index'
8082

8183
# The language for content autogenerated by Sphinx. Refer to documentation
8284
# for a list of supported languages.
@@ -89,11 +91,11 @@
8991
# directories to ignore when looking for source files.
9092
# This pattern also affects html_static_path and html_extra_path.
9193
exclude_patterns = [
92-
"_build",
93-
"Thumbs.db",
94-
".DS_Store",
95-
"api/modules.rst",
96-
"api/templateflow.rst",
94+
'_build',
95+
'Thumbs.db',
96+
'.DS_Store',
97+
'api/modules.rst',
98+
'api/templateflow.rst',
9799
]
98100

99101
# The name of the Pygments (syntax highlighting) style to use.
@@ -105,7 +107,7 @@
105107
# The theme to use for HTML and HTML Help pages. See the documentation for
106108
# a list of builtin themes.
107109
#
108-
html_theme = "sphinx_rtd_theme"
110+
html_theme = 'sphinx_rtd_theme'
109111

110112
# Theme options are theme-specific and customize the look and feel of a theme
111113
# further. For a list of options available for each theme, see the
@@ -116,7 +118,7 @@
116118
# Add any paths that contain custom static files (such as style sheets) here,
117119
# relative to this directory. They are copied after the builtin static files,
118120
# so a file named "default.css" will overwrite the builtin "default.css".
119-
html_static_path = ["_static"]
121+
html_static_path = ['_static']
120122

121123
# Custom sidebar templates, must be a dictionary that maps document names
122124
# to template names.
@@ -132,7 +134,7 @@
132134
# -- Options for HTMLHelp output ---------------------------------------------
133135

134136
# Output file base name for HTML help builder.
135-
htmlhelp_basename = "templateflowdoc"
137+
htmlhelp_basename = 'templateflowdoc'
136138

137139

138140
# -- Options for LaTeX output ------------------------------------------------
@@ -158,10 +160,10 @@
158160
latex_documents = [
159161
(
160162
master_doc,
161-
"templateflow.tex",
162-
"TemplateFlow Documentation",
163-
"The TemplateFlow Developers",
164-
"manual",
163+
'templateflow.tex',
164+
'TemplateFlow Documentation',
165+
'The TemplateFlow Developers',
166+
'manual',
165167
),
166168
]
167169

@@ -170,7 +172,7 @@
170172

171173
# One entry per manual page. List of tuples
172174
# (source start file, name, description, authors, manual section).
173-
man_pages = [(master_doc, "templateflow", "TemplateFlow Documentation", [author], 1)]
175+
man_pages = [(master_doc, 'templateflow', 'TemplateFlow Documentation', [author], 1)]
174176

175177

176178
# -- Options for Texinfo output ----------------------------------------------
@@ -181,12 +183,12 @@
181183
texinfo_documents = [
182184
(
183185
master_doc,
184-
"templateflow",
185-
"TemplateFlow Documentation",
186+
'templateflow',
187+
'TemplateFlow Documentation',
186188
author,
187-
"TemplateFlow",
188-
"One line description of project.",
189-
"Miscellaneous",
189+
'TemplateFlow',
190+
'One line description of project.',
191+
'Miscellaneous',
190192
),
191193
]
192194

@@ -206,38 +208,38 @@
206208
# epub_uid = ''
207209

208210
# A list of files that should not be packed into the epub file.
209-
epub_exclude_files = ["search.html"]
211+
epub_exclude_files = ['search.html']
210212

211213

212214
# -- Extension configuration -------------------------------------------------
213215

214-
apidoc_module_dir = "../templateflow"
215-
apidoc_output_dir = "api"
216+
apidoc_module_dir = '../templateflow'
217+
apidoc_output_dir = 'api'
216218
apidoc_excluded_paths = [
217-
"conftest.py",
218-
"*/tests/*",
219-
"tests/*",
220-
"data/*",
219+
'conftest.py',
220+
'*/tests/*',
221+
'tests/*',
222+
'data/*',
221223
]
222224
apidoc_separate_modules = True
223-
apidoc_extra_args = ["--module-first", "-d 1", "-T"]
225+
apidoc_extra_args = ['--module-first', '-d 1', '-T']
224226

225227
# -- Options for intersphinx extension ---------------------------------------
226228

227229
# Example configuration for intersphinx: refer to the Python standard library.
228230
intersphinx_mapping = {
229-
"bids": ("https://bids-standard.github.io/pybids/", None),
230-
"matplotlib": ("https://matplotlib.org/", None),
231-
"nibabel": ("https://nipy.org/nibabel/", None),
232-
"nipype": ("https://nipype.readthedocs.io/en/latest/", None),
233-
"numpy": ("https://numpy.org/doc/stable/", None),
234-
"pandas": ("http://pandas.pydata.org/pandas-docs/dev", None),
235-
"python": ("https://docs.python.org/3/", None),
236-
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
231+
'bids': ('https://bids-standard.github.io/pybids/', None),
232+
'matplotlib': ('https://matplotlib.org/', None),
233+
'nibabel': ('https://nipy.org/nibabel/', None),
234+
'nipype': ('https://nipype.readthedocs.io/en/latest/', None),
235+
'numpy': ('https://numpy.org/doc/stable/', None),
236+
'pandas': ('http://pandas.pydata.org/pandas-docs/dev', None),
237+
'python': ('https://docs.python.org/3/', None),
238+
'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
237239
}
238240

239241
# -- Options for versioning extension ----------------------------------------
240-
smv_branch_whitelist = r"^master$"
241-
smv_tag_whitelist = r"^\d+\.\d+\.\d+(?!rc|dev).*$"
242+
smv_branch_whitelist = r'^master$'
243+
smv_tag_whitelist = r'^\d+\.\d+\.\d+(?!rc|dev).*$'
242244
smv_released_pattern = r'^tags/.*$'
243245
smv_rebuild_tags = False

docs/environment.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ dependencies:
151151
- readline=8.1=h46c0cb4_0
152152
- requests=2.27.1=pyhd8ed1ab_0
153153
- scipy=1.8.0=py39hee8e79c_1
154-
- setuptools=62.1.0=py39hf3d152e_0
155154
- six=1.16.0=pyh6c4a22f_0
156155
- snowballstemmer=2.2.0=pyhd8ed1ab_0
157156
- soupsieve=2.3.1=pyhd8ed1ab_0
@@ -203,5 +202,8 @@ dependencies:
203202
- nipreps-versions==1.0.3
204203
- pandas==1.4.2
205204
- pybids==0.15.2
206-
- setuptools_scm==7.1.0
207205
- sqlalchemy==1.3.24
206+
- hatchling
207+
- hatch-vcs
208+
- nipreps-versions
209+
- sphinx-click

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Contents
1212

1313
installation
1414
examples
15+
cli
1516
datalad
1617
api
1718
changes

docs/tools/LICENSE.txt

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

0 commit comments

Comments
 (0)