-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
246 lines (209 loc) · 8.69 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
# SPDX-FileCopyrightText: Copyright © 2024 André Anjos <[email protected]>
# SPDX-License-Identifier: MIT
[build-system]
requires = ["hatchling", "versioningit"]
build-backend = "hatchling.build"
[project]
name = "pelican-icons"
dynamic = ["version"]
description = "Add SVG and webfont icons to Pelican content"
readme = "README.md"
authors = [{ name = "Andre Anjos", email = "[email protected]" }]
license = "MIT"
keywords = ["pelican", "plugin", "svg", "icons"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Framework :: Pelican",
"Framework :: Pelican :: Plugins",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"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",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.9,<4.0"
dependencies = ["pelican>=4.5", "docutils"]
[project.optional-dependencies]
qa = ["pre-commit"]
test = ["pytest", "pytest-cov", "markdown", "beautifulsoup4"]
[project.urls]
Homepage = "https://github.com/anjos/pelican-icons"
"Issue Tracker" = "https://github.com/anjos/pelican-icons/issues"
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64"]
[tool.pixi.dependencies]
python = ">=3.9,<4.0"
pelican = ">=4.5"
docutils = "*"
[tool.pixi.tasks]
compile = "python -m compileall .pixi/envs/$PIXI_ENVIRONMENT_NAME -q"
[tool.pixi.feature.self.pypi-dependencies]
pelican-icons = { path = ".", editable = true }
[tool.pixi.feature.qa.dependencies]
pre-commit = "*"
ruff = "*"
reuse = "*"
[tool.pixi.feature.qa.tasks]
qa-install = "pre-commit install"
qa = "pre-commit run --all-files"
qa-ci = "pre-commit run --all-files --show-diff-on-failure --verbose"
[tool.pixi.feature.test.dependencies]
pytest = "*"
pytest-cov = "*"
markdown = "*"
beautifulsoup4 = "*"
[tool.pixi.feature.test.tasks]
test = "pytest -sv --no-cov tests/"
test-cov = "pytest -sv --cov-report 'html:html/coverage' tests/"
test-ci = "pytest -sv --cov-report 'html:html/coverage' --cov-report 'xml:coverage.xml' --junitxml 'junit-coverage.xml' --ignore '.profile' tests/"
[tool.pixi.feature.build.dependencies]
hatch = "*"
versioningit = "*"
twine = "*"
[tool.pixi.feature.build.tasks]
build = "hatch build"
check = "twine check dist/*"
upload = "twine upload dist/*"
upload-testpypi = "twine upload --repository testpypi dist/*"
[tool.pixi.feature.dev.dependencies]
pdbpp = "*"
[tool.pixi.feature.dev.tasks]
self-update = "uv pip install --editable . --no-deps --no-build-isolation"
[tool.pixi.feature.py39.dependencies]
python = "3.9.*"
[tool.pixi.feature.py310.dependencies]
python = "3.10.*"
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.feature.py313.dependencies]
python = "3.13.*"
[tool.pixi.environments]
default = { features = ["qa", "build", "test", "dev", "self"] }
qa = { features = ["qa"] }
build = { features = ["build"] }
test39 = { features = ["py39", "test", "self"] }
test310 = { features = ["py310", "test", "self"] }
test311 = { features = ["py311", "test", "self"] }
test312 = { features = ["py312", "test", "self"] }
test313 = { features = ["py313", "test", "self"] }
[tool.hatch.version]
source = "versioningit"
# versioningit configuration via tool.hatch.version table
default-version = "0.0.0+unknown"
next-version.method = "smallest"
# Example formatted version: 1.2.4-dev42+ge174a1f
format.distance = "{next_version}.dev{distance}+{vcs}{rev}"
# Example formatted version: 1.2.4-dev42+ge174a1f.d20230922
format.distance-dirty = "{next_version}.dev{distance}+{vcs}{rev}.d{build_date:%Y%m%d}"
[tool.hatch.build.targets.sdist]
include = ["src/pelican/plugins/icons/**/*.py", "LICENSES/*.txt"]
[tool.hatch.build.targets.wheel]
packages = ["src/pelican"]
[tool.ruff.lint.isort]
combine-as-imports = true
force-sort-within-sections = true
known-first-party = ["pelican"]
[tool.ruff]
line-length = 88
target-version = "py39"
src = ["src/pelican"]
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
"A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear
"BLE", # https://docs.astral.sh/ruff/rules/#flake8-blind-except
"C4", # https://docs.astral.sh/ruff/rules/#flake8-comprehensions
"COM", # https://docs.astral.sh/ruff/rules/#flake8-commas-com
"D", # https://docs.astral.sh/ruff/rules/#pydocstyle-d
"E", # https://docs.astral.sh/ruff/rules/#error-e
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
"I", # https://docs.astral.sh/ruff/rules/#isort-i
"ICN", # https://docs.astral.sh/ruff/rules/#flake8-import-conventions
"ISC", # https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
"LOG", # https://docs.astral.sh/ruff/rules/#flake8-logging-log
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
"NPY", # https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
"PGH", # https://docs.astral.sh/ruff/rules/#pygrep-hooks
"PL", # https://docs.astral.sh/ruff/rules/#pylint
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
"Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
"SLF", # https://docs.astral.sh/ruff/rules/#flake8-self-slf
"T10", # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"T20", # https://docs.astral.sh/ruff/rules/#flake8-print-t20
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
"W", # https://docs.astral.sh/ruff/rules/#warning-w
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific rules
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify
"TID", # https://docs.astral.sh/ruff/rules/#flake8-tidy-imports
"TRY", # https://docs.astral.sh/ruff/rules/#tryceratops
"YTT", # https://docs.astral.sh/ruff/rules/#flake8-2020
]
ignore = [
"B905", # https://docs.astral.sh/ruff/rules/zip-without-explicit-strict/
"COM812", # https://docs.astral.sh/ruff/rules/missing-trailing-comma/
"D100", # https://docs.astral.sh/ruff/rules/undocumented-public-module/
"D102", # https://docs.astral.sh/ruff/rules/undocumented-public-method/
"D104", # https://docs.astral.sh/ruff/rules/undocumented-public-package/
"D105", # https://docs.astral.sh/ruff/rules/undocumented-magic-method/
"D107", # https://docs.astral.sh/ruff/rules/undocumented-public-init/
"D202", # https://docs.astral.sh/ruff/rules/no-blank-line-after-function/
"D205", # https://docs.astral.sh/ruff/rules/blank-line-after-summary/
"D212", # https://docs.astral.sh/ruff/rules/multi-line-summary-first-line/
"D213", # https://docs.astral.sh/ruff/rules/multi-line-summary-second-line/
"E302", # https://docs.astral.sh/ruff/rules/blank-lines-top-level/
"E402", # https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file/
"E501", # https://docs.astral.sh/ruff/rules/line-too-long/
"ISC001", # https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"**/tests/*.py" = ["D", "E501"]
[tool.numpydoc_validation]
checks = [
"all", # report on all checks, except the ones below
"ES01", # Not all functions require extended summaries
"EX01", # Not all functions require examples
"GL01", # Expects text to be on the line after the opening quotes but that is in direct opposition of the sphinx recommendations and conflicts with other pre-commit hooks.
"GL08", # Causes issues if we don't have a docstring at the top of the file. Disabling this might fail to catch actual missing docstrings.
"PR04", # numpydoc does not currently support PEP484 typehints, which we are using
"RT03", # Since sphinx is unable to understand type annotations we need to remove some types from 'Returns', which breaks this check.
"SA01", # We do not use Also sections
"SS06", # Summary will span multiple lines if too long because of reformatting by other hooks.
]
exclude = [ # don't report on objects that match any of these regex
'\.__len__$',
'\.__getitem__$',
'\.__iter__$',
'\.__setstate__$',
'\.__exit__$',
]
override_SS05 = [ # override SS05 to allow docstrings starting with these words
'^Process ',
'^Assess ',
'^Access ',
'^This',
]
[tool.pytest.ini_options]
addopts = [
"--cov=pelican.plugins.icons",
"--cov-report=term-missing",
"--import-mode=append",
]
junit_logging = "all"
junit_log_passing_tests = false
[tool.coverage.run]
relative_files = true