From ebe6419aa497129f11b966a44b1bdab1b4c9ea71 Mon Sep 17 00:00:00 2001 From: Julia Imlauer Date: Sun, 18 Aug 2024 14:33:00 +0200 Subject: [PATCH 1/6] tasks for testgeneration --- src/__init__.py | 0 src/aufgaben_package/__init__.py | 0 src/aufgaben_package/personen.py | 7 +++++++ src/aufgaben_package/rechen_operation.py | 13 +++++++++++++ 4 files changed, 20 insertions(+) create mode 100644 src/__init__.py create mode 100644 src/aufgaben_package/__init__.py create mode 100644 src/aufgaben_package/personen.py create mode 100644 src/aufgaben_package/rechen_operation.py diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/aufgaben_package/__init__.py b/src/aufgaben_package/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/aufgaben_package/personen.py b/src/aufgaben_package/personen.py new file mode 100644 index 0000000..3f67c9d --- /dev/null +++ b/src/aufgaben_package/personen.py @@ -0,0 +1,7 @@ +class Person: + def __init__(self, name, alter): + self.name = name + self.alter = alter + + def __str__(self): + return f"{self.name} ({self.alter})" \ No newline at end of file diff --git a/src/aufgaben_package/rechen_operation.py b/src/aufgaben_package/rechen_operation.py new file mode 100644 index 0000000..fc396d1 --- /dev/null +++ b/src/aufgaben_package/rechen_operation.py @@ -0,0 +1,13 @@ +def erhoehe_um_zwei(zahl): + return zahl + 2 + +def multipliziere_mit_drei(zahl): + return zahl * 3 + +def subtrahiere_zehn(zahl): + return zahl - 10 + +def teile_durch_vier(zahl): + if zahl % 4 != 0: + raise ValueError("Zahl muss durch 4 teilbar sein") + return zahl / 4 From 8d7edc250f4d7bc7524ff8c53b333f4958bedf84 Mon Sep 17 00:00:00 2001 From: Julia Imlauer Date: Sun, 18 Aug 2024 14:43:32 +0200 Subject: [PATCH 2/6] hint for test impl --- tests/TESTS_HIER_IMPLEMNTIEREN | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/TESTS_HIER_IMPLEMNTIEREN diff --git a/tests/TESTS_HIER_IMPLEMNTIEREN b/tests/TESTS_HIER_IMPLEMNTIEREN new file mode 100644 index 0000000..e69de29 From 67646cb85223251eaa26ded1362f28b4b6470b58 Mon Sep 17 00:00:00 2001 From: Julia Imlauer Date: Sun, 18 Aug 2024 14:44:38 +0200 Subject: [PATCH 3/6] adding pyproject --- pyproject.toml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9d00e60 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,36 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "aufgaben_package" +version = "1.0.0" +description = "Übung für Tests" +readme = "README.md" +requires-python = ">=3.6" +dependencies = [ + "pytest==8.3.2" +] +license = { text = "LinkedIn Learning Exercise Files License" } +authors = [ + { name = "Julia Imlauer", email = "info@linkedinlearning.com" } +] +keywords = ["python", "grundkurs", "linkedinlearning"] +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: LinkedIn Learning Exercise Files License", + "Operating System :: OS Independent" +] + +[project.urls] +"Homepage" = "https://github.com/LinkedInLearning/python-grundkurs-2685000" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools] +license-files = ["LICENSE"] + + +# 'Installation' mittels pyproject.toml +# pip install . \ No newline at end of file From dddcf70cbb91ba85e89301e8fc32f8838778010c Mon Sep 17 00:00:00 2001 From: Julia Imlauer Date: Sun, 18 Aug 2024 14:51:37 +0200 Subject: [PATCH 4/6] adding pytest ini file --- .gitignore | 1 + pytest.ini | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 pytest.ini diff --git a/.gitignore b/.gitignore index 4b64bc3..6562291 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules .tmp npm-debug.log +*__pycache__* \ No newline at end of file diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..b893048 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +pythonpath = src \ No newline at end of file From c3edb791e98607d48d1c32cb1f0f28be01dc5957 Mon Sep 17 00:00:00 2001 From: Julia Imlauer Date: Sun, 18 Aug 2024 15:15:27 +0200 Subject: [PATCH 5/6] adopting code settings --- .vscode/settings.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 687866a..512e458 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,5 +20,9 @@ "workbench.activityBar.visible": true, "workbench.colorTheme": "Visual Studio Dark", "workbench.fontAliasing": "antialiased", - "workbench.statusBar.visible": true + "workbench.statusBar.visible": true, + "python.analysis.extraPaths": [ + "${workspaceFolder}/src", + "./src" + ] } \ No newline at end of file From 5be541c3824db405c80befbd9d3c36922e80575b Mon Sep 17 00:00:00 2001 From: GregorMoretti Date: Wed, 27 Nov 2024 09:00:02 +0000 Subject: [PATCH 6/6] Moving files using main --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d867e71..114359d 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Dieses Problem lösen Sie wie folgt: Add changes to git using this command: git add . Commit changes using this command: git commit -m "some message" -### Autor +### Autorin **Dr. Julia Imlauer** @@ -39,5 +39,5 @@ _Robotikerin | ML-Expertin | AI-Enthusiastin_ Sehen Sie sich andere Kurse des Autors auf [LinkedIn Learning](https://www.linkedin.com/learning/instructors/julia-imlauer) an. [0]: # (Replace these placeholder URLs with actual course URLs) -[lil-course-url]: https://www.linkedin.com/learning/tbd -[lil-thumbnail-url]: https://media.licdn.com/dms/image/D560DAQHy88_RfLwlJw/learning-public-crop_675_1200/0/1687258117518?e=2147483647&v=beta&t=Dfk6Yk8Uljvd9UtwpxGyhpWhx_UF31ccWdm8XXuCIMI +[lil-course-url]: https://www.linkedin.com/learning/python-grundkurs-25087490 +[lil-thumbnail-url]: https://media.licdn.com/dms/image/v2/D4E0DAQGVDy6GhNuQrg/learning-public-crop_675_1200/learning-public-crop_675_1200/0/1732613158551?e=2147483647&v=beta&t=5LC7lo-5r3cDZmF-extYK9uspoQn-T692GVco2Na7xM