generated from datalad/datalad-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 10
/
pyproject.toml
280 lines (252 loc) · 6.47 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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
[build-system]
requires = [
"hatchling",
"hatch-vcs",
]
build-backend = "hatchling.build"
[project]
name = "datalad-next"
dynamic = ["version"]
description = "What is next in DataLad"
readme = "README.md"
requires-python = ">= 3.8"
license = "MIT"
keywords = [
"datalad",
"git",
"git-annex",
]
authors = [
{ name = "The DataLad Team and Contributors", email = "[email protected]" },
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Software Development",
"Topic :: Software Development :: Version Control",
"Topic :: Software Development :: Version Control :: Git",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
dependencies = [
"annexremote",
"datalad >= 0.18.4",
"datasalad >= 0.2.1",
"humanize",
"more-itertools",
]
[project.urls]
Homepage = "https://github.com/datalad/datalad-next"
Documentation = "https://docs.datalad.org/projects/next/en/latest/"
Issues = "https://github.com/datalad/datalad-next/issues"
Source = "https://github.com/datalad/datalad-next"
Changelog = "https://github.com/datalad/datalad-next/blob/main/CHANGELOG.md"
[project.optional-dependencies]
devel = [
"cheroot",
"coverage",
"psutil",
"pytest",
"pytest-cov",
"webdavclient3",
"wsgidav",
]
httpsupport = [
"requests",
"requests_toolbelt",
]
[project.scripts]
git-annex-backend-XDLRA = "datalad_next.annexbackends.xdlra:main"
git-annex-remote-archivist = "datalad_next.annexremotes.archivist:main"
git-annex-remote-uncurl = "datalad_next.annexremotes.uncurl:main"
git-remote-datalad-annex = "datalad_next.gitremotes.datalad_annex:main"
[project.entry-points."datalad.extensions"]
next = "datalad_next:command_suite"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "datalad_next/_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
".github",
"tools",
"docs/build",
]
[tool.hatch.envs.hatch-test]
default-args = ["datalad_next"]
extra-dependencies = [
"pytest",
"pytest-cov",
"psutil",
"webdavclient3",
"wsgidav",
]
[tool.hatch.envs.hatch-test.env-vars]
# load the extension
DATALAD_EXTENSIONS_LOAD = "next"
[tool.hatch.envs.tests]
description = "run tests across Python versions"
template = "hatch-test"
[[tool.hatch.envs.tests.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.tests.scripts]
run = 'python -m pytest {args}'
[tool.hatch.envs.types]
description = "type checking with MyPy"
extra-dependencies = [
"mypy>=1.0.0",
"pytest",
]
[tool.hatch.envs.types.scripts]
check = [
"mypy --install-types --non-interactive --python-version 3.8 --pretty --show-error-context {args:datalad_next}",
]
[tool.hatch.envs.docs]
description = "build Sphinx-based docs"
extra-dependencies = [
"sphinx",
"sphinx_rtd_theme",
"pytest",
]
[tool.hatch.envs.docs.scripts]
build = [
"make -C docs html",
]
clean = [
"rm -rf docs/generated",
"make -C docs clean",
]
[tool.hatch.envs.cz]
description = "commit compliance, changelog, and release generation"
detached = true
extra-dependencies = [
"commitizen",
]
[tool.hatch.envs.cz.scripts]
#check-commits = [
# # check all commit messages since the (before) beginning
# "cz check --rev-range 4b825dc642cb6eb9a060e54bf8d69288fbee4904..HEAD",
#]
show-changelog = [
# show the would-be changelog on stdout
"cz changelog --dry-run",
]
bump-version = [
# bump version (also tags) and update changelog
"cz bump --changelog",
]
[tool.hatch.envs.codespell]
description = "spell checking"
detached = true
extra-dependencies = [
"codespell",
]
[tool.hatch.envs.codespell.scripts]
check = "codespell"
fix = "codespell --write-changes"
[tool.codespell]
skip = ".git,build,.*cache,dist"
exclude-file = ".codespell-exclude"
[tool.pytest.ini_options]
addopts = "--strict-markers"
markers = [
# datalad-next custom markers
"skip_if_no_network",
# (implicitly) used markers from datalad-core, which are only declared
# in its tox.ini (inaccessible to pytest here)
"fail_slow",
"githubci_osx",
"githubci_win",
"integration",
"known_failure",
"known_failure_githubci_osx",
"known_failure_githubci_win",
"known_failure_osx",
"known_failure_windows",
"network",
"osx",
"probe_known_failure",
"serve_path_via_http",
"skip_if_adjusted_branch",
"skip_if_no_network",
"skip_if_on_windows",
"skip_if_root",
"skip_known_failure",
"skip_nomultiplex_ssh",
"skip_ssh",
"skip_wo_symlink_capability",
"slow",
"turtle",
"usecase",
"windows",
"with_config",
"with_fake_cookies_db",
"with_memory_keyring",
"with_sameas_remotes",
"with_testrepos",
"without_http_proxy",
]
[tool.coverage.run]
source_pkgs = ["datalad_next"]
branch = true
parallel = true
omit = [
# "src/datasalad/__about__.py",
]
data_file = "${COVERAGE_ROOT-.}/.coverage"
[tool.coverage.paths]
datalad_next = ["src/datalad_next", "*/datalad_next/src/datalad_next"]
tests = ["tests", "*/datalad_next/*/tests"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
[tool.ruff]
exclude = [
# sphinx
"docs",
]
line-length = 88
indent-width = 4
target-version = "py38"
[tool.ruff.format]
# Prefer single quotes over double quotes.
quote-style = "single"
[tool.ruff.lint.per-file-ignores]
"**/test_*" = [
# permit assert statements in tests
"S101",
# permit relative import in tests
"TID252",
# permit versatile function names in tests
"N802",
]
# permit relative import in subpackage root
"datalad_next/*/__init__.py" = ["TID252"]
[tool.commitizen]
name = "cz_customize"
tag_format = "$version"
version_scheme = "pep440"
version_provider = "scm"
changelog_incremental = true
template = ".changelog.md.j2"
gpg_sign = true
[tool.commitizen.customize]
commit_parser = "^((?P<change_type>feat|fix|rf|perf|test|doc|BREAKING CHANGE)(?:\\((?P<scope>[^()\r\n]*)\\)|\\()?(?P<breaking>!)?|\\w+!):\\s(?P<message>.*)?(?P<body>.*)?"
change_type_order = ["BREAKING CHANGE", "feat", "fix", "rf", "perf", "doc", "test"]
changelog_pattern = "^((BREAKING[\\-\\ ]CHANGE|\\w+)(\\(.+\\))?!?):"
bump_pattern = "^((BREAKING[\\-\\ ]CHANGE|\\w+)(\\(.+\\))?!?):"
schema_pattern = "(?s)(ci|doc|feat|fix|perf|rf|style|test|chore|revert|bump)(\\(\\S+\\))?!?:( [^\\n\\r]+)((\\n\\n.*)|(\\s*))?$"
[tool.commitizen.customize.bump_map]
"^\\w+!" = "MAJOR"
"^BREAKING" = "MAJOR"
"^feat" = "MINOR"
"^fix" = "PATCH"