-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
158 lines (138 loc) · 4.01 KB
/
pyproject.toml
File metadata and controls
158 lines (138 loc) · 4.01 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
# 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",
"Topic :: Office/Business :: Financial",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
]
dependencies = [
"typer>=0.15.2",
# 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.ruff]
target-version = "py311"
line-length = 88
[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"]