-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
198 lines (175 loc) · 5.31 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
194
195
196
197
198
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
# read more about configuring hatch at:
# https://hatch.pypa.io/latest/config/build/
# https://hatch.pypa.io/latest/config/metadata/
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
# https://peps.python.org/pep-0621/
[project]
name = "careamics"
dynamic = ["version"]
description = "Toolbox for running N2V and friends."
readme = "README.md"
requires-python = ">=3.9"
license = { text = "BSD-3-Clause" }
authors = [
{ name = 'CAREamics team', email = 'rse@fht.org' },
{ name = 'Ashesh', email = 'ashesh.ashesh@fht.org' },
{ name = 'Federico Carrara', email = 'federico.carrara@fht.org' },
{ name = 'Melisande Croft', email = 'melisande.croft@fht.org' },
{ name = 'Joran Deschamps', email = 'joran.deschamps@fht.org' },
{ name = 'Vera Galinova', email = 'vera.galinova@fht.org' },
{ name = 'Igor Zubarev', email = 'igor.zubarev@fht.org' },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: BSD License",
"Typing :: Typed",
]
dependencies = [
'numpy<2.0.0',
'torch>=2.0,<=2.5.1',
'torchvision<=0.20.1',
'bioimageio.core==0.7',
'tifffile<=2024.12.12',
'psutil<=6.1',
'pydantic>=2.5,<2.11',
'pytorch_lightning>=2.2,<=2.4',
'pyyaml<=6.0.2,!=6.0.0',
'typer>=0.12.3,<=0.15.1',
'scikit-image<=0.25.0',
'zarr<3.0.0',
'pillow<=11.0.0',
]
[project.optional-dependencies]
# development dependencies and tooling
dev = [
"pre-commit",
"pytest",
"pytest-cov",
"onnx",
"sybil", # doctesting
]
# notebooks
examples = ["jupyter", "careamics-portfolio", "matplotlib"]
# loggers
wandb = ["wandb"]
tensorboard = ["tensorboard", "protobuf==5.29.1"]
[project.urls]
homepage = "https://careamics.github.io/"
repository = "https://github.com/CAREamics/careamics"
# cli
[project.scripts]
careamics = "careamics.cli.main:run"
# https://beta.ruff.rs/docs
[tool.ruff]
line-length = 88
target-version = "py39"
src = ["src"]
lint.select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"D", # pydocstyle
"I", # isort
"UP", # pyupgrade
# "S", # bandit
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
]
lint.ignore = [
"D100", # Missing docstring in public module
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line should be in imperative mood
"D413", # Missing blank line after last section
"D416", # Section name should end with a colon
# incompatibility with mypy
"RUF005", # collection-literal-concatenation, in prediction_utils.py:30
# version specific
"UP007", # Replace Union by |, mandatory for py3.9
]
show-fixes = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "S"]
"setup.py" = ["D"]
[tool.black]
line-length = 88
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "src/**/"
strict = false
# allow_untyped_defs = false
# allow_untyped_calls = false
# disallow_any_generics = false
# ignore_missing_imports = false
# https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["src/careamics", "tests"] # add src/careamics for doctest discovery
filterwarnings = [
# "error",
# "ignore::UserWarning",
]
addopts = "-p no:doctest"
markers = [
# "gpu: marks tests as requiring gpu",
"lvae: marks tests as testing lvae",
]
# https://coverage.readthedocs.io/en/6.4/config.html
[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"raise NotImplementedError()",
"except PackageNotFoundError:",
]
[tool.coverage.run]
source = ["src/careamics"]
omit = ["src/careamics/lvae_training/*"]
# https://github.com/mgedmin/check-manifest#configuration
# add files that you want check-manifest to explicitly ignore here
# (files that are in the repo but shouldn't go in the package)
[tool.check-manifest]
ignore = [
".github_changelog_generator",
".pre-commit-config.yaml",
".ruff_cache/**/*",
"setup.py",
"tests/**/*",
]
[tool.numpydoc_validation]
checks = [
"all", # report on all checks, except the below
"EX01", # Example section not found
"SA01", # See Also section not found
"ES01", # Extended Summar not found
"GL01", # Docstring text (summary) should start in the line immediately
# after the opening quotes
"GL02", # Closing quotes should be placed in the line after the last text
# in the docstring
"GL03", # Double line break found
"RT04", # Return value description should start with a capital letter
]
exclude = [ # don't report on objects that match any of these regex
"test_*",
"src/careamics/lvae_training/*",
]