-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
190 lines (168 loc) · 4.27 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
[build-system]
requires = ["hatchling==1.27.0"]
build-backend = "hatchling.build"
[project]
name = "columbo"
version = "0.14.0"
description = "Specify a dynamic set of questions to ask a user and get their answers."
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.9"
authors = [
{ name = "Patrick Lannigan", email = "p.lannigan@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"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 :: 3.13",
]
dependencies = [
"prompt-toolkit~=3.0",
"typing-extensions>=4.4.0,<5; python_version < '3.10'",
]
[project.urls]
Homepage = "https://github.com/plannigan/columbo"
changelog = "https://github.com/plannigan/columbo/blob/main/CHANGELOG.md"
issues = "https://github.com/plannigan/columbo/issues"
documentation = "https://plannigan.github.io/columbo"
[tool.hatch.build.targets.sdist]
include = [
"/columbo",
]
# environment management & scripts
[tool.hatch.envs.default]
description = "Test and lint the project code"
dependencies = [
"bandit==1.8.0",
"black==24.10.0",
"flake8==7.1.1",
"isort==5.13.2",
"mypy==1.14.0",
"pytest==8.3.4",
"pytest-cov==6.0.0",
"pytest-mock==3.14.0",
"pdbpp==0.10.3",
]
[tool.hatch.envs.default.scripts]
test-no-cov = "pytest --no-cov {args}"
test = "pytest --cov-report html {args}"
test-ci = "pytest {args}"
typing = "mypy"
_fmt = [
"black --quiet .",
"isort .",
]
black-check = "black --check --diff ."
isort-check = "isort --check-only ."
flake8-check = "flake8"
bandit-ci = "bandit --ini .bandit -r ."
bandit-check = "bandit-ci --quiet"
check-strict = [
"black-check",
"isort-check",
"typing",
"test",
"flake8-check",
"bandit-check",
]
check = [
"_fmt",
"typing",
"test",
"flake8-check",
"bandit-check",
]
test-docs-examples = [
"./docker/validate_docs.sh"
]
[tool.hatch.envs.bump]
description = "Release a new version"
detached = true
dependencies = [
"hyper-bump-it==0.5.3"
]
[tool.hatch.envs.bump.scripts]
it = "hyper-bump-it {args}"
[tool.hatch.envs.docs]
description = "Generate documentation for the project"
dependencies = [
"mike==2.1.3",
"markdown-include==0.8.1",
"mkdocs==1.6.1",
"mkdocs-material==9.5.49",
"mkdocs-minify-plugin==0.8.0",
"mkdocs-redirects==1.2.2",
"mkdocstrings[python]==0.27.0",
]
[tool.hatch.envs.docs.scripts]
build = "mkdocs build --strict"
serve = "mkdocs serve --dev-addr=0.0.0.0:8000"
# type checking
[tool.mypy]
files = [
"columbo",
"tests",
]
show_error_codes = true
warn_unused_configs = true
pretty = true
strict = true
disallow_any_explicit = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = [
"tests.*",
]
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"tests.sample_data",
]
disallow_untyped_defs = true
# testing
[tool.pytest.ini_options]
addopts = "--cov=columbo --cov-report xml:/tmp/coverage.xml --cov-report term-missing"
testpaths = ["tests"]
verbosity_assertions = 2
[tool.coverage.run]
branch = true
data_file = "/tmp/columbo_coverage"
[tool.coverage.report]
fail_under = 90
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover"
]
# code formatting
[tool.black]
line-length = 88
target-version = ["py39", "py310", "py311", "py312", "py313"]
[tool.isort]
profile = "black"
# version bumping
[tool.hyper-bump-it.git.actions]
commit = "create-and-push"
branch = "create-and-push"
[[tool.hyper-bump-it.files]]
file_glob = "pyproject.toml"
keystone = true
search_format_pattern = "version = \"{version}\""
[[tool.hyper-bump-it.files]]
file_glob = "columbo/__init__.py"
[[tool.hyper-bump-it.files]]
file_glob = "docs/index.md"
search_format_pattern = "Columbo - {version}"
[[tool.hyper-bump-it.files]]
file_glob = "CHANGELOG.md"
search_format_pattern = "## [Unreleased]"
replace_format_pattern = """## [Unreleased]
## [{version}] - {today}"""
[[tool.hyper-bump-it.files]]
file_glob = ".github/ISSUE_TEMPLATE/bug_report.md"
search_format_pattern = "`columbo` Version [e.g. {version}]"