-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (165 loc) · 5.03 KB
/
Copy pathpyproject.toml
File metadata and controls
190 lines (165 loc) · 5.03 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
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "chantal"
version = "1.6.5"
description = "Unified offline repository mirroring for RPM and APT"
readme = "README.md"
requires-python = ">=3.12"
license = {text = "MIT"}
authors = [
{name = "Simon Lauger", email = "simon@lauger.de"}
]
keywords = ["rpm", "yum", "dnf", "repository", "mirror", "sync", "rhel", "centos"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: System :: Archiving :: Mirroring",
"Topic :: System :: Systems Administration",
]
dependencies = [
# Core
"click>=8.1.7",
"pydantic>=2.5.0",
"pyyaml>=6.0.1",
"packaging>=23.0",
# Database
"sqlalchemy>=2.0.23",
"psycopg2-binary>=2.9.9",
"alembic>=1.13.0",
# HTTP & Downloads
"requests>=2.31.0",
"urllib3>=2.1.0",
# Compression
"zstandard>=0.23.0", # >=0.23.0 includes type stubs
# GPG signing (APT/RPM filtered mode)
"python-gnupg>=0.5.0",
# RSA signing of APK indexes (APKINDEX.tar.gz)
"cryptography>=42.0",
# Progress & UI
"tqdm>=4.66.0",
"rich>=13.7.0",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.3",
"pytest-asyncio>=0.21.1",
"pytest-cov>=4.1.0",
"mypy==2.1.0", # Pinned to ensure consistent type checking across environments
"black==26.5.1", # Pinned to ensure consistent formatting across environments
"ruff>=0.1.6",
"yamllint>=1.35.0",
"types-PyYAML>=6.0.12",
"types-requests>=2.31.0",
]
[project.urls]
Homepage = "https://github.com/slauger/chantal"
Documentation = "https://github.com/slauger/chantal#readme"
Repository = "https://github.com/slauger/chantal"
Issues = "https://github.com/slauger/chantal/issues"
[project.scripts]
chantal = "chantal.cli.main:cli"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
chantal = ["py.typed"]
# Black configuration
[tool.black]
line-length = 100
target-version = ["py312"]
include = '\.pyi?$'
# Ruff configuration
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E402", # module level import not at top (false positives with docstrings)
"E501", # line too long (handled by black)
]
# MyPy configuration
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
# python-gnupg ships no type stubs
[[tool.mypy.overrides]]
module = "gnupg.*"
ignore_missing_imports = true
# Pytest configuration
[tool.pytest.ini_options]
minversion = "7.0"
addopts = "-ra -q --strict-markers"
testpaths = ["tests"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
markers = [
"e2e: end-to-end sync->publish tests (build a fixture repo, sync, publish)",
"rpm: RPM-plugin e2e tests (selected by the rpm CI leg)",
"apt: APT/DEB-plugin e2e tests (selected by the apt CI leg)",
"helm: Helm-plugin e2e tests (selected by the helm CI leg)",
"apk: Alpine APK-plugin e2e tests (selected by the apk CI leg)",
]
# Coverage configuration
[tool.coverage.run]
source = ["src/chantal"]
omit = ["tests/*", "*/migrations/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
]
# Semantic release configuration.
# Release notes are published only in the GitHub Release (no CHANGELOG.md in the
# repo); the release workflow passes `changelog: false` to the action.
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
version_variables = ["src/chantal/__init__.py:__version__"]
build_command = "pip install build && python -m build"
commit_parser = "conventional"
major_on_zero = true
tag_format = "v{version}"
commit_message = "chore(release): {version} [skip ci]"
upload_to_pypi = false
upload_to_release = true
[tool.semantic_release.commit_parser_options]
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
[tool.semantic_release.branches.main]
match = "(main|master)"
prerelease = false
# Release-candidate channel: pushing the `rc` branch cuts prerelease versions
# (e.g. 0.2.0-rc.1). The release workflow publishes prereleases to TestPyPI
# only, never to PyPI.
[tool.semantic_release.branches.rc]
match = "rc"
prerelease = true
prerelease_token = "rc"