-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
207 lines (189 loc) · 6.02 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "eitprocessing"
version = "1.4.5"
description = "Processing of lung image data from electrical impedance tomography."
readme = "README.md"
requires-python = ">=3.10"
keywords = [
"Mechanical lung ventilation",
"Electrical impedance tomography",
"Image/data processing",
"Advanced respiratory care",
]
authors = [
{ name = "Dani Bodor", email = "d.bodor@esciencecenter.nl" },
{ name = "Peter Somhorst", email = "p.somhorst@erasmusmc.nl" },
{ name = "Annemijn Jonkman", email= "a.jonkman@erasmusmc.nl"},
{ name = "Walter Baccinelli", email = "w.baccinelli@esciencecenter.nl" },
{ name = "Jantine Wisse-Smit", email = "j.j.smit@erasmusmc.nl"},
{ name = "Juliette Francovich", email = "j.francovich@erasmusmc.nl"}
]
license = { text = "Apache-2.0 license" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"matplotlib >= 3.7.1",
"numpy >= 1.24.2",
"scipy >= 1.10.1",
"strenum >= 0.4.10",
"anytree >= 2.12.1 ",
"typing_extensions",
"pyyaml",
]
[project.optional-dependencies]
# development dependency groups
dev = [
"pytest >= 7.4.0",
"bump-my-version",
"coverage",
"pytest-cov",
"coveralls",
"ruff == 0.6.9",
]
testing = [
"pytest >= 7.4.0",
"pytest-cov",
"coveralls",
]
docs = [
"mkdocs",
"mkdocs-material",
"mkdocstrings",
"mkdocstrings-python",
"mkdocs-exclude",
"mike",
"pymdown-extensions",
"black",
]
notebooks = [
"jupyter >= 1.0.0",
"jupytext >= 1.14.5",
"tqdm >= 4.65.0",
"ipympl"
]
publishing = ["build"]
[project.urls]
Documentation = "https://github.com/EIT-ALIVE/eitprocessing/blob/main/README.md"
Repository = "https://github.com/EIT-ALIVE/eitprocessing/"
Changelog = "https://github.com/EIT-ALIVE/eitprocessing/blob/main/CHANGELOG.md"
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.coverage.run]
branch = true
source = ["eitprocessing"]
command_line = "-m pytest"
[tool.coverage.report]
exclude_lines = ["if TYPE_CHECKING:"]
[tool.setuptools.packages.find]
include = ["eitprocessing*", "eitprocessing.*"]
exclude = ["tests*", "*tests.*", "*tests"]
[tool.setuptools.package-data]
eitprocessing = ["config/*.yaml", "py.typed"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py37,py38,py39,py310,py311
skip_missing_interpreters = true
[testenv]
commands = pytest
extras = dev
"""
[tool.ruff]
output-format = "concise"
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
pydocstyle.convention = "google" # docstring settings
ignore = [
# Unwanted (potentially)
"FBT", # Using boolean arguments
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**kwargs`
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"ANN204", # Missing return type annotation for special (dunder) method
"S105", # Possible hardcoded password
"S311", # insecure random generators
"PT011", # pytest-raises-too-broad
"PD011", # Use of .values. Assumes .values refers to pandas dataframes, not object attributes
"TD", # TODOs
"FIX002", # Resolve TODOs
"B028", # No explicit `stacklevel` keyword argument found in warning
# "SIM108", # Use ternary operator (not sure if we want to ignore this)
# Unneeded docstrings
"D100", # Missing module docstring
"D104", # Missing public package docstring
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"COM812", # missing trailing comma
"ISC001", # single line implicit string concatenation
]
# Set autofixing.
fixable = ["ALL"]
unfixable = [
"F401", # unused imports (should not disappear while editing)
"RUF100", # unused noqa (should not disappear while editing)
"B905", # autofill strictness of zip (think about preferred behavior)
]
extend-safe-fixes = [
"D415", # First line should end with a period, question mark, or exclamation point
"D300", # Use triple double quotes `"""`
"D200", # One-line docstring should fit on one line
"TCH", # Format type checking only imports
"ISC001", # Implicitly concatenated strings on a single line
"EM", # Exception message variables
"RUF013", # Implicit Optional
"B006", # Mutable default argument
"TID252", # Absolute imports over relative imports
]
# Override default settings for specific rules
pylint.max-args = 9
flake8-tidy-imports.ban-relative-imports = "all" # Disallow all relative imports.
isort.known-first-party = ["eitprocessing"]
[tool.ruff.lint.per-file-ignores]
"*.ipynb" = [
"ERA001",
"T201",
"T203",
] # Commented out code, print() / pprint() statement
"notebooks/**/*.py" = [
"ERA001",
"T201",
"T203",
] # Commented out code, print() / pprint() statement
"tests/*" = [
"S101", # Use of `assert` detected
"ANN201", # Missing return type
"D103", # Missing function docstring
"PLR2004", # Comparison against unnamed value
"SLF001", # Private member accessed
]
"docs/*" = ["ALL"]
[tool.bumpversion]
current_version = "1.4.5"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = 'version: "{current_version}"'
replace = 'version: "{new_version}"'
[[tool.bumpversion.files]]
filename = "eitprocessing/__init__.py"
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'