-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
198 lines (176 loc) · 5.62 KB
/
pyproject.toml
File metadata and controls
198 lines (176 loc) · 5.62 KB
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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "dfetch_hub"
version = "0.0.1"
authors = [
{ name="p sacharias", email="p.sacharias@gmail.com" },
{ name="ben spoor", email="b.spoor@edna.eu" },
]
description = "Catalog browser and static-site generator for dfetch package registries"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
keywords = ["dfetch", "catalog", "package-registry", "vcpkg", "conan", "clib"]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
]
dependencies = [
"dfetch==0.12.1",
"PyYAML>=6.0.2"
]
[project.optional-dependencies] # https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml
development = [
"bandit[toml]==1.9.4",
"black==25.1.0",
"codespell==2.4.1",
"djlint==1.36.4",
"tinycss2==1.5.1",
"py-mini-racer==0.6.0",
"doc8==2.0.0",
"isort==6.0.0",
"mypy==1.14.1",
"pre-commit==4.1.0",
"pydocstyle==6.3.0",
"pylint==3.3.4",
"pyright==1.1.408",
"pyroma==5.0.1",
"pytest==8.3.4",
"pytest-cov==6.0.0",
"ruff==0.15.4",
"vcrpy==7.0.0",
"xenon==0.9.3",
"types-PyYaml==6.0.12"
]
[project.urls]
Homepage = "https://github.com/dfetch-org/dfetch-hub"
Issues = "https://github.com/dfetch-org/dfetch-hub/issues"
[project.scripts]
dfetch-hub = "dfetch_hub.cli:main"
[tool.setuptools.packages.find]
include = ["dfetch_hub*"]
[tool.setuptools.package-data]
dfetch_hub = [
"site/*",
"data/*.json",
"data/**/*.json",
]
[tool.black]
line-length = 120
[tool.isort]
profile = "black"
line_length = 120
[tool.pylint.format]
max-line-length = "120"
[tool.pylint.design]
max-attributes = 8
max-branches = 8
max-locals = 12
max-returns = 4
max-statements = 25
max-bool-expr = 3
max-module-lines = 500
[tool.mypy]
files = "dfetch_hub"
ignore_missing_imports = false
follow_untyped_imports = true
strict = true
warn_unreachable = true
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
select = [
"A", # flake8-builtins: shadowing built-ins
# "ANN", # require type annotations everywhere
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear: likely bugs and design issues
"C4", # flake8-comprehensions: unnecessary comprehension forms
"DTZ", # forbid naive datetimes
"E", # pycodestyle errors
"ERA", # remove commented-out code
"F", # pyflakes: undefined names, unused imports
"G", # flake8-logging-format: correct logging API usage
"ICN", # enforce import conventions
"N", # pep8-naming
"PERF", # perflint: performance anti-patterns
"PIE", # flake8-pie: misc lint improvements
# "PL", # pylint rules via ruff
"PTH", # flake8-use-pathlib: prefer pathlib over os.path / open()
"RET", # flake8-return: return statement hygiene
"RSE", # flake8-raise: raise statement hygiene
"RUF", # ruff-specific rules
# "S", # flake8-bandit security checks (if not duplicating bandit)
"SIM", # flake8-simplify
"T20", # flake8-print: no print() in production code
"TCH", # flake8-type-checking: move imports to TYPE_CHECKING
"TRY", # tryceratops: exception-handling hygiene
"UP", # pyupgrade: use modern Python syntax
"W", # pycodestyle warnings
]
ignore = [
"E501", # line length: enforced by pylint at 120 chars
"UP037", # remove `from __future__ import annotations`: kept per project convention
"SIM108", # ternary operator: readability preference
"TRY003", # long exception messages in raise: acceptable for clarity
"TRY300", # return-in-try: acceptable pattern
"RET505", # superfluous else-after-return: readability preference
]
[tool.ruff.lint.per-file-ignores]
"test/*.py" = ["S101", "PL"] # Allow usage of assert statements in test files
[tool.ruff.lint.isort]
known-first-party = ["dfetch_hub"]
[tool.djlint]
profile = "html"
indent = 2
max_line_length = 120
format_js = false # djlint misidentifies JS regex tokens as HTML; keep script content verbatim
format_css = false # CSS is intentionally minified; keep style content verbatim
ignore = "H021,H031" # H021: inline styles intentional in single-file app; H031: meta keywords tag is obsolete
[tool.doc8]
max-line-length = 120
extension = [".md", ".rst"]
ignore-path = ["*.egg-info/*", "build/*", "dist/*", ".venv/*"]
show-source = true
strict = true
[tool.pydocstyle]
convention = "google"
[tool.bandit]
targets = ["dfetch_hub"]
skips = []
severity = "LOW"
confidence = "LOW"
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "strict"
venvPath = "."
venv = ".venv"
include = ["dfetch_hub"]
reportMissingTypeStubs = "none"
reportUnknownVariableType = "warning"
reportUnknownArgumentType = "warning"
reportUnknownMemberType = "warning"
[tool.pytest.ini_options]
testpaths = ["test"]
addopts = "--cov=dfetch_hub --cov-report=term-missing"
[tool.coverage.run]
source = ["dfetch_hub"]
omit = ["dfetch_hub/site/*"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
[tool.codespell]
skip = "./dfetch_hub/data/*"