-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
211 lines (186 loc) · 4.06 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
[project]
name = "human-readable"
dynamic = ["version"]
description = "Human Readable"
authors = [
{ name = "staticdev", email = "[email protected]"}
]
license = {text = "MIT"}
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"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",
]
requires-python = ">=3.8"
dependencies = []
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
[project.urls]
homepage = "https://github.com/staticdev/human-readable"
repository = "https://github.com/staticdev/human-readable"
documentation = "https://human-readable.readthedocs.io"
changelog = "https://github.com/staticdev/human-readable/releases"
[tool.hatch.envs.default]
dependencies = [
"pytest",
"pytest-mock",
"freezegun",
]
[tool.hatch.envs.default.scripts]
all = [
"hatch run pre-commit:run",
"hatch run safety:run",
"hatch run mypy:run",
"hatch run tests:run",
"hatch run coverage:run",
"hatch run typeguard:run",
"hatch run xdoctest:run"
]
[tool.hatch.envs.sessions.scripts]
run-pre-commit = [ "hatch run pre-commit:run" ]
run-safety = [ "hatch run safety:run" ]
run-mypy = [ "hatch run mypy:run" ]
run-tests = [ "hatch run tests:run" ]
run-typeguard = [ "hatch run typeguard:run" ]
run-xdoctest = [ "hatch run xdoctest:run" ]
run-docs-build = [ "hatch run docs-build:run" ]
[[tool.hatch.envs.sessions.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.pre-commit]
dependencies = [
"bandit",
"black",
"flake8",
"flake8-bugbear == 22.*",
"flake8-docstrings",
"isort",
"pep8-naming",
"pre-commit",
"pre-commit-hooks",
"pyupgrade",
]
[tool.hatch.envs.pre-commit.scripts]
run = [
"pre-commit run --all-files --show-diff-on-failure",
]
[tool.hatch.envs.safety]
dependencies = [
"safety",
]
[tool.hatch.envs.safety.scripts]
run = [
"hatch dep show requirements -p | safety check --stdin --bare"
]
[tool.hatch.envs.mypy]
dependencies = [
"mypy",
"pytest",
"freezegun",
]
[tool.hatch.envs.mypy.scripts]
run = [
"mypy src/ tests/ docs/conf.py",
]
[tool.hatch.envs.tests]
dependencies = [
"coverage[toml]",
"pytest",
"pytest_mock",
"pygments",
"freezegun",
]
[tool.hatch.envs.tests.scripts]
run = [
"coverage run --parallel -m pytest"
]
[tool.hatch.envs.coverage]
dependencies = [
"coverage[toml]",
]
[tool.hatch.envs.coverage.scripts]
run = [
"- coverage combine",
"coverage report",
]
run-xml = [
"coverage xml"
]
[tool.hatch.envs.typeguard]
dependencies = [
"pytest",
"pytest_mock",
"freezegun",
"typeguard",
"pygments",
]
[tool.hatch.envs.typeguard.scripts]
run = [
"pytest --typeguard-packages=human_readable",
]
[tool.hatch.envs.xdoctest]
dependencies = [
"xdoctest[colors]",
]
[tool.hatch.envs.xdoctest.scripts]
run = [
"python -m xdoctest human_readable all",
]
[tool.hatch.envs.docs-build]
dependencies = [
"sphinx",
"furo",
"myst-parser",
]
[tool.hatch.envs.docs-build.scripts]
run = [
"rm -rf docs/_build",
"sphinx-build docs docs/_build"
]
[tool.hatch.envs.docs]
dependencies = [
"sphinx",
"sphinx-autobuild",
"furo",
"myst-parser",
]
[tool.hatch.envs.docs.scripts]
run = [
"rm -rf docs/_build",
"sphinx-autobuild --open-browser docs docs/_build",
]
[tool.coverage.paths]
source = ["src", "*/site-packages"]
tests = ["tests", "*/tests"]
[tool.coverage.run]
branch = true
source = ["human_readable", "tests"]
[tool.coverage.report]
show_missing = true
fail_under = 100
[tool.isort]
profile = "black"
force_single_line = true
lines_after_imports = 2
[tool.mypy]
strict = true
warn_unreachable = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
[[tool.mypy.overrides]]
module = ["pytest_mock"]
ignore_missing_imports = true
[tool.hatch.build]
exclude = [
"src/human_readable/locale/**/*.po",
]
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"