-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (121 loc) · 4.07 KB
/
Copy pathpyproject.toml
File metadata and controls
139 lines (121 loc) · 4.07 KB
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
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry-dynamic-versioning]
enable = true
[tool.poetry]
exclude = ["examples", "benchmark"]
version = "0.0.0"
[project]
name = "panoptica"
dynamic = ["version"]
description = "Panoptic Quality (PQ) computation for binary masks."
authors = [
{ name = "Hendrik Möller", email = "hendrik.moeller@tum.de" },
{ name = "Florian Kofler", email = "florian.kofler@tum.de" },
]
readme = "README.md"
requires-python = ">=3.10,<4.0"
license = { file = "LICENSE" }
keywords = ["panoptic", "quality", "segmentation", "medical imaging"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"numpy>=1.22,<2.3",
"connected-components-3d>=3.12.3,<4.0.0",
"scipy>=1.7.0,<2.0.0",
"rich>=13.6.0,<14.0.0",
"scikit-image>=0.22.0,<1.0.0",
"ruamel.yaml>=0.18.6,<1.0.0",
"plotly>=5.16.1,<6.0.0",
"pandas>=2.1.0,<3.0.0",
"typer>=0.15.0,<1.0.0",
"tqdm>=4.62.3",
]
[project.urls]
repository = "https://github.com/BrainLesion/panoptica"
homepage = "https://github.com/BrainLesion/panoptica"
documentation = "https://panoptica.readthedocs.io/"
[dependency-groups]
nifti = [
"nibabel>=5.1.0,<6.0.0",
"pynrrd>=1.1.3,<2.0.0",
"SimpleITK>=2.2.2,<3.0.0",
]
test = [
{ include-group = "nifti" },
"pytest>=8.1.1",
"joblib>=1.3.2,<2.0.0",
"coverage>=7.0.1",
"pytest-mock>=3.6.0,<4.0.0",
"future>=0.18.3, <1.0.0",
]
lint = [
"ruff>=0.11.0",
"mypy>=1.10.0",
]
docs = [
"Sphinx>=7.0.0",
"sphinx-copybutton>=0.5.2,<1.0.0",
"furo>=2024.8.6",
"myst-parser>=2.0.0",
]
dev = [
{ include-group = "test" },
{ include-group = "docs" },
{ include-group = "lint" },
"pre-commit>=2.20.0,<3.0.0",
"torch>=2.1.0,<3.0.0",
]
[tool.poetry.group.nifti]
optional = true
[tool.poetry.group.test]
optional = true
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.lint]
optional = true
[project.optional-dependencies]
gpu = ["torch>=2.1.0,<3.0.0"]
[tool.poetry.scripts]
panopticacli = "panoptica.cli:app"
[tool.ruff]
line-length = 88
target-version = "py310"
extend-exclude = ["docs", "examples", "benchmark"]
[tool.ruff.lint]
# E/W: pycodestyle, F: pyflakes, UP: pyupgrade, B: bugbear.
# NOTE: import sorting (I) is intentionally NOT enabled. The package currently relies
# on a set of order-sensitive circular imports (_functionals <-> utils <->
# processing_pair <-> panoptica_result); reordering imports breaks `import panoptica`.
# Re-enable "I" once those cycles are decoupled.
select = ["E", "W", "F", "UP", "B"]
ignore = [
"E501", # line length is enforced by the formatter, not the linter
"B905", # zip(..., strict=) is 3.10+ only; not worth churning every call site
"B008", # calls in arg defaults are deliberate here (edge-case policy objects)
"B024", # _ProcessingPair is an intentional ABC without abstract methods
"B028", # explicit warnings.warn stacklevel is noise for this codebase
"UP038", # Use X | Y instead of (X, Y) for isinstance
"B017", # assert Exception in unittests...
]
[tool.ruff.lint.per-file-ignores]
# __init__.py re-exports are deliberate public API, not unused imports.
"__init__.py" = ["F401"]
# Tests favor readability over import hygiene (shared fixtures, re-imports).
"unit_tests/**" = ["F401", "F811", "E402", "F841"]
[tool.mypy]
python_version = "3.10"
# The package is clean under this configuration. It is pragmatic rather than strict:
# missing third-party stubs are ignored, and full annotation coverage is not enforced
# (tighten with e.g. disallow_untyped_defs incrementally). warn_unused_ignores is left
# off on purpose so optional deps (torch/nibabel/SimpleITK) not installed in a given
# environment don't turn their guarded `# type: ignore`s into spurious failures.
ignore_missing_imports = true
warn_redundant_casts = true
exclude = ["docs/", "examples/", "benchmark/", "unit_tests/"]