-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
267 lines (249 loc) · 9.31 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
[project]
# Docs: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
name = "click-extra"
version = "4.11.8"
# Python versions and their status: https://devguide.python.org/versions/
requires-python = ">= 3.10"
description = "🌈 Drop-in replacement for Click to make user-friendly and colorful CLI"
authors = [{ name = "Kevin Deldycke", email = "[email protected]" }]
readme = "readme.md"
keywords = [
'ansi-colors',
'cli',
'cloup',
'colorization',
'configuration',
'console',
'ini',
'json',
'logging',
'multiplatform',
'pygments',
'pytest',
'python',
'python-tabulate',
'sphinx',
'terminal',
'toml',
'xml',
'yaml',
]
classifiers = [
# See: https://pypi.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: Plugins',
'Framework :: Pytest',
'Framework :: Sphinx',
'Framework :: Sphinx :: Extension',
'Framework :: Sphinx :: Theme',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Documentation :: Sphinx',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: User Interfaces',
'Topic :: System :: Logging',
'Topic :: System :: Shells',
'Topic :: Terminals',
'Topic :: Text Processing :: Filters',
'Topic :: Text Processing :: Markup :: HTML',
'Topic :: Text Processing :: Markup :: Markdown',
'Topic :: Text Processing :: Markup :: XML',
'Topic :: Text Processing :: Markup :: reStructuredText',
'Topic :: Utilities',
'Typing :: Typed',
]
dependencies = [
# XXX boltons.ecoutils 23.0.0 breaks PDB interactive sessions in pytest.
# Investigation of the root cause is being discussed upstream at:
# https://github.com/mahmoud/boltons/issues/334
"boltons ~= 24.1.0",
# Click 8.1.4 fix @group.command calls with a custom command_class. See:
# https://github.com/pallets/click/issues/2416
# https://github.com/pallets/click/pull/2417
"click ~= 8.1.4",
# Cloup 3.0.5 fix incompatibility with autodoc: https://github.com/janluke/cloup/issues/177
"cloup ~= 3.0.5",
"extra-platforms ~= 1.6.0",
"mergedeep ~= 1.3.4",
"pyyaml ~= 6.0.0",
# requests 2.28.2 is the first version to support charset_normalizer 3.x.
"requests ~= 2.32.3",
# tabulate 0.9 is the first to add `*grid` and `*outline` formats.
"tabulate [widechars] ~= 0.9",
"tomli ~= 2.0.1 ; python_version < '3.11'",
"wcmatch ~= 10.0",
"xmltodict ~= 0.14.2",
]
[project.optional-dependencies]
pygments = [
# Pygments 2.14.0 is the first version with ``lexers.algebra.GAPConsoleLexer`` that is referenced in our code.
"pygments ~= 2.14",
# pygments-ansi-color 0.3.0 is the first version to set the default theme of ANSI colors.
"pygments-ansi-color ~= 0.3.0",
]
sphinx = [
# Pygments 2.14.0 is the first version with ``lexers.algebra.GAPConsoleLexer`` that is referenced in our code.
"pygments ~= 2.14",
# pygments-ansi-color 0.3.0 is the first version to set the default theme of ANSI colors.
"pygments-ansi-color ~= 0.3.0",
# Pallets-Sphinx-Themes 2.1.1 is the first version removing old and conflicting Python 2 code.
"Pallets-Sphinx-Themes ~= 2.3.0",
# Sphinx 8 is the first version to drop Python 3.9.
"sphinx ~= 8.1.3",
]
pytest = ["pytest >= 8"]
test = [
"coverage [toml] ~= 7.6.0",
"extra-platforms[pytest] ~= 1.6.0",
"pytest ~= 8.3.1",
# More pytest plugins at: https://docs.pytest.org/en/latest/reference/plugin_list.html
"pytest-cases ~= 3.8.3",
"pytest-cov ~= 6.0.0",
"pytest-github-actions-annotate-failures ~= 0.2.0",
"pytest-httpserver ~= 1.1.0",
"pytest-randomly ~= 3.16.0",
]
typing = [
"types-Pygments ~= 2.18.0.20240506",
"types-PyYAML ~= 6.0.12.9",
"types-requests ~= 2.32.0.20240622",
"types-tabulate ~= 0.9.0.2",
"types-xmltodict ~= 0.14.0.20241009",
]
docs = [
"furo ~= 2024.8.6",
"myst-parser ~= 4.0.0",
# Sphinx 8 is the first version to drop Python 3.9.
"sphinx ~= 8.1.3",
"sphinx-autodoc-typehints ~= 2.5.0",
"sphinx-copybutton ~= 0.5.2",
"sphinx-design ~= 0.6.0",
"sphinx-issues ~= 5.0.0",
"sphinxcontrib-mermaid ~= 1.0.0",
"sphinxext-opengraph ~= 0.9.0",
"tomli ~= 2.0.1 ; python_version < '3.11'",
]
[project.urls]
"Homepage" = 'https://github.com/kdeldycke/click-extra'
"Documentation" = 'https://kdeldycke.github.io/click-extra'
"Repository" = 'https://github.com/kdeldycke/click-extra'
"Funding" = "https://github.com/sponsors/kdeldycke"
"Issues" = "https://github.com/kdeldycke/click-extra/issues"
"Changelog" = "https://github.com/kdeldycke/click-extra/blob/main/changelog.md"
[tool.uv]
package = true
[project.entry-points."pygments.formatters"]
ansi-html-formatter = "click_extra.pygments:AnsiHtmlFormatter"
[project.entry-points."pygments.filters"]
ansi-filter = "click_extra.pygments:AnsiFilter"
[project.entry-points."pygments.lexers"]
# The name of the entrypoint value doesn’t really matter, Pygments extracts required metadata from the class definition.
# Source: https://pygments.org/docs/plugins/#defining-plugins-through-entrypoints
ansi-bash-session = "click_extra.pygments:AnsiBashSessionLexer"
ansi-dylan-console = "click_extra.pygments:AnsiDylanConsoleLexer"
ansi-elixir-console = "click_extra.pygments:AnsiElixirConsoleLexer"
ansi-erlang-shell = "click_extra.pygments:AnsiErlangShellLexer"
ansi-gap-console = "click_extra.pygments:AnsiGAPConsoleLexer"
ansi-julia-console = "click_extra.pygments:AnsiJuliaConsoleLexer"
ansi-matlab-session = "click_extra.pygments:AnsiMatlabSessionLexer"
ansi-msdos-session = "click_extra.pygments:AnsiMSDOSSessionLexer"
ansi-output = "click_extra.pygments:AnsiOutputLexer"
ansi-postgres-console = "click_extra.pygments:AnsiPostgresConsoleLexer"
ansi-power-shell-session = "click_extra.pygments:AnsiPowerShellSessionLexer"
ansi-psysh-console = "click_extra.pygments:AnsiPsyshConsoleLexer"
ansi-python-console = "click_extra.pygments:AnsiPythonConsoleLexer"
ansi-r-console = "click_extra.pygments:AnsiRConsoleLexer"
ansi-ruby-console = "click_extra.pygments:AnsiRubyConsoleLexer"
ansi-sqlite-console = "click_extra.pygments:AnsiSqliteConsoleLexer"
ansi-tcsh-session = "click_extra.pygments:AnsiTcshSessionLexer"
[project.entry-points.pytest11]
# Make additional fixtures available to pytest.
# See: https://docs.pytest.org/en/latest/how-to/writing_plugins.html#making-your-plugin-installable-by-others
click-extra = "click_extra.pytest"
[tool.mypy]
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
pretty = true
[[tool.mypy.overrides]]
ignore_missing_imports = true
module = ["boltons.*", "furo", "mergedeep.*", "pallets_sphinx_themes.*"]
[tool.pytest.ini_options]
# https://docs.pytest.org/en/latest/customize.html#pyproject-toml
addopts = [
"--durations=10",
"--cov=click_extra",
"--cov-report=term",
"--cov-report=xml",
]
# Make sure tests that are expected to fail do not resurect and start working all of a sudden.
xfail_strict = true
# https://coverage.readthedocs.io/en/latest/config.html
[tool.coverage.run]
branch = true
[tool.coverage.report]
precision = 2
[tool.bumpversion]
current_version = "4.11.8"
allow_dirty = true
[[tool.bumpversion.files]]
# Update Python package version in any __init__.py file.
glob = "./**/__init__.py"
ignore_missing_version = true
[[tool.bumpversion.files]]
# Update version in project section.
filename = "./pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'
[[tool.bumpversion.files]]
# Update the version in standard Markdown changelog.
filename = "./changelog.md"
search = "## [{current_version} (unreleased)]("
replace = "## [{new_version} (unreleased)]("
[[tool.bumpversion.files]]
# Update the version in the citation file.
filename = "./citation.cff"
search = "version: {current_version}"
replace = "version: {new_version}"
[[tool.bumpversion.files]]
# Update the release date in the citation file.
filename = "./citation.cff"
regex = true
search = "date-released: \\d{{4}}-\\d{{2}}-\\d{{2}}"
replace = "date-released: {utcnow:%Y-%m-%d}"
[tool.typos]
default.extend-ignore-identifiers-re = [
# error: `Uper` should be `Super`, `Upper`
# --> ./click_extra/tests/test_parameters.py:132:19
# |
# 132 | "sUper",
# | ^^^^
# |
"sUper",
# error: `Als` should be `Also`
# --> ./click_extra/tests/test_parameters.py:198:11
# |
# 198 | "fAlsE": False,
# | ^^^
# |
"fAlsE",
# error: `mey` should be `may`
# --> ./click_extra/tests/test_colorize.py:712:22
# |
# 712 | "H\x1b[32mey\x1b[0m-xx-xxx-\x1b[32mhe\x1b[0mY-xXxXxxxxx-\x1b[32mhey\x1b[0m",
# | ^^^
# |
"mey",
]