forked from pymmcore-plus/pymmcore-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
193 lines (174 loc) · 5.21 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
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
# https://peps.python.org/pep-0621/
[project]
name = "pymmcore-plus"
description = "pymmcore superset providing improved APIs, event handling, and a pure python acquisition engine"
keywords = ["microscope", "micro-manager", "smart-microscopy"]
readme = "README.md"
requires-python = ">=3.9"
license = { text = "BSD 3-Clause License" }
authors = [
{ name = "Talley Lambert", email = "[email protected]" },
{ name = "Federico Gasparoli", email = "[email protected]" },
{ name = "Ian Hunt-Isaak", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: System :: Hardware",
"Topic :: System :: Hardware :: Hardware Drivers",
"Topic :: Utilities",
]
dynamic = ["version"]
dependencies = [
"platformdirs >=3.0.0",
"numpy >=1.17.3",
"psygnal >=0.7",
"pymmcore >=10.7.0.71.0",
"typing-extensions", # not actually required at runtime
"useq-schema >=0.5.0",
"tensorstore; python_version < '3.13'",
# cli requirements included by default for now
"typer >=0.4.2",
"rich >=10.2.0",
]
# extras
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
[project.optional-dependencies]
cli = ["typer >=0.4.2", "rich >=10.2.0"]
io = ["tifffile >=2021.6.14", "zarr >=2.2,<3"]
PySide2 = ["PySide2 >=5.15"]
PySide6 = ["PySide6 >=6.4.0,<6.8"]
PyQt5 = ["PyQt5 >=5.15.4"]
PyQt6 = ["PyQt6 >=6.4.2,<6.8"]
test = [
"msgspec; python_version < '3.13'",
"msgpack",
"pytest-cov >=4",
"pytest-qt >=4",
"pytest >=7.3.2",
"qtpy >=2",
"rich",
"typer >=0.4.2",
"tifffile >=2021.6.14",
"zarr >=2.2,<3",
"xarray",
]
dev = ["ipython", "mypy", "pdbpp", "pre-commit", "ruff", "tensorstore-stubs"]
docs = [
"mkdocs >=1.4",
"mkdocs-material",
"mkdocstrings ==0.22.0",
"mkdocstrings-python ==1.1.2",
"mkdocs-typer ==0.0.3",
# "griffe @ git+https://github.com/tlambert03/griffe@recursion"
]
[project.urls]
Source = "https://github.com/pymmcore-plus/pymmcore-plus"
Tracker = "https://github.com/pymmcore-plus/pymmcore-plus/issues"
Documentation = "https://pymmcore-plus.github.io/pymmcore-plus"
[project.scripts]
mmcore = "pymmcore_plus._cli:main"
# https://hatch.pypa.io/latest/config/metadata/
[tool.hatch.version]
source = "vcs"
[tool.hatch.metadata]
allow-direct-references = true
# https://hatch.pypa.io/latest/config/build/#file-selection
[tool.hatch.build.targets.sdist]
include = ["/src", "/tests"]
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
# https://docs.astral.sh/ruff/rules/
[tool.ruff]
line-length = 88
target-version = "py39"
[tool.ruff.lint]
pydocstyle = { convention = "numpy" }
select = [
"E", # style errors
"F", # flakes
"W", # warnings
"D", # pydocstyle
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
"TID", # tidy
"TC", # typecheck
"SLF", # private-access
]
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D401", # First line should be in imperative mood (remove to opt in)
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "SLF"]
"examples/*.py" = ["D"]
"_cli.py" = ["B008"]
"docs/*.py" = ["A", "D"]
# https://docs.astral.sh/ruff/formatter/
[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:Failed to disconnect::pytestqt"]
markers = ["run_last: mark a test to run last"]
# 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"
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
# 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",
]
show_missing = true
[tool.coverage.run]
source = ['pymmcore_plus']
omit = ["src/pymmcore_plus/_build.py"]
# https://github.com/mgedmin/check-manifest#configuration
[tool.check-manifest]
ignore = [
".github_changelog_generator",
".pre-commit-config.yaml",
".ruff_cache/**/*",
"tests/**/*",
"tox.ini",
]
[tool.typos.default]
extend-ignore-identifiers-re = ["(?i)nd2?.*", "(?i)ome", "anager"]