Files
esta-python-template/pyproject.toml
2025-10-11 17:03:02 +02:00

95 lines
2.9 KiB
TOML

[project]
name = "esta-python-template"
description = "Template for ESTA Python projects. Can be used to generate a new ESTA Python project."
authors = [
{name = "Ferdinand Niedermann", email="<ferdinand.niedermann@sbb.ch>"}
]
readme = "README.md"
license = "Proprietary"
dynamic = ["version", "dependencies"]
requires-python = "~=3.12.0" # = fix minor version to 3.12.*
[project.urls]
repository = "https://code.sbb.ch/projects/KD_ESTA_BLUEPRINTS/repos/esta-python-template"
documentation = "https://code.sbb.ch/projects/KD_ESTA_BLUEPRINTS/repos/esta-python-template/browse/README.md"
[tool.poetry]
version = "0.0.0" # Version is ignored and set by Tekton. Use pipeline to increase.
requires-poetry = ">=2.0"
package-mode = false
[tool.poetry.dependencies]
python = "~3.12"
copier = "^9.7.1"
[tool.poetry.group.dev.dependencies]
coverage = {extras = ["toml"], version = "~7.10.0"} # Code coverage measurement for Python
unittest-xml-reporting = "~3.2" # unittest-based test runner with Ant/JUnit like XML reporting.
pre-commit = "~4.3.0" # A framework for managing and maintaining multi-language pre-commit hooks.
pre-commit-hooks = "~6.0.0" # Some out-of-the-box hooks for pre-commit.
tomli = "~2.2.0" # A lil' TOML parser
pyyaml = "~6.0" # YAML parser and emitter for Python
ruff = "~0.13.0" # Extremely fast python linter and formatter
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.run]
command_line = "-m xmlrunner discover --output-file junittest.xml"
[tool.ruff]
line-length = 140
indent-width = 4
exclude = [
".git",
".git-rewrite",
".ipynb_checkpoints",
".mypy_cache",
".pyenv",
".pytype",
".ruff_cache",
".venv",
".vscode",
"**/*.yaml",
"**/*.yml"
]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.ruff.lint]
select = [
"D", "E", "W", # Pydocstyle rules
"I", # Isort rules
"PL", # Pylint rules
"F", # Pyflake
"N", # Pep8-naming
"G", # Flake8-logging-format
"ARG", # Flake8-unused-arguments
"RUF100", # fail on unused noqa
]
ignore=[]
fixable = ["I"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D", "E", "W"] # Ignore Pydocstyle warnings & errors in "test/*" directory
"template/tests/**/*.py" = ["D", "E", "W"] # Ignore Pydocstyle warnings & errors for tests in the template
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 8