Skip to content

Commit

Permalink
Make changes resulting in drop of python3.9 in favor of python3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnySc2 committed Oct 23, 2024
1 parent 0670f4b commit 7197c3b
Show file tree
Hide file tree
Showing 11 changed files with 1,165 additions and 996 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
# Docker image version, see https://hub.docker.com/r/burnysc2/python-sc2-docker/tags
# This version should always lack behind one version behind the docker-ci.yml because it is possible that it doesn't exist
VERSION_NUMBER: '1.0.2'
LATEST_PYTHON_VERSION: '3.11'
LATEST_PYTHON_VERSION: '3.12'
LATEST_SC2_VERSION: '4.10'

jobs:
Expand Down Expand Up @@ -136,8 +136,9 @@ jobs:
# If all type annotations were removed, this library should run in py3.6 and perhaps even 3.5
# Python 3.7 support has been dropped due to missing cached_property (new since Python 3.8) https://docs.python.org/3/library/functools.html#functools.cached_property
# Python 3.8 support has been dropped because numpy >=1.26.0 requires Python >=3.9 (this numpy version is required to run python 3.12)
# Python 3.9 support has been dropped since numpy >=2.1.0 (this numpy version is required to run python 3.13)
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -200,7 +201,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.10', '3.11', '3.12', '3.13']
sc2-version: ['4.10']
env:
IMAGE_NAME: burnysc2/python-sc2:local
Expand Down Expand Up @@ -309,7 +310,7 @@ jobs:
# docker rm -f my_container

run_coverage:
# Run and upload coverage report using python 3.9
# Run and upload coverage report
# This coverage test does not cover the whole testing range, check /bat_files/rune_code_coverage.bat
name: Run coverage
needs: [run_test_bots, run_example_bots]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:
- develop

env:
VERSION_NUMBER: '1.0.3'
LATEST_PYTHON_VERSION: '3.11'
VERSION_NUMBER: '1.0.4'
LATEST_PYTHON_VERSION: '3.12'
LATEST_SC2_VERSION: '4.10'
EXPERIMENTAL_PYTHON_VERSION: '3.12'
EXPERIMENTAL_PYTHON_VERSION: '3.13'

jobs:
run_test_docker_image:
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
sc2-version: ['4.10']
env:
IMAGE_NAME: burnysc2/python-sc2-docker:py_${{ matrix.python-version }}-sc2_${{ matrix.sc2-version }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For a list of ongoing changes and differences to the main repository of Dentosal

By installing this library you agree to be bound by the terms of the [AI and Machine Learning License](http://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html).

For this fork, you'll need Python 3.9 or newer.
For this fork, you'll need Python 3.10 or newer.

Install the pypi package:
```
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set up StarCraft II Test Environment for python-sc2 bots (not pysc2 bots!)
ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.10

# Use an official debian stretch slim release as a base image
FROM python:$PYTHON_VERSION-slim
Expand Down
5 changes: 2 additions & 3 deletions dockerfiles/test_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

# Set which versions to use
export VERSION_NUMBER=${VERSION_NUMBER:-0.9.9}
export PYTHON_VERSION=${PYTHON_VERSION:-3.10}
export PYTHON_VERSION=${PYTHON_VERSION:-3.12}
export SC2_VERSION=${SC2_VERSION:-4.10}

# For better readability, set local variables
Expand Down Expand Up @@ -36,8 +36,7 @@ docker rm -f test_container
# https://docs.docker.com/storage/bind-mounts/#use-a-read-only-bind-mount
docker run -i -d \
--name test_container \
--mount type=bind,source="$(pwd)",destination=/root/python-sc2,readonly \
--entrypoint /bin/bash \
--volume ./:/root/python-sc2:ro \
$IMAGE_NAME

# Install python-sc2, via mount the python-sc2 folder will be available
Expand Down
5 changes: 2 additions & 3 deletions dockerfiles/test_new_python_candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

# Set which versions to use
export VERSION_NUMBER=${VERSION_NUMBER:-0.9.9}
export PYTHON_VERSION=${PYTHON_VERSION:-3.12}
export PYTHON_VERSION=${PYTHON_VERSION:-3.13}
export SC2_VERSION=${SC2_VERSION:-4.10}

# For better readability, set local variables
Expand All @@ -25,8 +25,7 @@ docker rm -f test_container
# https://docs.docker.com/storage/bind-mounts/#use-a-read-only-bind-mount
docker run -i -d \
--name test_container \
--mount type=bind,source="$(pwd)",destination=/root/python-sc2,readonly \
--entrypoint /bin/bash \
--volume ./:/root/python-sc2:ro \
$IMAGE_NAME


Expand Down
6 changes: 3 additions & 3 deletions docs_generate/text_files/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Requirements

Pulling the Docker image
------------------------
The SC2 AI community has decided to stay on Python3.9 for a while. I'll try to update the docker image as soon as a new linux binary is released, or create a pull request at https://github.com/BurnySc2/python-sc2-docker ::
The SC2 AI community has decided to stay on Python3.10 for a while. I'll try to update the docker image as soon as a new linux binary is released, or create a pull request at https://github.com/BurnySc2/python-sc2-docker ::

docker pull burnysc2/python-sc2-docker:release-python_3.9-sc2_4.10_arenaclient_burny
docker pull burnysc2/python-sc2-docker:release-python_3.10-sc2_4.10_arenaclient_burny

Deleting previous containers
-----------------------------
Expand All @@ -26,7 +26,7 @@ Launching a new container
--------------------------
The following command launches a new container in interactive mode, which means it will not shut down once it is done running::

docker run -it -d --name app burnysc2/python-sc2-docker:release-python_3.9-sc2_4.10_arenaclient_burny
docker run -it -d --name app burnysc2/python-sc2-docker:release-python_3.10-sc2_4.10_arenaclient_burny

Install bot requirements
-------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs_generate/text_files/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is an overview to the BurnySc2/python-sc2 library which can be found here:

Requirements
-------------
- Python 3.9 or newer
- Python 3.10 or newer
- StarCraft 2 Client installation in the **default installation path** which should be ``C:\Program Files (x86)\StarCraft II``

Installation
Expand Down
Loading

0 comments on commit 7197c3b

Please sign in to comment.