-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (141 loc) · 4.53 KB
/
Copy pathpyproject.toml
File metadata and controls
157 lines (141 loc) · 4.53 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
# https://peps.python.org/pep-0517/
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=70", "setuptools-scm>=8"]
# https://peps.python.org/pep-0621/
[project]
name = "cellpose-runner"
description = "Run CellPose with formalized configuration logging and visualization."
readme = "README.md"
requires-python = ">=3.12"
license = { text = "BSD 3-Clause License" }
authors = [
{ email = "malinmayorc@janelia.hhmi.org", name = "Caroline Malin-Mayor" },
]
keywords = []
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
"cellpose>=4.1,<5",
"coolname>=2,<6",
"janelia-pathlib",
"numpy>=1.26,<3",
"pydantic>=2.7,<3",
"tifffile>=2024.1,<2027",
"tomli-w>=1,<2",
"zarr>=3,<4",
]
[tool.uv.sources]
janelia-pathlib = { git = "ssh://git@github.com/JaneliaSciComp/janelia-pathlib.git" }
[project.optional-dependencies]
report = ["pandas>=2,<3", "panel>=1.4,<2"]
view = ["neuroglancer>=2.39,<3"]
[project.urls]
homepage = "https://github.com/JaneliaSciComp/cellpose_runner"
repository = "https://github.com/JaneliaSciComp/cellpose_runner"
documentation = "https://JaneliaSciComp.github.io/cellpose_runner/"
# https://peps.python.org/pep-0735/
[dependency-groups]
test = ["pytest>=8.3,<10", "pytest-cov>=6,<8"]
docs = [
"mkdocs-material>=9.6,<10",
"mkdocstrings-python>=1.16,<3",
"mkdocs-api-autonav>=0.3,<1",
"mkdocs-include-markdown-plugin>=7.1,<8",
"mkdocs-autorefs>=1.0,<2",
"mike>=2.1,<3",
]
dev = [
{ include-group = "test" },
{ include-group = "docs" },
"ipython>=8,<10",
"mypy>=1.15,<3",
"pre-commit>=4,<5",
"ruff>=0.13,<1",
]
# enables dynamic versioning from git tags
[tool.setuptools_scm]
# https://docs.astral.sh/ruff/rules/
[tool.ruff]
line-length = 100
target-version = "py312"
fix = true
src = ["src"]
[tool.ruff.lint]
extend-select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
"TID", # tidy imports
"TC", # type checking
"T201", # print statements
"D102", # undocumented public method
"D103", # undocumented public function
"D300", # enforces triple double quotes on docstrings
"D414", # empty/missing docstring section
"D417", # undocumented parameter
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "ANN"]
"scripts/*.py" = ["D"]
# these scripts report to stdout for CI to consume
".github/scripts/*.py" = ["D", "T201"]
# https://docs.astral.sh/ruff/formatter/
[tool.ruff.format]
# https://docs.pytest.org/en/stable/reference/customize.html
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
pythonpath = ["tests"]
addopts = "-m 'not slow'"
markers = [
"slow: runs real cellpose end to end; excluded by default, run with `-m slow`",
]
filterwarnings = [
"error",
# if needed, add global ignores here, for example:
# "ignore:Some message:SomeCategory",
]
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "src/cellpose_runner"
strict = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
# cellpose ships no type information, so calls into it are untyped.
[[tool.mypy.overrides]]
module = ["cellpose.*", "janelia_pathlib.*", "neuroglancer.*", "pandas.*", "panel.*"]
ignore_missing_imports = true
# https://coverage.readthedocs.io/en/latest/config.html
# These exclusions are limited to code that provably cannot run under the test
# suite. Deliberately *not* excluded: `except ImportError` (optional-dependency
# fallbacks are exactly the paths that break for users without the extra) and
# `pass` (which would also hide untested branches like `if edge_case: pass`).
[tool.coverage.report]
exclude_lines = [
"pragma: no cover", # explicit opt-out
"if TYPE_CHECKING:", # never executes at runtime
"@overload", # typing-only stub signatures
"raise NotImplementedError()",# abstract methods; the bare form only
'^\s*\.\.\.\s*$', # lines with ONLY ellipses, any surrounding whitespace
]
[tool.coverage.run]
source = ["src/cellpose_runner"]