### Installing Dependencies and Setting Up Environment Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Installs project dependencies, compiles Cython modules, and creates an isolated virtual environment using Poetry. ```bash poetry install ``` -------------------------------- ### Install Poetry on Linux Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Commands to install Poetry on Linux distributions. It includes checking the Python version, downloading and running the installation script, and verifying the installation. ```bash python3 --version curl -sSL https://install.python-poetry.org | python3 - poetry --version ``` -------------------------------- ### Linux Environment Setup for Lutris Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Sets environment variables required for ares-sc2 to interact with StarCraft II when installed via Lutris on Linux. Users need to replace placeholders with their specific username and Wine version. ```shell export SC2PF=WineLinux export SC2PATH="/home/`(username)`/Games/battlenet/drive_c/Program Files (x86)/StarCraft II/" export WINE="/home/`(username)`/.local/share/lutris/runners/wine/`(version of wine)`/bin/wine" ``` -------------------------------- ### PyCharm Poetry Environment Setup Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Instructions for adding a Poetry-managed Python environment to a PyCharm project. This ensures PyCharm uses the correct interpreter and dependencies. ```APIDOC PyCharm Poetry Environment Setup: 1. Obtain Poetry Environment Path: Run `poetry env list --full-path` in your terminal to find the path to your Poetry environment. 2. Add Interpreter in PyCharm: - Open your project in PyCharm. - Navigate to `File` > `Settings` > `Project: [Your Project Name]` > `Python Interpreter`. - Click `Add Interpreter` > `Add Local Interpreter`. - Select `Poetry Environment` and then `Existing Environment`. - Browse to the path obtained in step 1, and select the `Scripts/python.exe` file within that environment. Benefits: - The Poetry environment will be automatically activated in PyCharm's integrated terminal. - New run configurations will be pre-configured to use this environment. ``` -------------------------------- ### Running the Bot Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Executes the StarCraft II bot using Poetry. It may require adjusting the MAPS_PATH in run.py for non-standard installations or Linux. ```bash poetry run python run.py ``` -------------------------------- ### Initialize Git Submodules Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Commands to initialize and update Git submodules, which is necessary to resolve the 'does not seem to be a Python package' error. ```bash git submodule update --init git submodule update --init --recursive --remote ``` -------------------------------- ### Create Windows Executable (Local) Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Command to generate a self-contained Windows executable for the bot using PyInstaller. This executable, along with build files, is required for playing against the bot via SC2AIApp. ```bash poetry run python scripts/create_pyinstaller_exe.py ``` -------------------------------- ### PyCharm Mark Sources Root Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Instructions for marking the 'ares-sc2/src' directory as a Sources Root in PyCharm to enable correct IntelliSense functionality. ```APIDOC PyCharm Mark Sources Root: To ensure PyCharm's IntelliSense works correctly with the project structure: 1. Locate the `ares-sc2/src` folder in the PyCharm `Project` panel. 2. Right-click on the `ares-sc2/src` folder. 3. Select `Mark Directory as` > `Sources Root`. ``` -------------------------------- ### Format Code Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Commands to format the project's code using Black for code style and isort for import sorting. ```bash black . isort . ``` -------------------------------- ### Enable AI Arena Upload Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Configuration steps to enable automatic uploading of the ladder-zip.zip artifact to the AI Arena ladder. Requires setting a config value and GitHub secrets. ```yaml AutoUploadToAiarena: True ``` -------------------------------- ### Creating Ladder Zip for AI Arena Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md This script, located in `scripts/create_ladder_zip.py`, is used to generate a deployable zip file for the AI Arena. It requires a Linux environment due to cython dependencies. A GitHub workflow automates this process on pushes to the 'main' branch. ```python # Example usage (conceptual, actual script not provided): # from scripts.create_ladder_zip import create_zip # create_zip() ``` -------------------------------- ### Cloning the Bot Repository Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Clones a Git repository for a new bot project, ensuring that all submodules are also initialized and updated using the --recursive flag. ```bash git clone --recursive ``` -------------------------------- ### Navigating to Bot Directory Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Changes the current working directory to the root of the bot's project folder. ```bash cd ``` -------------------------------- ### Update ares-sc2 Source: https://github.com/aressc2/ares-sc2-bot-template/blob/main/README.md Command to update the ares-sc2 library. This process may take a minute or two to complete. ```bash python scripts/update_ares.py ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.