-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
238 lines (213 loc) · 4.45 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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
[project]
name = "npc-mvr"
description = "Tools for reading raw video data from MindScope Neuropixels experiments, compatible with data in the cloud."
authors = [
{ name = "Ben Hardcastle", email = "ben.hardcastle@alleninstitue.org" },
]
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"npc-io>=0.1.20",
"npc-sync>=0.1.5",
"opencv-python-headless>=4.9.0.80",
"typing-extensions>=4.9.0",
]
version = "0.1.11"
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
]
[project.license]
text = "MIT"
[project.urls]
Repository = "https://github.com/AllenInstitute/npc_mvr"
Issues = "https://github.com/AllenInstitute/npc_mvr/issues"
[build-system]
requires = [
"setuptools>=61",
"wheel",
]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = [
"src",
]
[tool.setuptools.package-data]
npc_mvr = [
"py.typed",
]
[tool.black]
target-version = [
"py39",
"py310",
"py311",
]
[tool.ruff]
line-length = 100
select = [
"B",
"C4",
"E",
"F",
"PGH",
"RUF",
"W",
"YTT",
"ANN",
"C",
"I",
"RUF100",
"N",
"UP",
]
src = [
"src",
]
extend-exclude = [
"tests/fixtures",
]
target-version = "py39"
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.mccabe]
max-complexity = 10
[tool.coverage.paths]
source = [
"src",
]
[tool.coverage.run]
branch = true
source = [
"src",
]
[tool.coverage.report]
skip_covered = true
show_missing = true
skip_empty = true
exclude_also = [
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"@(abc.)?abstractmethod",
"@typing.runtime_checkable",
]
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--doctest-modules",
"--ignore-glob=*scripts*,*examples*,*docs*",
"--cov",
"--cov-report=html",
"--cov-config=pyproject.toml",
"--doctest-glob=*README.md",
"-x",
]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS",
]
testpaths = [
"src",
"tests",
]
[tool.mypy]
check_untyped_defs = false
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_decorators = false
disallow_any_unimported = false
warn_return_any = false
warn_unused_ignores = true
no_implicit_optional = true
show_error_codes = true
ignore_missing_imports = true
implicit_reexport = false
exclude = [
"src/npc_mvr/scripts",
]
[tool.isort]
profile = "black"
atomic = true
skip_glob = [
"*/setup.py",
]
filter_files = true
known_first_party = [
"npc_mvr",
]
[tool.pdm]
plugins = [
"pdm-bump",
"copier",
]
[tool.pdm.build]
package-dir = "src"
[tool.pdm.dev-dependencies]
dev = [
"pytest>=7.4.0",
"ruff>=0.0.282",
"mypy>=1.4.1",
"pytest-cov>=4.1.0",
"black>=23.7.0",
"git-changelog>=2.3",
"parver>=0.3",
]
docs = [
"markdown-callouts>=0.3",
"markdown-exec>=1.7",
"mkdocs>=1.5",
"mkdocs-coverage>=1.0",
"mkdocs-gen-files>=0.5",
"mkdocs-git-committers-plugin-2>=1.2",
"mkdocs-git-revision-date-localized-plugin>=1.2",
"mkdocs-literate-nav>=0.6",
"mkdocs-material>=9.4",
"mkdocs-minify-plugin>=0.7",
"mkdocstrings[python]>=0.23",
"tomli>=2.0; python_version < '3.11'",
]
[tool.pdm.scripts]
ruff = "ruff check src --fix-only"
black = "black src"
pytest = "pytest --cov-report term-missing:skip-covered --cov-report=html"
mypy = "mypy src --install-types --non-interactive"
log = "git-changelog -o CHANGELOG.md"
dryrun = "pdm publish --repository testpypi --dry-run"
post_init = "pdm install --plugins"
[tool.pdm.scripts.test]
composite = [
"pdm run mypy",
"pdm run pytest",
]
[tool.pdm.scripts.docs]
shell = "cd docs && mkdocs serve"
help = "Start the dev server for doc preview"
[tool.pdm.scripts.bumpver]
composite = [
"pdm self add pdm-bump",
"pdm bump micro",
]
[tool.pdm.scripts.tag]
composite = [
"pdm self add pdm-bump",
"pdm bump tag",
]
[tool.pdm.scripts.pre_build]
composite = [
"pdm run black",
"pdm run ruff",
"pdm run bumpver",
]
[tool.pdm.scripts.post_build]
composite = [
"git commit -am 'Bump'",
"pdm run tag",
"pdm run log",
]