-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maint: migrate to PEP517/518 packaging
- Loading branch information
Showing
12 changed files
with
207 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
ref-names: $Format:%D$ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ | ||
ref-names: $Format:%D$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
sdcflows/_version.py export-subst | ||
.git_archival.txt export-subst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# setuptools-scm | ||
sdcflows/_version.py | ||
_version.py | ||
|
||
# Byte-compiled / optimized / DLL files | ||
pip-wheel-metadata | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,184 @@ | ||
[build-system] | ||
requires = ["setuptools >= 42.0", "wheel", "setuptools_scm[toml] >= 3.4"] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "sdcflows/_version.py" | ||
write_to_template = """\ | ||
\"\"\"Version file, automatically generated by setuptools_scm.\"\"\" | ||
__version__ = "{version}" | ||
""" | ||
fallback_version = "0.0" | ||
requires = ["hatchling", "hatch-vcs", "nipreps-versions"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "sdcflows" | ||
description = "Susceptibility Distortion Correction (SDC) workflows for EPI MR schemes." | ||
readme = "README.rst" | ||
authors = [{name = "The NiPreps Developers", email = "[email protected]"}] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Image Recognition", | ||
"Topic :: Scientific/Engineering :: Bio-Informatics", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
license = "Apache-2.0" | ||
requires-python = ">=3.10" | ||
dependencies = [ | ||
"attrs >= 20.1.0", | ||
"nibabel >=3.1.0", | ||
"nipype >=1.8.5,<2.0", | ||
"traits <6.4", | ||
"niworkflows >= 1.7.0", | ||
"nitransforms >= 23.0.1", | ||
"numpy >= 1.21.0", | ||
"pybids >= 0.15.1", | ||
"scikit-image >= 0.18", | ||
"scipy >= 1.8.1", | ||
"templateflow", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Documentation = "https://www.nipreps.org/sdcflows" | ||
Home = "https://github.com/nipreps/sdcflows" | ||
NiPreps = "https://www.nipreps.org/" | ||
|
||
[project.optional-dependencies] | ||
doc = [ | ||
"attrs >= 20.1.0", | ||
"furo", | ||
"importlib_resources", | ||
"matplotlib >= 2.2.0", | ||
"nibabel", | ||
"nipype >= 1.5.1", | ||
"traits < 6.4", | ||
"niworkflows ~= 1.6.3", | ||
"numpy", | ||
"packaging", | ||
"pydot >= 1.2.3", | ||
"pydotplus", | ||
"sphinx >= 7.2.2", | ||
"sphinxcontrib-apidoc", | ||
"templateflow" | ||
] | ||
|
||
mem = [ | ||
"psutil" | ||
] | ||
|
||
dev = [ | ||
"black", | ||
"pre-commit", | ||
"isort", | ||
"flake8-pyproject", | ||
] | ||
|
||
test = [ | ||
"coverage", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-env", | ||
"pytest-xdist" | ||
] | ||
|
||
# Aliases | ||
docs = ["sdcflows[doc]"] | ||
tests = ["sdcflows[test]"] | ||
all = ["sdcflows[doc,test,mem,dev,test]"] | ||
|
||
[project.scripts] | ||
sdcflows-find-estimators = "sdcflows.cli.find_estimators:main" | ||
|
||
# | ||
# Hatch configurations | ||
# | ||
|
||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|
||
[tool.hatch.build.targets.sdist] | ||
exclude = [".git_archival.txt"] # No longer needed in sdist | ||
|
||
[tool.hatch.build.targets.wheel] | ||
packages = ["sdcflows"] | ||
# exclude = [ | ||
# "sdcflows/tests/data", # Large test data directory | ||
# ] | ||
|
||
## The following two sections configure setuptools_scm in the hatch way | ||
|
||
[tool.hatch.version] | ||
validate-bump = true | ||
source = "vcs" | ||
raw-options = { version_scheme = "nipreps-calver" } | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "sdcflows/_version.py" | ||
|
||
# | ||
# Developer tool configurations | ||
# | ||
|
||
[tool.black] | ||
line-length = 99 | ||
target-version = ['py39'] | ||
skip-string-normalization = true | ||
exclude = ''' | ||
# Directories | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| venv | ||
| _build | ||
| build | ||
| dist | ||
)/ | ||
''' | ||
|
||
[tool.isort] | ||
profile = 'black' | ||
skip_gitignore = true | ||
|
||
[tool.flake8] | ||
max-line-length = "99" | ||
doctests = "False" | ||
exclude = "*build/" | ||
ignore = ["W503", "E203"] | ||
per-file-ignores = [ | ||
"**/__init__.py : F401", | ||
"docs/conf.py : E265", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
norecursedirs = [".git"] | ||
addopts = "-svx --doctest-modules" | ||
doctest_optionflags = "ALLOW_UNICODE NORMALIZE_WHITESPACE ELLIPSIS" | ||
env = "PYTHONHASHSEED=0" | ||
filterwarnings = ["ignore::DeprecationWarning"] | ||
junit_family = "xunit2" | ||
|
||
|
||
[tool.coverage.run] | ||
branch = true | ||
concurrency = 'multiprocessing' | ||
omit = [ | ||
'*/tests/*', | ||
'*/__init__.py', | ||
'*/conftest.py', | ||
'sdcflows/_version.py' | ||
] | ||
|
||
[tool.coverage.report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = [ | ||
'raise NotImplementedError', | ||
'warnings\.warn', | ||
] | ||
|
||
[tool.codespell] | ||
# nd - import scipy.ndimage as nd | ||
# mapp, reson -- Mapp. and Reson. abbreviations in citation | ||
ignore-words-list = 'nd,mapp,reson' | ||
skip = """ | ||
./.git,*.pdf,*.svg,*.min.js,*.ipynb,ORIGINAL_LICENSE,\ | ||
./docs/source/_static/example_anatreport.html""" |
Oops, something went wrong.