-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
193 lines (173 loc) · 5.03 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools-git-versioning>=2.0,<3"]
build-backend = "setuptools.build_meta:__legacy__"
[tool.setuptools-git-versioning]
count_commits_from_version_file = true
enabled = true
version_file = "src/mrpro/VERSION"
template = "{tag}{env:MRPROVERSIONSUFFIX:''}"
dev_template = "{tag}{env:MRPROVERSIONSUFFIX:''}"
dirty_template = "{tag}+dirty{sha}"
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
"mrpro" = ["VERSION"]
[project]
name = "mrpro"
description = "MR image reconstruction and processing package specifically developed for PyTorch."
readme = "README.md"
requires-python = ">=3.10,<3.14"
dynamic = ["version"]
keywords = ["MRI, reconstruction, processing, PyTorch"]
authors = [
{ name = "MRpro Team", email = "[email protected]" },
{ name = "Christoph Kolbitsch", email = "[email protected]" },
{ name = "Patrick Schuenke", email = "[email protected]" },
{ name = "Felix Zimmermann", email = "[email protected]" },
{ name = "David Schote", email = "[email protected]" },
{ name = "Sherine Brahma", email = "[email protected]" },
{ name = "Mara Guastini", email = "[email protected]" },
{ name = "Johannes Hammacher", email = "[email protected]" },
{ name = "Stefan Martin", email = "[email protected]" },
{ name = "Andreas Kofler", email = "[email protected]" },
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = [
"numpy>=1.23, <2.0",
"torch>=2.3",
"ismrmrd>=1.14.1",
"einops",
"pydicom>=2.3",
"pypulseq>=1.4.2",
"torchkbnufft>=1.4.0",
"scipy>=1.12",
"ptwt>=0.1.8",
"typing-extensions>=4.12",
]
[project.optional-dependencies]
test = [
"coverage",
"codecov",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-xdist",
]
docs = ["sphinx", "sphinx_rtd_theme", "sphinx-pyproject"]
notebook = [
"zenodo_get",
"ipykernel",
"ipywidgets",
"jupytext",
"matplotlib",
"pip-tools",
]
[project.urls]
"Documentation" = "https://ptb-mr.github.io/mrpro/"
# PyTest section
[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = [
"error",
"ignore:'write_like_original':DeprecationWarning:pydicom:",
"ignore:Anomaly Detection has been enabled:UserWarning", #torch.autograd
]
addopts = "-n auto"
markers = ["cuda : Tests only to be run when cuda device is available"]
# MyPy section
[tool.mypy]
warn_return_any = false
check_untyped_defs = true
warn_no_return = true
warn_unreachable = true
exclude = ["docs"]
enable_error_code = ["ignore-without-code"]
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = [
"ismrmrd.*",
"h5py",
"scipy.*",
"torchkbnufft",
"pypulseq",
"zenodo_get",
"ptwt.*",
"pywt.*",
]
ignore_missing_imports = true
[tool.ruff]
line-length = 120
extend-exclude = ["__init__.py"]
exclude = ["docs/**"]
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"COM", # flake8-commas
"D", # pydocstyle
"E", # pycodestyle errors
"F", # Pyflakes
"FA", # flake8-future-annotations
"I", # isort
"N", # pep8-naming
"NPY", # NumPy-specific rules
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"UP", # pyupgrade
"PIE", # flake8-pie
# "PL", # PyLint
"PTH", # flake8-use-pathlib
"T20", # flake8-print
"Q", # flake8-quotes
"W", # pycodestyle warnings
"YTT", # flake8-2020
"ERA", # flake8-eradicate
]
extend-select = [
"ANN001", # type annotation for function argument
"ANN201", # return type annonation public function
"ANN205", # return type annonation static method
"ANN401", # any type annotation
"BLE001", # blind exception
"D107", # missing docstring in __init__
"D417", # undocumented-parameter
]
ignore = [
"N999", # invalid module name
"COM812", # missing-trailing-comma (conflict with formatter)
"SIM108", # if-else-block-instead-of-if-exp
]
[tool.ruff.lint.isort]
force-single-line = false
split-on-trailing-comma = false
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.format]
quote-style = "single"
skip-magic-trailing-comma = false
[tool.typos.default]
locale = "en-us"
[tool.typos.default.extend-words]
Reson = "Reson" # required for Proc. Intl. Soc. Mag. Reson. Med.
iy = "iy"
daa = 'daa' # required for wavelet operator
gaus = 'gaus' # required for wavelet operator
[tool.typos.files]
extend-exclude = [
"examples/*.ipynb",
] # don't check notebooks because py files have already been checked
[tool.coverage.paths]
source = ["src", "*/site-packages"]