-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
206 lines (183 loc) · 4.87 KB
/
Copy pathpyproject.toml
File metadata and controls
206 lines (183 loc) · 4.87 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
194
195
196
197
198
199
200
201
202
203
204
205
206
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
# https://hatch.pypa.io/latest/config/metadata/
[tool.hatch.version]
source = "vcs"
# [tool.hatch.metadata]
# allow-direct-references = true
# https://peps.python.org/pep-0621/
[project]
name = "cali"
description = "A GUI to visualize, segment and analyze calcium imaging data."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "BSD 3-Clause License" }
authors = [
{ email = "federico.gasparoli@gmail.com", name = "Federico Gasparoli" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
"oasis-deconv==0.2.0", # Build from source to avoid broken prebuilt wheels
"numba",
"pymmcore-widgets >=0.8.0",
"pymmcore-plus >=0.16.0",
"qtpy",
"vispy",
"zarr==2.*",
"tifffile",
"tqdm",
"pyyaml",
"cmap",
"pyconify",
"rich",
"ndv[vispy]==0.0.4",
"scikit-image",
"scipy<1.17", # oasis incompatible with scipy>=1.17 (toeplitz batch change)
"scikit-learn",
"PyQt6",
"pyqtgraph",
"tensorstore >=0.1.67,!=0.1.72",
"pydantic<2.11.0",
"pandas",
"superqt[iconify]",
"sqlmodel>=0.0.27",
]
[project.optional-dependencies]
# Cellpose is optional - choose the version that fits your Python version
cp3 = ["cellpose>=3.0.0,<4.0.0"]
cp4 = ["cellpose>=4.0.0"]
[tool.uv]
conflicts = [
[
{ extra = "cp3" },
{ extra = "cp4" },
],
]
[dependency-groups]
test = ["pytest>=6.0", "pytest-cov", "pytest-qt"]
dev = [
"black",
"ipython",
"mypy",
"pre-commit",
"pytest-cov",
"pytest",
"rich",
"ruff",
"pytest-xdist>=3.8.0",
]
[project.urls]
homepage = "https://github.com/fdrgsp/cali"
repository = "https://github.com/fdrgsp/cali"
[project.scripts]
cali = "cali.__main__:main"
[tool.uv.sources]
cali = { workspace = true }
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
# https://docs.astral.sh/ruff/configuration/
[tool.ruff]
line-length = 88
target-version = "py39"
src = ["src", "tests"]
fix = true
unsafe-fixes = true
exclude = ["_dev/**"]
# https://docs.astral.sh/ruff/rules
[tool.ruff.lint]
pydocstyle = { convention = "numpy" }
select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"D", # pydocstyle
"D417", # Missing argument descriptions in Docstrings
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"ANN", # flake8-annotations
"RUF", # ruff-specific rules
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
]
ignore = [
"ANN401", # allow the use of Any type
"D401", # First line should be in imperative mood (remove to opt in)
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "S"]
[tool.ruff.format]
docstring-code-format = true
# https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
filterwarnings = [
"error",
"ignore:Failing to pass a value:DeprecationWarning",
"ignore:Could not find cvxpy.*:UserWarning",
"ignore:nperseg.*is greater than signal length:UserWarning",
"ignore::FutureWarning",
"ignore:Conversion of an array with ndim > 0 to a scalar:DeprecationWarning",
"ignore:'count' is passed as positional argument:DeprecationWarning:vispy",
"ignore:Sparse invariant checks are implicitly disabled.*:UserWarning",
]
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "src/**/"
strict = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
plugins = ["pydantic.mypy"]
exclude = ".*\\.ipynb$"
# Ignore missing imports for large packages not available in pre-commit
[[tool.mypy.overrides]]
module = [
"pymmcore_plus.*",
"pymmcore_widgets.*",
]
ignore_missing_imports = true
# https://coverage.readthedocs.io/en/6.4/config.html
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"raise AssertionError",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"\\.\\.\\.",
]
omit = ["*/_model_graph.py"]
show_missing = true
[tool.coverage.run]
source = ["cali"]
# https://github.com/mgedmin/check-manifest#configuration
[tool.check-manifest]
ignore = [
".pre-commit-config.yaml",
".ruff_cache/**/*",
"tests/**/*",
"_dev/**/*",
]
[tool.typos.files]
extend-exclude = ["*.ipynb"]
[tool.typos.default]
extend-ignore-identifiers-re = ["(?i)nd2?.*", "(?i)ome", "(?i)fovs?", "sems", "selectin", "pn", "id"]