-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from nipreps/fix/adopt-pep517-8-build
MAINT: Initate porting to PEP517/8
- Loading branch information
Showing
5 changed files
with
201 additions
and
189 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
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,157 @@ | ||
[build-system] | ||
requires = ["setuptools>=45, <58", "wheel", "setuptools_scm>=6.2"] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "mriqc_learn/_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 = "mriqc-learn" | ||
description = "Learning on MRIQC-generated image quality metrics (IQMs)." | ||
readme = "README.md" | ||
authors = [{name = "The NiPreps Developers", email = "nipreps@gmail.com"}] | ||
classifiers = [ | ||
"Development Status :: 2 - Pre-Alpha", | ||
"Intended Audience :: Science/Research", | ||
"Topic :: Scientific/Engineering :: Image Recognition", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
license = "Apache-2.0" | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"numpy", | ||
"joblib", | ||
"pandas", | ||
"scikit-learn", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Home = "https://github.com/nipreps/mriqc-learn" | ||
|
||
[project.optional-dependencies] | ||
doc = [ | ||
"furo >= 2024.01.29", | ||
"pydot >= 1.2.3", | ||
"pydotplus", | ||
"sphinx >= 4.5", | ||
"sphinxcontrib-apidoc", | ||
"sphinxcontrib-napoleon", | ||
] | ||
|
||
mem = [ | ||
"psutil", | ||
] | ||
|
||
test = [ | ||
"codecov", | ||
"coverage", | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-env", | ||
"pytest-xdist", | ||
] | ||
|
||
# Aliases | ||
docs = ["mriqc-learn[doc]"] | ||
tests = ["mriqc-learn[test]"] | ||
all = ["mriqc-learn[doc,test,mem]"] | ||
|
||
# | ||
# 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 = ["mriqc_learn"] | ||
# exclude = [ | ||
# "mriqc_learn/tests/largedata", # Large test data directory | ||
# ] | ||
|
||
|
||
[tool.hatch.version] | ||
validate-bump = true | ||
source = "vcs" | ||
raw-options = { version_scheme = "nipreps-calver" } | ||
|
||
[tool.hatch.build.hooks.vcs] | ||
version-file = "mriqc_learn/_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/", "docs/"] | ||
select = "C,E,F,W,B,B950" | ||
ignore = "N802,N806,W503,E203" | ||
per-file-ignores = [ | ||
"*/__init__.py: F401", | ||
"docs/conf.py: E265", | ||
"/^\\s*\\.\\. _.*?: http/: E501" | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
norecursedirs = [".*", "_*"] | ||
addopts = "-vsx --doctest-modules" | ||
doctest_optionflags = "ALLOW_UNICODE NORMALIZE_WHITESPACE NUMBER" | ||
env = "PYTHONHASHSEED=0" | ||
filterwarnings = ["ignore::DeprecationWarning"] | ||
|
||
|
||
[tool.coverage.run] | ||
branch = true | ||
concurrency = 'multiprocessing' | ||
omit = [ | ||
'*/tests/*', | ||
'*/__init__.py', | ||
'*/conftest.py', | ||
'mriqc_learn/_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.