-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
193 lines (170 loc) · 6.76 KB
/
pyproject.toml
File metadata and controls
193 lines (170 loc) · 6.76 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
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
[tool.poetry]
name = "illumifix"
version = "0.0.1"
description = "This project facilitates the adjustment of pixel values in microscopy images to account for systematic differences in illumination across a field of view."
authors = ["Vince Reuter"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/gerlichlab/illumifix.git"
keywords = ["microscopy", "FISH", "bioinformatics", "illumination"]
classifiers = [
"Development Status :: 1 - Planning",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Typing :: Typed",
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = ">=3.11,<3.13"
attrs = "*"
expression = "^5.0.2"
gertils = { git = "https://github.com/gerlichlab/gertils.git", tag = "v0.6.1" }
numpy = "*"
ome-zarr = "^0.11.1"
zarr = ">=2.4.12"
[tool.poetry.group.coverage]
optional = true
[tool.poetry.group.coverage.dependencies]
coverage = ">=7.5.0"
[tool.poetry.group.formatting]
optional = true
[tool.poetry.group.formatting.dependencies]
codespell = ">=2.2.4"
ruff = "==0.7.4" # https://github.com/astral-sh/ruff/issues/14681
[tool.poetry.group.linting]
optional = true
[tool.poetry.group.linting.dependencies]
mypy = ">=1.0.1"
pandas-stubs = "*"
ruff = "==0.7.4" # https://github.com/astral-sh/ruff/issues/14681
[tool.poetry.group.pipeline]
optional = true
[tool.poetry.group.pipeline.dependencies]
matplotlib = "*"
piper = ">=0.14.2"
scikit-image = ">=0.25"
[tool.poetry.group.testsuite.dependencies]
hypothesis = ">=6.92.1"
pytest = ">=7.2.0"
typer = "*"
[tool.codespell]
skip = ".git,.mypy_cache,.nox,.vscode,__pycache__,poetry.lock"
builtin = "clear,rare,informal,usage,code,names"
ignore-words-list = "arange,jupyter,iff,snd"
check-filenames = true
uri-ignore-words-list = "*"
[tool.mypy]
files = ['illumifix/*.py', 'tests/*.py']
plugins = ["pydantic.mypy"]
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
enable_error_code = ["ignore-without-code"]
[[tool.mypy.overrides]]
module = "tests.*"
disable_error_code = "annotation-unchecked"
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "illumifix.*"
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_any_unimported = true
disallow_any_explicit = true
disallow_any_generics = true
disallow_subclassing_any = true
implicit_optional = false
strict_optional = true
[tool.ruff]
# Black uses line-length = 88, but allows exceptions when breaking the line
# would lead to other rule violations. Use 100 as a maximum hard limit:
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Missing members
"ANN10", # Deprecated: Missing type annotation for self/cls in (class)method
"D105", # Missing docstring in magic method
"ANN204", # Missing return type annotation for special method
# Opinionated syntax
"D203", # Ignore this to instead opt for class body or docstring to possibly start right away under class.
"D213", # Ignore this to instead opt for summary part of docstring to be on first physical line.
"TRY003", # Avoid specifying long messages outside the exception class
"C408", # Unnecessary `dict` call (rewrite as a literal)
"EM", # Exception must not use a (f-)string literal, assign to variable first
"FIX002", # Line contains TODO, consider resolving the issue
"D400", # First line should end with a period
"D415", # First line should end with a period, question mark, or exclamation point
"N818", # Exception should be named with an Error suffix
"PLR0913", # Too many arguments in function definition
"D401", # First line of docstring should be in imperative mood
"N802", # Function name should be lowercase
"N803", # Argument name should be lowercase
"N806", # Variable name should be lowercase
"N815", # Variable in class scope should not be mixedCase.
"E731", # Do not assign a `lambda` expression, use a `def`
# Imports and type annotations
"ANN003", # Missing type annotation for kwargs
"FA100", # Missing `from __future__ import annotations`, but uses `typing.*`
"TCH002", # Move third-party import `...` into a type-checking block
"TCH003", # Move standard library import `...` into a type-checking block
"UP007", # Use `X | Y` for type annotations
# Ruff recommends avoiding these checks when using `ruff format`. Since
# `ruff format` is a drop-in replacement for `black`, we avoid the same
# checks here (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
# has more details):
"W191", # tab-indentation
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"D206", # indent-with-spaces
"D300", # triple-single-quotes
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"Q002", # bad-quotes-docstring
"Q003", # avoidable-escaped-quote
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
"E501", # line-too-long
# Other
"A005", # Module name shadows a Python standard-library module
"PLR0912", # too many branches (of a conditional)
"TD002", # missing author in TODO
"C901", # function too complex
"PLR0911", # too many return statements
"LOG015", # Use own logger instead
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
# Ignore some groups of checks in our test code.
"ANN", # Type annotations
"D10", # Missing docstrings
"INP001", # File `...` is part of an implicit namespace package. Add an `__init__.py`.
# Ignore some more specific checks in our test code.
"D401", # First line of docstring should be in imperative mood
"N802", # Function name `...` should be lowercase
"S101", # Use of `assert` detected
]
"scripts/*.py" = [
# In scripts, we don't care about docstrings for functions, classes, etc.
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
# In scripts, we also don't care about custom exception types since the error is usually fatal.
"TRY002", # Create your own exception
# We don't care if scripts are interpreted as an implicit namespace package.
"INP001", # part of an implicit namespace package
]