-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
202 lines (174 loc) · 5.72 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
199
200
201
202
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "ngff-zarr"
description = 'A lean and kind Open Microscopy Environment (OME) Next Generation File Format (NGFF) Zarr implementation.'
readme = "README.md"
requires-python = ">=3.8"
license = "MIT"
keywords = []
authors = [{ name = "Matt McCormick", email = "[email protected]" }]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
]
dependencies = [
"dask[array]",
"itkwasm >= 1.0b171",
"itkwasm-downsample >= 1.2.0",
"numpy",
"platformdirs",
"psutil; sys_platform != \"emscripten\"",
"rich",
"rich-argparse",
"typing_extensions",
"zarr",
]
dynamic = ["version"]
[project.urls]
Documentation = "https://github.com/thewtex/ngff-zarr#readme"
Issues = "https://github.com/thewtex/ngff-zarr/issues"
Source = "https://github.com/thewtex/ngff-zarr"
Changelog = "https://github.com/thewtex/ngff-zarr/releases"
[project.scripts]
ngff-zarr = "ngff_zarr.cli:main"
[tool.hatch.version]
path = "ngff_zarr/__about__.py"
[project.optional-dependencies]
dask-image = ["dask-image"]
itk = ["itk-filtering>=5.3.0"]
cli = [
"dask-image",
"dask[distributed]",
"itk-filtering>=5.3.0",
"itk-io>=5.3.0",
"itkwasm-image-io",
"imageio",
"tifffile>=2024.7.24",
"imagecodecs",
]
test = [
"pytest >=6",
"pooch",
"jsonschema",
]
docs = [ "furo>=2024.7.18,<2025", "myst-parser>=3.0.1,<4", "sphinx>=7.4.7,<8", "sphinx-autodoc2>=0.5.0,<0.6", "sphinx-copybutton>=0.5.2,<0.6", "sphinx-design>=0.6.0,<0.7", "sphinxext-opengraph>=0.9.1,<0.10", "sphinx-autobuild>=2024.4.16,<2025"]
[tool.coverage.report]
run.source = ["ngff_zarr"]
report.exclude_lines = [
"no cov",
'\.\.\.',
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.pytest.ini_options]
minversion = "6.0"
filterwarnings = [
"ignore:(ast.Str|Attribute s|ast.NameConstant|ast.Num) is deprecated:DeprecationWarning:_pytest",
]
log_cli_level = "INFO"
testpaths = ["tests"]
[tool.lint]
select = [
"E",
"F",
"W", # flake8
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
extend-ignore = [
"PLR", # Design related pylint codes
"E501", # Line too long
]
unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
]
flake8-unused-arguments.ignore-variadic-names = true
[tool.lint.per-file-ignores]
"tests/**" = ["T20"]
[tool.ruff]
src = ["src"]
exclude = []
line-length = 88
[tool.pylint]
py-version = "3.8"
ignore-paths = ["src/ngff_zarr/__about__.py"]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
messages_control.disable = [
"design",
"fixme",
"line-too-long",
"missing-module-docstring",
"wrong-import-position",
]
[tool.black]
line-length = 88
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
[tool.pixi.pypi-dependencies]
ngff-zarr = { path = ".", editable = true }
[tool.pixi.tasks]
[tool.pixi.environments]
default = { solve-group = "default" }
test = { features = ["test", "dask-image", "itk", "cli"], solve-group = "default" }
lint = { features = ["lint"], no-default-feature = true, solve-group = "default" }
docs = { features = ["docs"], no-default-feature = true, solve-group = "default" }
data = { features = ["data"], no-default-feature = true, solve-group = "default" }
[tool.pixi.feature.test.tasks]
test = { cmd = "pytest", description = "Run the test suite" }
[tool.pixi.feature.lint.dependencies]
pre-commit = "*"
[tool.pixi.feature.lint.tasks]
pre-commit-install = { cmd = "pre-commit install", description = "Install pre-commit hooks" }
pre-commit-run = { cmd = "pre-commit run --all", description = "Run pre-commit hooks on all repository files" }
lint = { depends-on = ["pre-commit-run"], description = "Run linters" }
[tool.pixi.feature.docs.tasks]
dev-docs = { cmd = "sphinx-autobuild docs docs/_build/html", description = "Build the documentation" }
[tool.pixi.feature.docs.target.linux-64.tasks]
build-docs = { cmd = "make html", cwd = "docs", description = "Build the documentation" }
[tool.pixi.feature.docs.target.osx-64.tasks]
build-docs = { cmd = "make html", cwd = "docs", description = "Build the documentation" }
[tool.pixi.feature.docs.target.osx-arm64.tasks]
build-docs = { cmd = "make html", cwd = "docs", description = "Build the documentation" }
[tool.pixi.feature.data.dependencies]
python = ">=3.9.19,<4"
pooch = ">=1.8.2,<2"
[tool.pixi.feature.data.tasks]
hash-data = { cmd = "tar cvf ../data.tar * && gzip -9 -f ../data.tar && echo 'New SHA256:' && python3 -c 'import pooch; print(pooch.file_hash(\"../data.tar.gz\"))'", cwd = "test/data", description = "Update the testing data tarball and get its sha256 hash" }