PyRat software used in the computer science course at IMT Atlantique
Project description
|
|
PyRatThis repository contains the software used in the The course is available at this address: The documentation is available at this address: |
Prerequisites
-
This installation procedure assumes that you have basic knowledge about shell manipulation.
-
Also, it assumes that you have already created a virtual environment where to install PyRat. If not, please do this first as described in the official documentation.
-
Finally, we will test PyRat installation using Visual Studio Code (VSCode), as this is the main tool we use in the associated course. Please make sure it is already installed, or install it from the official website. Note that you can use a different tool if you want, but we just provide indications for that one here.
Install the PyRat package
Installation of the PyRat software can be done directly using pip.
To do so, follow steps:
- Open a terminal.
- Activate your virtual environment (change
path_to_venvto the actual path):- Linux:
source path_to_venv/bin/activate. - MacOS:
source path_to_venv/bin/activate". - Windows (cmd):
path_to_venv\Scripts\activate.bat. - Windows (PowerShell):
path_to_venv\Scripts\Activate.ps1.
- Linux:
- Install PyRat through
pipas follows:pip install pyrat-game.
You should see something like this:
Downloading pyrat_game-6.0.0-py3-none-any.whl (4.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 9.6 MB/s eta 0:00:00
Installing collected packages: pyrat-game
Successfully installed pyrat-game-6.0.0
Setup your PyRat workspace
We are now going to create a workspace for PyRat.
This is a directory that contains minimal working examples to get started.
To do so, follow these steps:
- Open a terminal, and navigate (use the
cdcommand) to the directory where you want to create your PyRat workspace. - If not already activated, activate your virtual environment where PyRat is installed (see above).
- Run the following command:
- Linux:
python3 -c "import pyrat; pyrat.init_workspace()" - MacOS:
python3 -c "import pyrat; pyrat.init_workspace()" - Windows (cmd):
python -c "import pyrat; pyrat.init_workspace()" - Windows (PowerShell):
python -c "import pyrat; pyrat.init_workspace()"
- Linux:
You should see something like this:
Workspace created in /path/to/pyrat_workspace`
Workspace added to Python path
Your workspace is ready! You can now start coding your players and run games.
You should have a new directory called pyrat_workspace in the directory where you ran the command.
Check your installation
Now, we are going to verify that PyRat works properly.
To do so, follow these steps:
- Open VSCode, and add your
pyrat_workspacedirectory in your VSCode workspace. - Open the file
sample_game.pyin directorypyrat_workspace/games/. - Make sure VSCode is using your virtual environment where PyRat is installed.
- Run
sample_game.py.
You should see something like this:
Troubleshooting
-
In case of a problem, please check the existing GitHub issues first.
-
If the problem persists, you can add an issue of your own.
-
For students at IMT Atlantique, you can also ask your questions on the Discord server of the course.
-
Finally, you can contact Bastien Pasdeloup directly.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrat_game-6.2.14.tar.gz.
File metadata
- Download URL: pyrat_game-6.2.14.tar.gz
- Upload date:
- Size: 4.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12a41bae4f054739c5e0d636ff8648bb7c7a5718f9b5fe5774323d1555853899
|
|
| MD5 |
c17aa3b00da6265f8763cad775fc745a
|
|
| BLAKE2b-256 |
48c954054e0944c674f45a2e98f3c411a86b4ede8031207beed52ba2f0094848
|
Provenance
The following attestation bundles were made for pyrat_game-6.2.14.tar.gz:
Publisher:
publish_to_pypi.yml on BastienPasdeloup/PyRat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrat_game-6.2.14.tar.gz -
Subject digest:
12a41bae4f054739c5e0d636ff8648bb7c7a5718f9b5fe5774323d1555853899 - Sigstore transparency entry: 764330469
- Sigstore integration time:
-
Permalink:
BastienPasdeloup/PyRat@e913db0de563ac782d265294e618352fe82d690e -
Branch / Tag:
refs/tags/6.2.14 - Owner: https://github.com/BastienPasdeloup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@e913db0de563ac782d265294e618352fe82d690e -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyrat_game-6.2.14-py3-none-any.whl.
File metadata
- Download URL: pyrat_game-6.2.14-py3-none-any.whl
- Upload date:
- Size: 4.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e86e13527c962ee06230a24c3ea0a137ae80542474ad8b9b287b1f1fd454731
|
|
| MD5 |
4e3bff25204978d945661b1a9e6af92b
|
|
| BLAKE2b-256 |
5c0b6bc9e79064837a063737e8c18451330779d55873c097f0cfec05a9ba5ccc
|
Provenance
The following attestation bundles were made for pyrat_game-6.2.14-py3-none-any.whl:
Publisher:
publish_to_pypi.yml on BastienPasdeloup/PyRat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyrat_game-6.2.14-py3-none-any.whl -
Subject digest:
3e86e13527c962ee06230a24c3ea0a137ae80542474ad8b9b287b1f1fd454731 - Sigstore transparency entry: 764330472
- Sigstore integration time:
-
Permalink:
BastienPasdeloup/PyRat@e913db0de563ac782d265294e618352fe82d690e -
Branch / Tag:
refs/tags/6.2.14 - Owner: https://github.com/BastienPasdeloup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@e913db0de563ac782d265294e618352fe82d690e -
Trigger Event:
release
-
Statement type: