-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (144 loc) · 6.03 KB
/
pyproject.toml
File metadata and controls
160 lines (144 loc) · 6.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
[build-system]
requires = ["uv_build"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-name = "uvtask"
module-root = ""
[project]
authors = [
{ name = "ticdenis", email = "navarrodenis940503@outlook.com" },
]
maintainers = [
{ name = "ticdenis", email = "navarrodenis940503@outlook.com" }
]
classifiers = [
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"Typing :: Typed",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = []
description = "An extremely fast Python task runner."
version = "0.0.0"
keywords = [
"uv",
"uvx",
"scripts",
"tool",
"pyproject",
"task",
"runner",
]
license = { text = "MIT" }
name = "uvtask"
readme = "README.md"
requires-python = ">=3.13"
[dependency-groups]
dev = [
"bandit>=1.9.4", # security-analysis:vulnerabilities
"pip-licenses>=5.5.1", # security-analysis:licenses
"pytest>=9.0.2", # test
"pytest-cov>=7.0.0", # test, coverage
"pytest-xdist>=3.8.0", # test
"radon>=6.0.1", # complexity:visibility
"ruff>=0.15.4", # code-formatter, static-analysis:linter
"ty>=0.0.20", # static-analysis:types
"xenon>=0.9.3", # complexity:enforcement
]
[project.urls]
"documentation" = "https://github.com/aiopy/python-uvtask/README.md"
"repository" = "https://github.com/aiopy/python-uvtask"
[tool.bandit]
exclude_dirs = ["tests"]
skips = []
[tool.coverage.paths]
source = ["uvtask"]
[tool.coverage.run]
data_file = ".venv/var/coverage/.coverage"
disable_warnings = ["no-data-collected"]
source = ["tests"]
[tool.coverage.report]
fail_under = 85
[tool.coverage.html]
directory = ".venv/var/coverage"
[tool.pip-licenses]
allow-only = "Apache;BSD;MIT;MPL"
ignore-packages = [
]
partial-match = true
[tool.pytest.ini_options]
cache_dir = ".venv/var/pytest"
addopts = "-q -n 1 -p no:warnings --no-cov-on-fail"
testpaths = ["tests"]
[tool.ruff]
cache-dir = ".venv/var/ruff"
line-length = 160
target-version = "py313"
respect-gitignore = true
fix = true
lint.select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"C90", # mccabe
"N", # pep8-naming
"PL", # pylint
"RUF", # ruff-specific
]
lint.ignore = [
"PLR0913",
"PLR2004",
]
[tool.ruff.format]
quote-style = "preserve"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.isort]
combine-as-imports = true
force-single-line = false
known-first-party = ["uvtask"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ty.environment]
python-version = "3.13"
[tool.ty.src]
exclude = [
"tests/fixtures/**",
".venv",
]
[tool.run-script]
install = { command = "uv sync --frozen --no-dev", description = "Install dependencies as specified in lockfile, excluding dev dependencies" }
upgrade-install = { command = "uv sync --frozen --no-dev --upgrade --refresh", description = "Upgrade and refresh installation of non-dev dependencies" }
dev-install = { command = "uv sync --dev --all-extras", description = "Install all dependencies including dev and extras" }
upgrade-dev-install = { command = "uv sync --dev --all-extras --upgrade --refresh", description = "Upgrade and refresh installation of all dependencies including dev and extras" }
code-formatter = { command = "uv run ruff format uvtask tests", description = "Format code with ruff" }
security-analysis = { command = ["security-analysis:licenses", "security-analysis:vulnerabilities"], description = "Run all security analysis checks" }
"security-analysis:licenses" = { command = "uv run pip-licenses", description = "Check third-party dependencies licenses using pip-licenses" }
"security-analysis:vulnerabilities" = { command = "uv run bandit -r -c pyproject.toml uvtask tests", description = "Scan code for security vulnerabilities using bandit" }
static-analysis = { command = ["static-analysis:linter", "static-analysis:types"], description = "Run all static analysis checks" }
"static-analysis:linter" = { command = "uv run ruff check uvtask tests", description = "Run linter checks using ruff" }
"static-analysis:types" = { command = "uv run ty check uvtask tests", description = "Run type checks using ty" }
complexity = { command = ["complexity:visibility", "complexity:enforcement"], description = "Run complexity analysis and enforcement" }
"complexity:visibility" = { command = ["uv run radon cc uvtask -a -nb", "uv run radon mi uvtask -nb"], description = "Show cyclomatic complexity and maintainability metrics using radon" }
"complexity:enforcement" = { command = "uv run xenon --max-absolute C --max-modules B --max-average A uvtask", description = "Ensure code complexity stays within allowed limits using xenon" }
test = { command = ["unit-tests", "integration-tests", "functional-tests"], description = "Run all tests with pytest" }
unit-tests = { command = "uv run pytest tests/unit", description = "Run unit tests with pytest" }
integration-tests = { command = "uv run pytest tests/integration", description = "Run integration tests with pytest" }
functional-tests = { command = "uv run pytest -n1 tests/functional", description = "Run functional tests with pytest" }
coverage = { command = "uv run pytest -n1 --cov --cov-report=html", description = "Run tests with coverage report in HTML using pytest" }
clean = { command = """python -c "import shutil, glob; [shutil.rmtree(p, ignore_errors=True) for pattern in ['build', 'dist', '*.egg-info', '**/__pycache__'] for p in glob.glob(pattern, recursive=True)]" """, description = "Remove build artifacts and cache directories" }
[project.scripts]
uvtask = "uvtask.cli:main"