-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (156 loc) · 5.1 KB
/
pyproject.toml
File metadata and controls
175 lines (156 loc) · 5.1 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
# ===================================================================
# pyproject.toml for the devrig package.
# ===================================================================
[build-system]
requires = ["setuptools>=80.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "devrig"
version = "0.0.0a0"
description = "A standardized development and build rig for modern Python applications. It provides a complete toolchain for ensuring code quality (linting, formatting, testing). It orchestrates the compilation of projects into high-performance binaries and their packaging into secure, minimal container images for cloud-native deployment."
readme = "README.md"
requires-python = ">=3.13"
license = { file = "LICENSE" }
authors = [
{ name = "mesotron.dev", email = "mail@mesotron.dev" },
]
maintainers = [
{ name = "mesotron.dev", email = "mail@mesotron.dev" },
]
keywords = [
"ruff", "pytest", "coverage", "quality", "lint", "dev-tools",
"build-tools", "nuitka", "compiler", "binary", "containers",
"podman", "docker", "cloud-native", "distroless", "ci-cd"
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing :: Code Coverage",
"Topic :: System :: Software Distribution",
]
dependencies = [
"click",
"coverage[toml]>=7.5.0",
"mypy~=1.16.1",
"mypy_extensions>=1.0.0",
"pytest>=8.0",
"pytest-mock>=3.14",
"ruff>=0.12",
"tomli>=2.2.1",
"tomli-w>=1.2.0",
]
[project.optional-dependencies]
dev = [
"pip-tools>=7.4.1",
"build>=1.2.1",
"twine>=5.1.1",
"keyring>=25.2.1",
"keyrings.google-artifactregistry-auth>=1.1.2",
"requests>=2.32.4",
"nuitka>=2.7.13",
]
[project.urls]
Homepage = "https://github.com/nortosem/devrig"
Repository = "https://github.com/nortosem/devrig"
[project.scripts]
devrig = "devrig.cli:main"
dr = "devrig.cli:main"
# =====================================================================
# Tool Configurations
# ===================================================================
[tool.setuptools.packages.find]
where = ["src"]
include = ["devrig*"]
# ===================================================================
# Ruff Configuration
# ===================================================================
# This provides a default configuration for projects using devrig.
# A project can override these settings in its own pyproject.toml.
[tool.ruff]
target-version = "py313"
line-length = 80
exclude = [".venv", "dev_env", ".git", "__pycache__", "build", "dist"]
cache-dir = "./dist/.ruff_cache"
[tool.ruff.lint]
select = ["E", "W", "F", "I", "UP", "B", "PL", "D"]
ignore = [
"PLR0904", "PLR2004", "D100", "D101", "D102", "D103", "D104",
"D105", "D106", "D107", "D203", "D213", "PLR1722",
]
dummy-variable-rgx = "^(_|main)$"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D100", "D101", "D102", "D103", "D104", "D107", "PLR0904"]
[tool.ruff.lint.pylint]
max-args = 10
[tool.ruff.lint.pep8-naming]
classmethod-decorators = ["classmethod", "classproperty"]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
docstring-code-line-length = 80
# ===================================================================
# MyPy Configuration
# ===================================================================
[tool.mypy]
mypy_path = "src"
python_version = "3.13"
pretty = true
cache_dir = "./dist/.mypy_cache"
sqlite_cache = true
cache_fine_grained = true
exclude = [
"tests/", "build/", "dist/", "venv/", "dev_env/", "prod_env/",
"src/*.egg-info/", "requirements.py",
]
strict = true
show_error_context = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
ignore_missing_imports = true
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
# ===================================================================
# PyTest & Coverage Configuration
# ===================================================================
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
addopts = "-ra -vv --strict-markers --basetemp=dist/tmp"
cache_dir = "dist/.pytest_cache"
python_files = "tests.py test_*.py *_tests.py"
[tool.coverage.run]
# The 'source' should be set by the project using devrig.
# e.g., source = ["my_project_name"]
source = ["devrig"]
branch = true
data_file = "./dist/.coverage"
[tool.coverage.report]
fail_under = 75
show_missing = true
skip_covered = false
precision = 2
exclude_lines = [
"raise AssertionError",
"raise NotImplementedError",
'if __name__ == "__main__:"',
"@(abc\\.)?abstractmethod",
"^\\s*pass\\s*$",
]
[tool.coverage.html]
directory = "dist/docs/coverage_report"