This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
MAINT: Migrate to PEP517/518 packaging #128
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f8ec76d
maint: migrate to PEP517/518 packaging
esavary afdd6f8
fix : update docs build update and docs build PR
esavary e4b5b6f
fix: package path
esavary fd109a4
Merge branch 'nipreps:main' into maint/migrate-to-pep517-8
esavary 238fb09
fix: remove unused line
esavary 4b8eb77
sty: black + flake8
esavary ea1d68d
MNT: Remove linter/formatter pins, add flake8-pyproject
effigies dd88ede
MNT: Rerun black/isort
effigies a6073ef
CI: Update flake8 test, apply fix
effigies 5776011
CI: Remove unnecessary package installations, pip versions
effigies de55b62
Rebuild _version.py files
effigies d27a448
CI: Minor cleanups, test on more Python versions
effigies a9d8a5e
CI: Build docs
effigies 82ce93e
DOC: Update requirements
effigies f312b43
DOC: Address Sphinx warnings
effigies ccc4586
MNT: Update doc extra to match docs/requirements
effigies 91580f8
Merge branch 'main' into maint/migrate-to-pep517-8
effigies b1ac626
fix: remove unused files
esavary File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 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
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,6 +1,7 @@ | ||
attrs >= 20.1.0 | ||
furo ~= 2021.10.09 | ||
furo >= 2024.01.29 | ||
matplotlib >= 2.2.0 | ||
packaging | ||
sphinx ~= 4.2 | ||
sphinx >= 4.5 | ||
sphinxcontrib-apidoc | ||
nireports |
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,15 +1,183 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 45", | ||
"setuptools_scm[toml] >= 6.2", | ||
"wheel" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "src/eddymotion/_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 = "eddymotion" | ||
description = "Pure python eddy-current and head-motion correction for dMRI, an extension of QSIprep's SHOREline algorithm (Cieslak, 2020) to multiple diffusion models." | ||
readme = "README.rst" | ||
authors = [{name = "The NiPreps Developers", email = "[email protected]"}] | ||
classifiers = [ | ||
"Development Status :: 3 - 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 = [ | ||
"dipy>=1.3.0", | ||
"joblib", | ||
"nipype>= 1.5.1, < 2.0", | ||
"nitransforms>=21.0.0", | ||
"nireports", | ||
"numpy>=1.17.3", | ||
"nest-asyncio>=1.5.1", | ||
"scikit-image>=0.14.2", | ||
"scipy>=1.8.0", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Documentation = "https://www.nipreps.org/eddymotion" | ||
Home = "https://github.com/nipreps/eddymotion" | ||
NiPreps = "https://www.nipreps.org/" | ||
|
||
[project.optional-dependencies] | ||
doc = [ | ||
"attrs >= 20.1.0", | ||
"furo >= 2024.01.29", | ||
"matplotlib >= 2.2.0", | ||
"nbsphinx", | ||
"packaging", | ||
"pydot >= 1.2.3", | ||
"pydotplus", | ||
"sphinx >= 4.5", | ||
"sphinx-argparse", | ||
"sphinx_rtd_theme", | ||
"sphinxcontrib-apidoc ~= 0.3.0", | ||
"sphinxcontrib-napoleon", | ||
"sphinxcontrib-versioning" | ||
effigies marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
|
||
dev = [ | ||
"black", | ||
"flake8", | ||
"flake8-pyproject", | ||
"isort", | ||
"pre-commit", | ||
"pre-commit-hooks", | ||
] | ||
|
||
plotting = ["nilearn"] | ||
|
||
resmon = ["psutil >=5.4"] | ||
|
||
popylar = ["popylar >= 0.2"] | ||
|
||
test = [ | ||
"coverage", | ||
"pytest >= 4.4", | ||
"pytest-cov", | ||
"pytest-env", | ||
"pytest-xdist >= 1.28" | ||
] | ||
|
||
# Aliases | ||
docs = ["eddymotion[doc]"] | ||
tests = ["eddymotion[test]"] | ||
all = ["eddymotion[doc,test,dev,plotting,resmon,popylar]"] | ||
|
||
# | ||
# 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 = ["src/eddymotion"] | ||
# exclude = [ | ||
# "eddymotion/tests/data", # 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 = "src/eddymotion/_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] | ||
pythonpath = "src/ test/" | ||
norecursedirs = [".*", "_*"] | ||
addopts = "-v --doctest-modules" | ||
doctest_optionflags = "ALLOW_UNICODE NORMALIZE_WHITESPACE" | ||
env = "PYTHONHASHSEED=0" | ||
filterwarnings = ["ignore::DeprecationWarning"] | ||
|
||
|
||
[tool.coverage.run] | ||
branch = true | ||
concurrency = 'multiprocessing' | ||
omit = [ | ||
'*/tests/*', | ||
'*/__init__.py', | ||
'*/conftest.py', | ||
'src/eddymotion/_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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this change will work -- let's keep an eye on this. I remember pinning furo because of some weird dependency failing in more recent builds. Perhaps they figured out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I built it locally.