-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
223 lines (200 loc) · 5.26 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
[tool.poetry]
name = "cellseg_models_pytorch"
version = "0.1.25"
description = "Python library for 2D cell/nuclei instance segmentation models written with PyTorch."
authors = ["Okunator <oskari.lehtonen@helsinki.fi>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/okunator/cellseg_models.pytorch"
repository = "https://github.com/okunator/cellseg_models.pytorch"
keywords = [
"cell segmentation",
"nuclei segmentation",
"pytorch",
"pytorch-lightning",
]
[tool.poetry.dependencies]
python = "^3.10"
numpy = "^1.24"
pathos = "^0.3.0"
timm = "^1.0.7"
numba = "^0.60.0"
torch = "2.1.1"
scipy = "^1.14"
scikit-image = "^0.24"
opencv-python = "^4.8"
tqdm = "^4.64.0"
scikit-learn = "^1.3.0"
lightning = "^2.3.0"
albumentations = "1.4.0"
tables = "^3.9.2"
requests = "^2.28.0"
geopandas = "^1.0.1"
pyarrow = "^16.1.0"
[tool.poetry.dev-dependencies]
pytest = "^7.2.0"
pytest-cov = "^3.0.0"
pytest-xdist = "^2.5.0"
flake8 = "^4.0.1"
flake8-docstrings = "^1.6.0"
flake8-bugbear = "^22.1.11"
pyproject-flake8 = "^4.0.1"
pre-commit = "^2.17.0"
matplotlib = "^3.5.1"
mypy = "^0.931"
isort = "^5.10.1"
black = "^22.3.0"
[tool.poetry.group.dev.dependencies]
scriv = { extras = ["toml"], version = "^0.16.0" }
[tool.scriv]
format = "md"
version = "literal: cellseg_models_pytorch/__init__.py: __version__"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -v"
markers = ["cuda (deselect with '-m \"nocuda\"')"]
[tool.coverage.run]
source = ["cellseg_models_pytorch"]
[tool.coverage.report]
omit = ["*/tests/*", "*/__init__.py", "*/datamodules/*", "*/wandb_callbacks.py"]
exclude_lines = [
"raise TypeError",
"raise ImportError",
"raise NotImplementedError",
"raise ZeroDivisionError",
"raise ValueError",
"raise IOError",
"except ImportError",
"except TypeError",
"except Exception",
"def extra_repr",
]
[tool.ruff]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"D", # pydocstyle, need to enable for docstrings check.
"E", # pycodestyle - Error
"F", # pyflakes
"G", # flake8-logging-format
"I", # Isort
"N", # pep8-naming
"S", # flake8-bandit
"W", # pycodestyle - Warning
"Q", # flake8-quotes
"C4", # flake8-comprehensions
"FA", # flake8-future-annotations
"EM", # flake8-errmsg
"PD", # pandas-vet
"PL", # Pylint
"PT", # flake8-pytest-style
"TD", # flake8-todos
"UP", # pyupgrade
"C90", # mccabe
"T10", # flake8-debugger
"T20", # flake8-print
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"BLE", # flake8-blind-except
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"ERA", # eradicate
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"FLY", # flynt
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"NPY", # NumPy-specific rules
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"TRY", # tryceratops
"YTT", # flake8-2020
"PERF", # Perflint
"SLOT", # flake8-slots
"ASYNC", # flake8-async
]
include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"]
extend-include = ["*.ipynb"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"conftest.py",
"old",
"test",
"tests",
"__pypackages__",
"__pycache__",
"_build",
"docs",
"source",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 88
indent-width = 4
# Assume Python 3.10
target-version = "py310"
[tool.ruff.pydocstyle]
# Use numpy-style docstrings.
convention = "google"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
select = ["E4", "E7", "E9", "F"]
ignore = ["E203", "D103", "D104", "E501"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = ["B"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# format docs
docstring-code-format = true
# docstr code line length
# docstring-code-line-length = "dynamic"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402"]
"**/{tests,docs,tools}/*" = ["E402"]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"