-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
93 lines (80 loc) · 2.78 KB
/
Copy pathpyproject.toml
File metadata and controls
93 lines (80 loc) · 2.78 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
[project]
name = "your-favourite-package-name"
description = "Description of your package"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [{ name = "your name", email = "your@email.address" }]
keywords = ["your", "important", "keywords"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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",
]
dependencies = [] # add all the dependencies here
dynamic = ["readme", "version"]
[project.urls]
Changelog = "https://github.com/Hochfrequenz/python_template_repository/releases"
Homepage = "https://github.com/Hochfrequenz/python_template_repository"
[dependency-groups]
tests = ["pytest==9.1.1"]
linting = [{ include-group = "tests" }, "ruff==0.16.0"]
type_check = [{ include-group = "tests" }, "mypy==2.3.0"]
spell_check = ["codespell==2.4.3"]
coverage = [{ include-group = "tests" }, "coverage==7.15.2"]
# build/twine are only needed to build & publish this package to PyPI, not by users installing it, so they live
# here rather than as a pip-installable extra.
packaging = ["build==1.5.0", "twine==6.2.0"]
dev = [
{ include-group = "tests" },
{ include-group = "linting" },
{ include-group = "type_check" },
{ include-group = "spell_check" },
{ include-group = "coverage" },
"pre-commit",
]
[tool.uv]
# don't auto-include the "dev" group in every `uv sync`/`uv run` invocation, so that CI jobs can pull in just the
# one group they need (e.g. `uv run --group linting ...`) without also installing every other tool.
default-groups = []
[tool.ruff]
line-length = 120
extend-exclude = ["*.md"]
[tool.ruff.lint]
select = ["E", "W", "F", "I", "UP", "B", "N", "PL", "RUF"]
ignore = [
"PLR0913", # too-many-arguments
"PLR0917", # too-many-positional-arguments
"PLR0912", # too-many-branches
"PLR0915", # too-many-statements
"PLR2004", # magic-value-comparison
]
[mypy]
truethy-bool = true
[tool.mypy]
disable_error_code = []
[build-system]
requires = ["hatchling>=1.29.0", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
fragments = [{ path = "README.md" }]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/_your_package_version.py"
template = '''
version = "{version}"
'''
[tool.hatch.build.targets.sdist]
exclude = ["/unittests"]
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]