-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
186 lines (164 loc) · 5.86 KB
/
pyproject.toml
File metadata and controls
186 lines (164 loc) · 5.86 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
[tool.poetry]
name = "gertils"
version = "0.6.1"
description = "General computing utilities for data processing and analysis in the Gerlich group at IMBA"
authors = [
"Vince Reuter <vince.reuter@gmail.com>",
]
readme = "README.md"
license = "MIT"
repository = "https://github.com/gerlichlab/gertils"
classifiers = [
"Development Status :: 1 - Planning",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Utilities",
"Typing :: Typed",
]
include = ["py.typed"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
# These are the main runtime dependencies.
python = ">=3.10.0,<3.13"
dask = "^2023.5.1"
numpy = "^1.24.2"
numpydoc_decorator = "^2.2.1"
zarr = "^2.4.12"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
# The dev group is for developers' convenience.
# Consider each new dependency to another group as a dev group candidate.
codespell = "^2.2.2"
hypothesis = "^6.68.2"
mypy = "1.0.1"
nox = "^2022.11.21"
pydantic = "^1.10.4"
pytest = "^7.1.0"
pytest-cov = "^5.0.0"
ruff = ">=0.3"
[tool.poetry.group.format]
optional = true
[tool.poetry.group.format.dependencies]
codespell = "^2.2.2"
ruff = ">=0.3"
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
hypothesis = "^6.68.2"
mypy = "^1.0.1"
nox = "^2022.11.21"
pydantic = "^1.10.4"
pytest = "^7.1.0"
ruff = ">=0.3"
[tool.poetry.group.nox]
optional = true
[tool.poetry.group.nox.dependencies]
nox = "^2022.11.21"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
hypothesis = "^6.68.2"
pytest = "^7.1.0"
pytest-cov = "^5.0.0"
[tool.codespell]
skip = ".git,.mypy_cache,.nox,.vscode,__pycache__,pyproject.toml,poetry.lock"
builtin = "clear,rare,informal,usage,code,names"
ignore-words-list = "jupyter,iff" # prevent jupyter -> jupiter, iff -> if
check-filenames = true
uri-ignore-words-list = "*" # prevent spelling correction in URL-like values.
[tool.mypy]
files = ['*.py', 'gertils/*.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 = "gertils.*"
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
# Imports and type annotations
"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
]
[tool.ruff.lint.per-file-ignores]
"gertils/__init__.py" = [
"F401", # import unused
]
"noxfile.py" = [
# The noxfile is dev-only; we don't care much about form.
"ANN", # Missing type annotations
"D", # Missing docstrings
]
"tests/*" = [
# Ignore some groups of checks in our test code.
"ANN", # Type annotations
"D10", # Missing docstrings
"TCH00", # Imports and type checking blocks
"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
]