-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
125 lines (110 loc) · 2.86 KB
/
pyproject.toml
File metadata and controls
125 lines (110 loc) · 2.86 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "glpkg-cli"
version = "0.1.2"
description = "A CLI tool for uploading files to GitLab's Generic Package Registry"
authors = [{name = "Javier Tia"}]
license = "MIT"
requires-python = ">=3.11"
readme = "README.md"
keywords = ["gitlab", "package", "upload", "cli", "generic-package-registry"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"python-gitlab>=4.0.0",
"rich>=13.0.0",
"GitPython>=3.1.0",
"tenacity>=8.0.0",
"argcomplete>=3.0.0",
]
[project.optional-dependencies]
dev = [
"bump-my-version",
"mypy",
"pex>=2.0.0",
"pre-commit",
"ruff",
"shiv>=1.0.0",
]
test = [
"pytest",
"pytest-xdist",
"pytest-timeout",
"pytest-sugar",
"pytest-instafail",
"pytest-cov",
]
[project.scripts]
glpkg = "glpkg.cli.main:main"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W"]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--tb=short",
"--strict-markers",
"--cov=glpkg",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--cov-fail-under=90",
"--no-cov-on-fail",
]
markers = [
"unit: Unit tests that don't require external dependencies",
"integration: Integration tests requiring GitLab API access",
"fast: Fast-running tests",
"slow: Slow-running tests",
"timeout: Timeout for test execution (provided by pytest-timeout)",
]
# Note: Target coverage is 95% (warning threshold in CI), fail threshold is 90%
[tool.coverage.run]
source = ["src/glpkg"]
omit = ["tests/*", "*/tests/*"]
[tool.coverage.report]
precision = 2
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
[tool.bumpversion]
current_version = "0.1.2"
commit = true
tag = true
tag_name = "v{new_version}"
message = "Bump version: {current_version} → {new_version}"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "src/glpkg/__init__.py"
search = "__version__ = \"{current_version}\""
replace = "__version__ = \"{new_version}\""