build(pyproject.toml): add a template pyproject

This commit is contained in:
2025-07-14 17:27:31 +02:00
parent 6bd72c838d
commit 2aaf232739

81
pyproject.toml Normal file
View File

@@ -0,0 +1,81 @@
[build-system]
requires = ["uv_build>=0.7.15,<0.8.0"]
build-backend = "uv_build"
[project]
name = "project-name"
version = "0.1.0"
description = "project description"
readme = "README.md"
authors = [
{ name = "", email = "" }
]
requires-python = ">=3.13"
dependencies = []
license = { text = "" }
[dependency-groups]
bump = [
"git-cliff>=2.9.1",
"python-semantic-release>=10.2.0",
]
test = [
"pytest>=4.2.1",
"pytest-cov>=6.2.1",
"pytest-github-actions-annotate-failures>=0.3.0",
"pytest-mock>=3.14.1",
]
[tool.ruff]
line-length = 79
exclude = [
"tests/*"
]
[tool.ruff.lint.pycodestyle]
max-line-length = 79
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"**/{tests,docs,tools}/*" = ["E402"]
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 72
[tool.pytest.ini_options]
addopts = [
"--cov-report=term-missing",
"--cov-report=html",
"--cov-fail-under=100",
]
[tool.coverage.run]
omit = [
"src/REPLACE_WITH_DIR/__init__.py",
"examples/*",
"docs/*",
"tests/*",
]
[tool.semantic_release]
version_variables = ["src/REPLACE_WITH_DIR/__init__.py:__version__"]
version_toml = ["pyproject.toml:project.version"]
build_command_env = []
commit_message = "chore(release): {version}\n\nAutomatically generated by python-semantic-release"
commit_parser = "conventional"
logging_use_named_masks = false
major_on_zero = true
allow_zero_version = true
no_git_verify = false
tag_format = "{version}"
[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "semantic-release <semantic-release>"
[tool.semantic_release.commit_parser_options]
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
default_bump_level = 0