-
Notifications
You must be signed in to change notification settings - Fork 9
Add python docs #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add python docs #108
Changes from 9 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
88a5376
moved: java dedicated files into sub folder
YoEnte 0d63820
change: python as official supported
YoEnte de820c6
add: python documentation
YoEnte 7eddf56
fix: reviewed suggestions
YoEnte be32c94
add: rule set for nice code style
YoEnte aa0a228
add: base headers for rest of python docs (preview)
YoEnte d44ca5a
Merge branch 'main' into add-python-docs
YoEnte c966117
fix: some moving and adjustments due to merge
YoEnte 95ce098
add: first final version of python docs
YoEnte 31c3c12
fix: suggested changes fixed, index of "entwicklung" below "spiele"
YoEnte 08c7795
Update hyperbook/book/entwicklung/python/2-einrichtung-der-entwicklun…
YoEnte a41efff
Update hyperbook/book/entwicklung/python/2-einrichtung-der-entwicklun…
YoEnte 342a6cb
Update hyperbook/book/entwicklung/python/3-getting-started.md
YoEnte 7c0ec73
Update hyperbook/book/entwicklung/abgabe.md
YoEnte 622a2a5
fix: remove indexing numbers in files, adapt links
YoEnte d9cc377
fix: another two glossary links
YoEnte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...book/book/entwicklung/Anleitung-Abgabe.md → ...book/entwicklung/java/Anleitung-Abgabe.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| name: Java | ||
| index: 8 | ||
| expanded: false | ||
| --- |
2 changes: 1 addition & 1 deletion
2
...book/entwicklung/installation-von-java.md → ...entwicklung/java/installation-von-java.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| --- | ||
| name: Installation von Java | ||
| index: 5 | ||
| index: 1 | ||
| --- | ||
|
|
||
| # Installation von Java | ||
|
|
||
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
hyperbook/book/entwicklung/python/1-installation-von-python.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| name: Installation von Python | ||
| index: 1 | ||
| --- | ||
|
|
||
| # Installation von Python | ||
|
|
||
| Um einen Computerspieler für die Software-Challenge in Python entwickeln zu können, | ||
| müssen einige Vorraussetzungen erfüllt sein. | ||
| Diese Anleitung soll die Vorbereitung und Installation erleichtern. | ||
|
|
||
| ## Grundsätzliches | ||
|
|
||
| Wir bieten die Abgabe eines Python Computerspieler in den Python-Versionen 3.10.x und 3.12.x an | ||
| (dabei steht x für eine beliebige Unterversion). | ||
|
|
||
| In den folgenden Abschnitten wird hauptsächlich die neuere Version 3.12.x gezeigt, aber wenn bei gewissen Befehlen | ||
| `312` oder `3.12` verwendet wird, kann analog für Version 3.10.x auch `310` bzw `3.10` verwendet werden. | ||
| Wenn es größere Unterschiede zwischen den Versionen gibt, wird das detailliert erklärt. | ||
|
|
||
| ## Installation | ||
|
|
||
| Der Download des Python-Installers geschieht über die offizielle Seite der | ||
| [Python Organisation](https://www.python.org/downloads/). | ||
| Dort kann man weiter unten in einer Tabelle die neueste Unterversion von Python 3.12 heraussuchen | ||
| und diese herunterladen. | ||
|
|
||
|  | ||
|
|
||
| Man wählt dann auf der Download-Seite den Installer für das eigene System und führt diesen nach dem Download aus. | ||
| Im (Windows-)Installer hat man dann die Möglichkeit python.exe zu den Umgebungsvariablen (PATH) hinzuzufügen, | ||
| was zu empfehlen ist. Dann kann man die einfache Installation starten. | ||
| Dabei wird auch der Paket-Manager pip installiert, welcher in Zukunft noch gebraucht wird. | ||
|
|
||
| ### Überprüfung | ||
|
|
||
| Nach der Installation kann man mit dem Terminal überprüfen, ob die Installation erfolgreich war. | ||
| Dafür fragt man die Versionen der Programme Python und pip mit folgenden Befehlen ab: | ||
|
|
||
| ```bash | ||
| python --version | ||
| ``` | ||
|
|
||
| ```bash | ||
| pip --version | ||
| ``` | ||
|
|
||
| Bei Python sollte die ausgewählte Version ausgegeben werden und für pip müsste irgendeine Version vorhanden sein, | ||
| die mit einem Dateipfad auf den Ordner der installierten Python-Version verweist. | ||
|
|
||
| Wenn das geklappt hat, ist man bereit für den nächsten Step. | ||
|
|
||
| ### socha-Paket | ||
|
|
||
| Um nun auf die bereitgestellte Schnittstelle für einen Python Computerspieler zugreifen zu können, | ||
| muss das entsprechende Paket mit Hilfe von pip und folgendem Befehl über ein Terminal installiert werden: | ||
|
|
||
| ```bash | ||
| pip install socha | ||
| ``` | ||
|
|
||
| Dabei sollte automatisch die neueste Version verwendet werden, | ||
| welche in der Release Übersicht des offiziellen [Github-Repository](https://github.com/software-challenge/player-python/) | ||
| zur Python Schnittstelle gefunden werden kann: | ||
|
|
||
|  | ||
|
|
||
| Falls nicht die aktuelleste Version installiert wurde, kann man den Befehl auch erweitern, | ||
| um eine spezielle Version auszuwählen (natürlich Version entsprechend anpassen): | ||
|
|
||
| ```bash | ||
| pip install socha==4.1.0 | ||
| ``` |
48 changes: 48 additions & 0 deletions
48
hyperbook/book/entwicklung/python/2-einrichtung-der-entwicklungsumgebung.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| name: Einrichtung der Entwicklungsumgebung | ||
| index: 2 | ||
| --- | ||
|
|
||
| # Einrichtung der (Python-)Entwicklungsumgebung | ||
|
|
||
| Python Code lässt sich mit jedem Text Editor schreiben. | ||
| Wenn man weitere nützliche Features neben dem einfachen Editor haben möchte, | ||
| sollte man zu einer integrierten Entwicklungsumgebung (IDE) greifen, | ||
| welche das Arbeiten wirklich erleichtert. | ||
|
|
||
| Im Folgenden wird die Einrichtung von [Visual Studio Code](https://code.visualstudio.com/) | ||
| (eine IDE von Microsoft, die für sämtliche Sprachen geeignet ist) gezeigt. | ||
| Aber auch Umgebungen wie [PyCharm](https://www.jetbrains.com/pycharm/), | ||
| welche ausschließlich für Python entworfen wurden, sind beliebt. | ||
|
|
||
| **Hinweis:** Bevor die IDE eingerichtet wird, sollten [Python und pip](installation-von-python) erfolgreich | ||
| installiert sein. | ||
|
|
||
| ## Visual Studio Code einrichten | ||
|
|
||
| ### Installation | ||
|
|
||
| Die einfachste Installation geschieht mit Hilfe des VS Code Installers von | ||
| der [Download-Seite](https://code.visualstudio.com/Download). \ | ||
| Nachdem man den die Installer Datei heruntergeladen hat, | ||
| gelangt man im Browser auf eine [Seite](https://code.visualstudio.com/docs/), | ||
| die das Aufsetzen sehr detailliert erklärt. | ||
|
|
||
| Die wichtigsten Schritte bzgl. der Software-Challenge werden hier noch erklärt: | ||
|
|
||
| #### Installer | ||
|
|
||
| Der Installer wird ausgeführt und alle Features, die installiert werden sollen, | ||
| müssen auswählt werden. Dabei lassen sich alle Optionen empfehlen. | ||
|
|
||
| ### Python in VS Code | ||
YoEnte marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Um die angespochenen Unterstützungen für Python nutzen zu können, | ||
| muss man in VS Code eine Erweiterung installieren: | ||
YoEnte marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 1. Im linken Menü auf "Extensions" gehen | ||
| 2. Nach "Python" suchen | ||
| 3. Die "Python" Erweiterung von Microsoft auswählen | ||
| 4. Das Paket installieren | ||
|
|
||
|  | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.