forked from pymedphys/pymedphys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
304 lines (273 loc) · 9.27 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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
[tool.poetry]
name = "pymedphys"
version = "0.41.0-dev0"
readme = "README.rst"
description = "Medical Physics library"
authors = ["PyMedPhys Contributors <[email protected]>"]
license = "Apache-2.0"
homepage = "https://pymedphys.com"
repository = "https://github.com/pymedphys/pymedphys"
documentation = "https://docs.pymedphys.com"
classifiers = [
"Development Status :: 4 - Beta",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Topic :: Scientific/Engineering :: Physics",
"Intended Audience :: Science/Research",
"Intended Audience :: Healthcare Industry",
]
packages = [{ include = "pymedphys", from = "lib" }]
include = ["lib/pymedphys/docs/_build/html/**/*"]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
typing-extensions = "*"
setuptools = "*"
tomlkit = "*"
# ------- #
# Library #
# ------- #
tqdm = { version = "*", optional = true } # groups = ["user", "all", "tests", "docs"]
attrs = { version = "*", optional = true } # groups = ["user", "all", "mosaiq"]
watchdog = { version = "*", optional = true } # groups = ["user", "all"]
keyring = { version = "*", optional = true } # groups = ["user", "all"]
packaging = { version = "*", optional = true } # groups = ["user", "all"]
PyYAML = { version = "*", optional = true } # groups = ["user", "all"]
requests = { version = "*", optional = true } # groups = ["user", "all"]
python-dateutil = { version = "*", optional = true } # groups = ["user", "all", "tests"]
matplotlib = { version = "*", optional = true } # groups = ["user", "all", "docs"]
scipy = { version = "*", optional = true } # groups = ["user", "all", "docs"]
pymssql = { version = "*", optional = true } # groups = ["user", "all", "mosaiq"]
sqlalchemy = { version = "*", optional = true } # groups = ["user", "all", "mosaiq"]
natsort = { version = "*", optional = true } # groups = ["user", "all"]
toml = { version = "*", optional = true } # groups = ["user", "cli", "all", "mosaiq", "docs"]
pynetdicom = { version = "*", optional = true } # groups = ["user", "all", "dicom"]
dbfread = { version = "*", optional = true } # groups = ["user", "all"]
xmltodict = { version = "*", optional = true } # groups = ["user", "all"]
timeago = { version = "*", optional = true } # groups = ["user", "all"]
dicompyler-core = { version = "*", optional = true } # groups = ["user", "all"]
scikit-learn = { version = "*", optional = true } # groups = ["user", "all", "mosaiq"]
imageio = { version = "*", optional = true } # groups = ["user", "all"]
streamlit = { version = "~1.34.0", optional = true } # groups = ["user", "all"]
numba = { version = "*", optional = true } # groups = ["user", "all", "docs", "tests"]
numpy = { version = ">=1.26", optional = true } # groups = ["user", "all", "icom", "docs"]
# The following lower bounded packages are due to certain APIs utilised
pandas = { version = ">=1.0.0", optional = true } # groups = ["user", "all", "mosaiq"]
pydicom = { version = ">=2.0.0", optional = true } # groups = ["user", "all", "dicom", "docs"]
# The following lower bounds are so that the versions with wheels are utilised
# for the installation
shapely = { version = ">=1.7.0", optional = true } # groups = ["user", "all"]
pylibjpeg-libjpeg = { version = ">=1.3.2", optional = true } # groups = ["user", "all"]
# AI
anthropic = { version = "0.29.0", optional = true } # groups = ["user", "all"]
trio = { version = ">=0.25.0", optional = true } # groups = ["user", "all"]
trio-asyncio = { version = "*", optional = true } # groups = ["user", "all"]
anyio = { version = "*", optional = true } # groups = ["user", "all"]
# ---- #
# CVEs #
# ---- #
# CVE-2021-32559 <https://github.com/advisories/GHSA-hwfp-hg2m-9vr2>
pywin32 = { version = ">=301", optional = true, platform = "win32" } # groups = ["user", "all"]
# CVE-2022-21699 <https://github.com/advisories/GHSA-pq7m-3gw7-gq5x>
ipython = { version = ">=7.31.1", optional = true } # groups = ["docs", "all"]
# CVE-2022-22817 <https://github.com/advisories/GHSA-8vj2-vxx3-667w>
Pillow = { version = ">=9.0.0", optional = true } # groups = ["user", "all"]
# ----------- #
# Comparables #
# ----------- #
flashgamma = { version = "*", optional = true } # groups = ["comparables"]
# ------------- #
# Documentation #
# ------------- #
sphinx-argparse = { version = "*", optional = true } # groups = ["all", "docs"]
# sphinx-ext-napoleon = { version = "*", optional = true } # groups = ["all", "docs"]
sphinx-book-theme = { version = "*", optional = true } # groups = ["all", "docs", "doctests"]
jupyter-book = { version = ">=0.12.0", optional = true } # groups = ["all", "docs"]
networkx = { version = "*", optional = true } # groups = ["all", "docs"]
# ----- #
# Tests #
# ----- #
pytest = { version = "*", optional = true } # groups = ["all", "tests"]
pytest-sugar = { version = "*", optional = true } # groups = ["all", "tests"]
astroid = { version = "*", optional = true } # groups = ["all", "tests"]
psutil = { version = "*", optional = true } # groups = ["all", "tests"]
pylint = { version = "*", optional = true } # groups = ["all", "tests"]
pytest-rerunfailures = { version = "*", optional = true } # groups = ["all", "tests"]
# ---------------- #
# Development Only #
# ---------------- #
pre-commit = { version = "*", optional = true } # groups = ["dev", "all"]
ruff = { version = "0.4.1", optional = true } # groups = ["dev", "all", "propagate", "doctests"]
pyright = { version = "1.1.359", optional = true } # groups = ["dev", "all"]
rope = { version = "*", optional = true } # groups = ["dev", "all"]
doc8 = { version = "*", optional = true } # groups = ["dev", "all"]
readme-renderer = { version = "*", optional = true } # groups = ["dev", "all"]
tabulate = { version = "*", optional = true } # groups = ["dev", "all", "doctests"]
[tool.poetry.extras]
all = [
"Pillow",
"PyYAML",
"anthropic",
"anyio",
"astroid",
"attrs",
"dbfread",
"dicompyler-core",
"doc8",
"imageio",
"ipython",
"jupyter-book",
"keyring",
"matplotlib",
"natsort",
"networkx",
"numba",
"numpy",
"packaging",
"pandas",
"pre-commit",
"psutil",
"pydicom",
"pylibjpeg-libjpeg",
"pylint",
"pymssql",
"pynetdicom",
"pyright",
"pytest",
"pytest-rerunfailures",
"pytest-sugar",
"python-dateutil",
"pywin32",
"readme-renderer",
"requests",
"rope",
"ruff",
"scikit-learn",
"scipy",
"shapely",
"sphinx-argparse",
"sphinx-book-theme",
"sqlalchemy",
"streamlit",
"tabulate",
"timeago",
"toml",
"tqdm",
"trio",
"trio-asyncio",
"watchdog",
"xmltodict",
]
cli = ["toml"]
comparables = ["flashgamma"]
dev = [
"doc8",
"pre-commit",
"pyright",
"readme-renderer",
"rope",
"ruff",
"tabulate",
]
dicom = ["pydicom", "pynetdicom"]
docs = [
"ipython",
"jupyter-book",
"matplotlib",
"networkx",
"numba",
"numpy",
"pydicom",
"scipy",
"sphinx-argparse",
"sphinx-book-theme",
"toml",
"tqdm",
]
doctests = ["ruff", "sphinx-book-theme", "tabulate"]
icom = ["numpy"]
mosaiq = ["attrs", "pandas", "pymssql", "scikit-learn", "sqlalchemy", "toml"]
propagate = ["ruff"]
tests = [
"astroid",
"numba",
"psutil",
"pylint",
"pytest",
"pytest-rerunfailures",
"pytest-sugar",
"python-dateutil",
"tqdm",
]
user = [
"Pillow",
"PyYAML",
"anthropic",
"anyio",
"attrs",
"dbfread",
"dicompyler-core",
"imageio",
"keyring",
"matplotlib",
"natsort",
"numba",
"numpy",
"packaging",
"pandas",
"pydicom",
"pylibjpeg-libjpeg",
"pymssql",
"pynetdicom",
"python-dateutil",
"pywin32",
"requests",
"scikit-learn",
"scipy",
"shapely",
"sqlalchemy",
"streamlit",
"timeago",
"toml",
"tqdm",
"trio",
"trio-asyncio",
"watchdog",
"xmltodict",
]
[tool.poetry.scripts]
pymedphys = "pymedphys.__main__:main"
[tool.ruff.lint]
# These were the existing issues when first migrating to ruff, we can feel
# free to remove these an iteratively tighten the belt if so desired.
extend-ignore = [
# "F401", # imported but unused
# "E741", # Ambiguous variable name
# "E722", # Do not use bare `except`
]
[tool.ruff.lint.isort]
known-third-party = ["pymedphys._imports"]
known-first-party = ["pymedphys"]
[tool.pyright]
include = ["lib/pymedphys"]
# These have been set to False in order to be able to utilise pyright, but
# future work would be to iteratively set these to true and fix the code base.
reportMissingImports = false
reportGeneralTypeIssues = false
reportUnboundVariable = false
reportOptionalMemberAccess = false
reportOptionalSubscript = false
reportOptionalOperand = false
reportOptionalCall = false
reportOptionalIterable = false
reportPrivateImportUsage = false
reportArgumentType = false
reportCallIssue = false
reportOperatorIssue = false
reportAttributeAccessIssue = false
reportAssignmentType = false
reportIndexIssue = false
reportReturnType = false
reportMissingModuleSource = false
reportTypedDictNotRequiredAccess = false
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"