From b0ed1bd1c7eb6aa9e54d39f7a9e62afb092b90db Mon Sep 17 00:00:00 2001 From: Kevin Kopp Date: Mon, 22 Jun 2026 15:21:31 +0200 Subject: [PATCH] Tooling angepasst --- tooling/demo2_ruff.py | 2 -- tooling/demo3_formatting.py | 6 ------ tooling/pyproject.toml | 29 ++++++++++++++++++++++++++--- tooling/src/calculator.py | 4 +--- 4 files changed, 27 insertions(+), 14 deletions(-) delete mode 100644 tooling/demo3_formatting.py diff --git a/tooling/demo2_ruff.py b/tooling/demo2_ruff.py index 538eb4c..064fea6 100644 --- a/tooling/demo2_ruff.py +++ b/tooling/demo2_ruff.py @@ -3,5 +3,3 @@ import math name = "Max" print(nam) - -# terminal -> ruff check . -> ruff check . --fix diff --git a/tooling/demo3_formatting.py b/tooling/demo3_formatting.py deleted file mode 100644 index 25fcff5..0000000 --- a/tooling/demo3_formatting.py +++ /dev/null @@ -1,6 +0,0 @@ -from src.calculator import add - -print("Manueller Test: ") -print(add(2, 3)) - -# Terminal -> pytest diff --git a/tooling/pyproject.toml b/tooling/pyproject.toml index e3d1ef6..f019f8b 100644 --- a/tooling/pyproject.toml +++ b/tooling/pyproject.toml @@ -1,5 +1,28 @@ -[tool.ruff] -line-length = 88 +# 1. DAS VERPACKUNGS-SYSTEM +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" +# 2. PROJEKT-METADATEN & VENV-ABHÄNGIGKEITEN +[project] +name = "mein_projekt" +version = "1.0.0" +requires-python = ">=3.11" + +# ABHÄNGIGKEITEN +dependencies = [ + "requests", # Beispiel für eine normale Library +] + +# 3. CONFIG RUFF +[tool.ruff] +line-length = 88 # Wann wird eine Zeile automatisch umgebrochen? + +[tool.ruff.lint] +# E = Style-Fehler, F = Logik-Fehler, I = Imports sortieren +select = ["E", "F", "I"] + +# 4. CONFIG PYTEST [tool.pytest.ini_options] -testpaths = ["tests"] \ No newline at end of file +testpaths = ["tests"] # Wo liegen die Test-Dateien? +addopts = "-v" # -v steht für "verbose" (ausführliche Test-Ausgabe) \ No newline at end of file diff --git a/tooling/src/calculator.py b/tooling/src/calculator.py index e00a52c..17a0ee5 100644 --- a/tooling/src/calculator.py +++ b/tooling/src/calculator.py @@ -3,6 +3,4 @@ def multiply(a, b): x = [1, 2, 3] -print(x) - -#Terminal -> ruff format . \ No newline at end of file +print(x) \ No newline at end of file