junifer/pyproject.toml
2026-03-31 11:37:03 +02:00

307 lines
6.9 KiB
TOML

[build-system]
requires = ["setuptools>=70", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "junifer"
description = "JUelich NeuroImaging FEature extractoR"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "AGPL-3.0-only"}
authors = [
{ name = "Fede Raimondo", email = "f.raimondo@fz-juelich.de" },
{ name = "Synchon Mandal", email = "s.mandal@fz-juelich.de" },
]
maintainers = [
{ name = "Fede Raimondo", email = "f.raimondo@fz-juelich.de" },
{ name = "Synchon Mandal", email = "s.mandal@fz-juelich.de" },
]
keywords = [
"neuroimaging",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"Natural Language :: English",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"click>=8.1.3,<8.2",
"numpy>=1.26.0,<2.4.0",
"scipy>=1.10.0,<1.17.0",
"datalad>=1.0.0,<1.3.0",
"pandas>=2.0.0,<2.4.0",
"nibabel>=5.2.0,<5.4.0",
"nilearn>=0.10.3,<=0.10.4",
"sqlalchemy>=2.0.25,<=2.1.0",
"ruamel.yaml>=0.17,<0.19",
"h5py>=3.10",
"tqdm>=4.66.1,<4.68.0",
"templateflow>=23.0.0,<25.0.0",
"lapy>=1.0.0,<2.0.0",
"lazy_loader==0.4",
"importlib_metadata; python_version<'3.9'",
"looseversion==1.3.0; python_version>='3.12'",
"junifer_data==1.3.0",
"structlog>=25.0.0,<26.0.0",
"pydantic>=2.11.4",
"aenum>=3.1.0,<3.2.0",
"typing_extensions>=4.15.0,<4.16.0; python_version<'3.12'",
]
dynamic = ["version"]
[project.urls]
Changelog = "https://juaml.github.io/junifer/main/whats_new.html"
Documentation = "https://juaml.github.io/junifer"
Homepage = "https://juaml.github.io/junifer"
Source = "https://github.com/juaml/junifer"
[project.scripts]
junifer = "junifer.cli.cli:cli"
[project.optional-dependencies]
all = [
"bctpy==0.6.0",
"neurokit2>=0.1.7",
]
bct = ["bctpy==0.6.0"]
onthefly = [
"bctpy==0.6.0"
]
neurokit2 = ["neurokit2>=0.1.7"]
dev = [
"tox",
"pre-commit",
"ruff",
"towncrier",
]
docs = [
"seaborn>=0.13.0,<0.14.0",
"sphinx>=7.3.0,<8.4.0",
"sphinx-gallery>=0.17.0,<0.20.0",
"furo>=2024.4.27,<2025.10.0",
"numpydoc>=1.6.0,<=1.9.0",
"julearn==0.3.3",
"sphinx-copybutton>=0.5.1,<0.5.3",
"towncrier>=24.7.0,<=25.8.0",
"sphinxcontrib-mermaid>=0.8.1,<=1.0.0",
"sphinxcontrib-towncrier==0.5.0a0",
"setuptools-scm>=8",
"autodoc_pydantic>=2.0.0",
"enum-tools[sphinx]>=0.13.0,<0.14.0",
]
################
# Tool configs #
################
[tool.setuptools]
packages = [
"junifer",
"junifer.external.h5io.h5io",
"junifer.external.BrainPrint.brainprint",
"junifer.external.BrainPrint.brainprint.utils",
]
[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"
write_to = "junifer/_version.py"
[tool.codespell]
skip = "*/auto_examples/*,*.html,.git/,*.pyc,*/_build/*,*/h5io/*,*/BrainPrint/*,uv.lock"
count = ""
quiet-level = 3
ignore-words = "ignore_words.txt"
interactive = 0
builtin = "clear,rare,informal,names,usage,code"
[tool.ruff]
line-length = 79
extend-exclude = [
"__init__.py",
"__init__.pyi",
"junifer/external/h5io",
"junifer/external/BrainPrint",
"docs",
"examples",
"tools",
]
[tool.ruff.lint]
select = [
# flake8-bugbear
"B",
# flake8-blind-except
"BLE",
# flake8-comprehensions
"C4",
# mccabe
"C90",
# pydocstyle
"D",
# pycodestyle errors
"E",
# pyflakes
"F",
# isort
"I",
# pep8-naming
"N",
# pygrep-hooks
"PGH",
# ruff
"RUF",
# flake8-type-checking
"TCH",
# pyupgrade
"UP",
# pycodestyle warnings
"W",
# flake8-2020
"YTT",
]
ignore = [
# Use of `functools.lru_cache` or `functools.cache` on methods can lead to
# memory leaks. The cache may retain instance references, preventing garbage
# collection.
"B019",
# abstract class with no abstract methods
"B024",
"D202",
# missing docstring in __init__, incompatible with numpydoc
"D107",
# use r""" if any backslashes in a docstring
"D301",
# class names should use CapWords convention
"N801",
# function name should be lowercase
"N802",
# variable in function should be lowercase
"N806",
# use specific rule codes when ignoring type issues
"PGH003",
]
[tool.ruff.lint.isort]
lines-after-imports = 2
known-first-party = ["junifer"]
known-third-party = [
"click",
"numpy",
"scipy",
"datalad",
"pandas",
"nibabel",
"nilearn",
"sqlalchemy",
"yaml",
"importlib_metadata",
"tqdm",
"templateflow",
"bct",
"neurokit2",
"brainprint",
"lapy",
"structlog",
"pytest",
"junifer_data",
]
[tool.ruff.lint.mccabe]
max-complexity = 20
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = "junifer"
log_cli_level = "INFO"
xfail_strict = true
addopts = [
"-ra",
"--strict-config",
"--strict-markers",
"--ignore=junifer/external/h5io",
"--ignore=junifer/external/BrainPrint",
"-vv",
]
[tool.towncrier]
directory = "docs/changes/newsfragments"
filename = "docs/whats_new.rst"
package = "junifer"
# to use gh_substitutions
issue_format = ":gh:`{issue}`"
# modify to have proper toctree
underlines = "-^~"
# set line length to 79
wrap = true
# Need to put default explicitly as custom is not combined with default
[tool.towncrier.fragment.bugfix]
name = "Bugfixes"
showcontent = true
[tool.towncrier.fragment.doc]
name = "Improved Documentation"
showcontent = true
[tool.towncrier.fragment.feature]
name = "Features"
showcontent = true
[tool.towncrier.fragment.misc]
name = "Miscellaneous"
showcontent = true
[tool.towncrier.fragment.removal]
name = "Deprecations and Removals"
showcontent = true
# Add custom towncrier fragment for enhancements
[tool.towncrier.fragment.enh]
name = "Enhancements"
showcontent = true
# Add custom towncrier fragment for API changes
[tool.towncrier.fragment.change]
name = "API Changes"
showcontent = true
[tool.coverage.paths]
source = [
"junifer",
"*/site-packages/junifer",
]
[tool.coverage.run]
branch = true
omit = [
"*/setup.py",
"*/_version.py",
"*/tests/*",
"*/junifer/configs/*",
"*/junifer/external/h5io/*",
"*/junifer/external/BrainPrint/*",
]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Type checking if statements should not be considered
"if TYPE_CHECKING:",
# Don't complain if non-runnable code isn't run:
"if __name__ == .__main__.:",
]
precision = 2