generated from datalad/datalad-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
237 lines (208 loc) · 6.05 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
[build-system]
requires = [
"hatchling",
"hatch-vcs",
]
build-backend = "hatchling.build"
[project]
name = "datalad-remake"
dynamic = ["version"]
description = ''
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
keywords = [
"datalad",
"git",
"git-annex",
]
authors = [
{ name = "The DataLad Team and Contributors", email = "[email protected]" },
]
maintainers = [
# { name = "Michael Hanke", email = "[email protected]" },
]
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 3 - Alpha",
"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",
"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",
"Programming Language :: Python :: Implementation :: PyPy",
]
# This section is required to allow the direct refernces to the `datalad_core`
# in the dependencies section below and in
# `tool.hatch.envs.hatch-test.extra_dependencies`. Remove the section
# `tool.hatch.metadata` when `datalad_core` is available on PyPI.
[tool.hatch.metadata]
allow-direct-references = true
dependencies = [
"annexremote",
"datalad",
"datalad_core @ git+https://github.com/datalad/datalad-core",
"datalad_next",
"datasalad",
"toml",
]
[project.urls]
Homepage = "https://github.com/datalad/datalad-remake"
Documentation = "https://github.com/datalad/datalad-remake#readme"
Issues = "https://github.com/datalad/datalad-remake/issues"
Source = "https://github.com/datalad/datalad-remake"
Changelog = "https://github.com/datalad/datalad-remake/blob/main/CHANGELOG.md"
[project.scripts]
git-annex-remote-datalad-remake = "datalad_remake.annexremotes.remake_remote:main"
[project.entry-points."datalad.extensions"]
remake = "datalad_remake:command_suite"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "datalad_remake/_version.py"
[tool.hatch.envs.hatch-test]
default-args = ["datalad_remake"]
extra-dependencies = [
"datalad_next",
"datalad_core @ git+https://github.com/datalad/datalad-core",
"hypothesis",
"pytest",
# if you come here, because coverage combination crashed for you
# run `hatch test --cover` and/or see
# https://github.com/pypa/hatch/issues/1565#issuecomment-2163773123
"pytest-cov",
"toml",
]
[tool.hatch.envs.hatch-test.env-vars]
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 = [
"hypothesis",
"mypy>=1.0.0",
"pytest",
]
[tool.hatch.envs.types.scripts]
check = [
"mypy --install-types --non-interactive --python-version 3.11 --pretty --show-error-context datalad_remake",
]
[tool.hatch.envs.docs]
description = "build Sphinx-based docs"
extra-dependencies = [
"sphinx",
]
[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"
[tool.coverage.run]
source_pkgs = ["datalad_remake", "tests"]
branch = true
parallel = true
omit = [
# "src/datalad_remake/__about__.py",
]
data_file = "${COVERAGE_ROOT-.}/.coverage"
[tool.coverage.paths]
datalad_remake = ["src/datalad_remake", "*/datalad_remake/src/datalad_remake"]
tests = ["tests", "*/datalad_remake/*/tests"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
[tool.ruff]
exclude = [
# sphinx
"docs",
"resources/type_stubs",
]
line-length = 88
indent-width = 4
target-version = "py311"
[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_remake/*/__init__.py" = ["TID252"]
[tool.commitizen]
name = "cz_customize"
tag_format = "v$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"