Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (169 loc) · 5.43 KB
/
Copy pathpyproject.toml
File metadata and controls
190 lines (169 loc) · 5.43 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
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Linux Foundation
[build-system]
requires = ["hatchling>=1.24", "hatch-vcs>=0.4"]
build-backend = "hatchling.build"
[project]
name = "lfreleng-test-python-project"
dynamic = ["version"]
description = "Sample Python project used for testing actions"
authors = [
{ name = "Matthew Watkins", email = "93649628+ModeSevenIndustrialSolutions@users.noreply.github.com" },
]
license = "Apache-2.0"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Office/Business :: Financial",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
]
dependencies = [
"typer>=0.16.0",
# Note: jupyterlab commented out due to CVE-2025-53000 in nbconvert dependency
# Uncomment if notebook testing is needed (check for security fixes first)
# "jupyterlab>=4.3.6",
]
[project.urls]
Homepage = "https://github.com/lfreleng-actions/test-python-project"
Repository = "https://github.com/lfreleng-actions/test-python-project"
Downloads = "https://github.com/lfreleng-actions/test-python-project/releases"
"Bug Tracker" = "https://github.com/lfreleng-actions/test-python-project/issues"
Documentation = "https://github.com/lfreleng-actions/test-python-project/tree/main/docs"
"Source Code" = "https://github.com/lfreleng-actions/test-python-project"
[project.optional-dependencies]
dev = [
"pytest>=8.3.5",
"pytest-cov>=7.0.0",
"coverage>=7.7.1",
"tox>=4.24.2",
"pre-commit>=4.2.0",
"sphinx>=8.2.3",
"sphinx-copybutton>=0.5.2",
]
[project.scripts]
lfreleng-test-python-project = "lfreleng_test_python_project.cli:app"
# Hatch dynamic versioning from VCS (tags). Example: tag v0.2.3 -> version 0.2.3
[tool.hatch.version]
source = "vcs"
# Optional: control local version scheme (omit commit hash/local segment for reproducible builds)
[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
# Generate a file at build time with the resolved version (importable as lfreleng_test_python_project._version.__version__)
[tool.hatch.build.hooks.vcs]
version-file = "src/lfreleng_test_python_project/_version.py"
# Wheel build configuration (src layout)
[tool.hatch.build.targets.wheel]
packages = ["src/lfreleng_test_python_project"]
# sdists: include everything by default
[tool.hatch.build.targets.sdist]
include = ["src", "README.md", "LICENSE*", "pyproject.toml"]
# Dependency group for uv (mirrors dev extra)
[dependency-groups]
dev = [
"pytest>=8.3.5",
"pytest-cov>=7.0.0",
"coverage>=7.7.1",
"tox>=4.24.2",
"pre-commit>=4.2.0",
"sphinx>=8.2.3",
"sphinx-copybutton>=0.5.2",
]
[tool.pytest.ini_options]
testpaths = [
"tests/",
]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = [
"-v",
"--tb=short",
]
[tool.coverage.run]
source = ["lfreleng_test_python_project"]
omit = ["tests/*"]
data_file = ".coverage"
[tool.coverage.html]
directory = "coverage_html_report"
[tool.coverage.paths]
source = [
"src/",
"*/site-packages/",
]
[tool.coverage.report]
fail_under = 45
skip_empty = true
ignore_errors = true
show_missing = true
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = false
ignore_missing_imports = true
[tool.basedpyright]
# The minimum interpreter, from requires-python above
pythonVersion = "3.11"
pythonPlatform = "All"
typeCheckingMode = "standard"
# Scope a bare basedpyright run, and the editor's language server, to
# the code pytest and the package use. The pre-commit hook passes the
# same directories explicitly, with filename passing disabled, because
# explicit arguments override include.
include = ["src", "tests"]
exclude = [
# Generated at build time by hatch-vcs
"src/lfreleng_test_python_project/_version.py",
# Sample files, not tests: pytest never collects them
"tests/resources",
# Fails by design for python-test-action. Outside include already;
# listed so that widening include cannot pull it in.
"tests_fail",
]
# The src layout: lets tests resolve the package without installing it
extraPaths = ["src"]
# The hook has no third-party packages to resolve against: adding them
# breaks pre-commit.ci's size limit (see .pre-commit-config.yaml), and
# _version.py exists only after a build. An editor using the project
# venv resolves every import, and reports nothing with this enabled.
reportMissingImports = false
[tool.ruff]
target-version = "py311"
line-length = 88
# Fixture data rather than code to lint: tests_fail/ fails by design
# for python-test-action, and tests/resources/ holds sample files.
# The pre-commit hooks pass --force-exclude, so this applies there too.
extend-exclude = ["tests_fail", "tests/resources"]
[tool.ruff.lint]
select = [
"E",
"W",
"F",
"I",
"B",
"C4",
"UP",
]
ignore = [
"E501",
"B008",
"C901",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**/*" = ["S101", "D"]