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/.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 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 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 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 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 diff --git a/tests/TESTS_HIER_IMPLEMNTIEREN b/tests/TESTS_HIER_IMPLEMNTIEREN new file mode 100644 index 0000000..e69de29