Files
2026-09-24 15:45:31 +02:00

75 lines
2.1 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[build-system]
requires = ["setuptools>=69"]
build-backend = "setuptools.build_meta"
[project]
name = "physics-sandbox"
version = "1.0.0"
description = "Interaktive 2D-Physik-Sandbox mit eigener Physik-Engine (Rendering mit pygame-ce)"
readme = "README.md"
requires-python = ">=3.10"
dependencies = ["pygame-ce>=2.5"]
[project.scripts]
physics-sandbox = "sandbox.main:main"
[tool.setuptools.packages.find]
where = ["src"]
# --------------------------------------------------------------------------- ruff
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # Import-Sortierung
"B", # bugbear: typische Fehlerquellen
"UP", # moderne Python-Syntax
"SIM", # Vereinfachungen
"N", # Namenskonventionen
"C4", # Comprehensions
"PIE",
"RUF",
"D", # Docstrings für Module, Klassen und öffentliche Funktionen
"ANN", # Type Hints durchgehend
"PLR2004", # keine Magic Numbers in Vergleichen
]
ignore = [
"D105", # Docstrings für Dunder-Methoden (__add__ usw.) wären reines Rauschen
"D107", # __init__ wird im Klassen-Docstring beschrieben
# Kommentare und Docstrings sind deutsch und nutzen bewusst Formelzeichen (·, ×, ², ω, μ):
"RUF001", "RUF002", "RUF003",
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# Testfunktionen sprechen über ihre Namen für sich; Zahlenwerte in Asserts sind gewollt.
"tests/**" = ["D101", "D102", "D103", "PLR2004"]
# --------------------------------------------------------------------------- pytest
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
addopts = "--strict-markers"
markers = [
"slow: länger laufende Tests (Stresstest, Smoke-Test der Hauptschleife)",
]
# --------------------------------------------------------------------------- coverage
[tool.coverage.run]
source = ["sandbox"]
branch = true
[tool.coverage.report]
show_missing = true
exclude_also = [
"if __name__ == .__main__.:",
"raise NotImplementedError",
]