From 2aaf2327390b36225b45ac8769ae6c8e8da336f8 Mon Sep 17 00:00:00 2001 From: Artur Borecki Date: Mon, 14 Jul 2025 17:27:31 +0200 Subject: [PATCH] build(pyproject.toml): add a template pyproject --- pyproject.toml | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..47eb722 --- /dev/null +++ b/pyproject.toml @@ -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 " + +[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