Skip to content
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

[Feat] Deprecate Python 3.8, add Python 3.12 + update CI/CD #1246

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c9fa974
feat(pyproject.toml): deprecate python 3.8 and add python 3.13
David-GERARD Dec 3, 2024
81fb067
feat(README.md): deprecate python 3.8 and add python 3.12,3.13
David-GERARD Dec 3, 2024
ddac964
ci(build-publish.yml): deprecate python 3.8 and add python 3.13
David-GERARD Dec 3, 2024
1a8497b
ci(linux-test.yml): deprecate python 3.8 and add python 3.13
David-GERARD Dec 3, 2024
4949c5f
ci(linux-tutorials-test.yml): deprecate python 3.8 and add python 3.1…
David-GERARD Dec 3, 2024
34327d8
ci(macos-test.yml): deprecate python 3.8, add python 3.13
David-GERARD Dec 3, 2024
251ad42
docs(basic_usage.md): deprecate python 3.8 and add python 3.12,3.13
David-GERARD Dec 3, 2024
16ea895
feat: remove python 3.13 as not supported by pygame
David-GERARD Dec 4, 2024
7d318f2
ci: remove python 3.13 as not supported by pygame
David-GERARD Dec 4, 2024
3f36bc3
build: switch to pygame 2.6.0 to unable python 3.12
David-GERARD Dec 4, 2024
b340eb7
chore: pre-commit
David-GERARD Dec 4, 2024
d02e7dd
ci(linux-tutorials-test.yml): remove python 3.13 from agilerl test
David-GERARD Dec 4, 2024
964cf88
test: fix pygame to 2.6.0 to test if CI passes
David-GERARD Dec 4, 2024
fa88fb6
improve deps installation process in workflows/linux-tutorials-test.yml
mwydmuch Jan 7, 2025
c4bd472
install all deps in workflows/linux-tutorials-test.yml
mwydmuch Jan 7, 2025
0d0b79c
revert the requirment for pygame>=2.6.0
mwydmuch Jan 7, 2025
8d6aeb7
set ubuntu version in tutorials tests to 22.04
mwydmuch Jan 7, 2025
f23b45d
bump wandb version to support python 3.12
mwydmuch Jan 7, 2025
17872c5
fix agilerl tests
mwydmuch Jan 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
python: 38
platform: manylinux_x86_64
- os: ubuntu-latest
python: 39
platform: manylinux_x86_64
Expand All @@ -35,6 +32,7 @@ jobs:
python: 312
platform: manylinux_x86_64


steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
docs-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ permissions:

jobs:
linux-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/linux-tutorials-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ permissions:

jobs:
tutorial-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false

matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
tutorial: [Tianshou, CustomEnvironment, CleanRL, SB3/kaz, SB3/waterworld, SB3/test] # TODO: fix tutorials and add back Ray, fix SB3/connect_four tutorial
steps:
- uses: actions/checkout@v4
Expand All @@ -31,18 +31,19 @@ jobs:
export PATH=/path/to/parallel:$PATH
export root_dir=$(pwd)
cd tutorials/${{ matrix.tutorial }}
pip install -r requirements.txt
pip uninstall -y pettingzoo
grep -ivE "pettingzoo" requirements.txt > _requirements.txt
pip install -r _requirements.txt
pip install -e $root_dir[all]
pip install -e $root_dir[testing]
AutoROM -v
for f in *.py; do xvfb-run -a -s "-screen 0 1024x768x24" python "$f"; done

agilerl-tutorial-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
tutorial: [AgileRL]
steps:
- uses: actions/checkout@v4
Expand All @@ -56,8 +57,9 @@ jobs:
export PATH=/path/to/parallel:$PATH
export root_dir=$(pwd)
cd tutorials/${{ matrix.tutorial }}
pip install -r requirements.txt
pip uninstall -y pettingzoo
grep -ivE "pettingzoo" requirements.txt > _requirements.txt
pip install -r _requirements.txt
pip install -e $root_dir[all]
pip install -e $root_dir[testing]
AutoROM -v
for f in *.py; do xvfb-run -a -s "-screen 0 1024x768x24" python "$f"; done
2 changes: 1 addition & 1 deletion .github/workflows/macos-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
# Big Sur, Monterey
os: [macos-11, macos-12]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This does not include dependencies for all families of environments (some enviro

To install the dependencies for one family, use `pip install 'pettingzoo[atari]'`, or use `pip install 'pettingzoo[all]'` to install all dependencies.

We support Python 3.8, 3.9, 3.10 and 3.11 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.
We support and maintain PettingZoo for Python 3.9, 3.10, 3.11, and 3.12 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.

Note: Some Linux distributions may require manual installation of `cmake`, `swig`, or `zlib1g-dev` (e.g., `sudo apt install cmake swig zlib1g-dev`)

Expand Down
2 changes: 1 addition & 1 deletion docs/content/basic_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This does not include dependencies for all families of environments (some enviro

To install the dependencies for one family, use `pip install 'pettingzoo[atari]'`, or use `pip install 'pettingzoo[all]'` to install all dependencies.

We support Python 3.8, 3.9, 3.10 and 3.11 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.
We support and maintain PettingZoo for Python 3.9, 3.10, 3.11, and 3.12 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.

## Initializing Environments

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ build-backend = "setuptools.build_meta"
name = "pettingzoo"
description = "Gymnasium for multi-agent reinforcement learning."
readme = "README.md"
requires-python = ">= 3.8"
requires-python = ">= 3.9, <3.13"
authors = [{ name = "Farama Foundation", email = "contact@farama.org" }]
license = { text = "MIT License" }
keywords = ["Reinforcement Learning", "game", "RL", "AI", "gymnasium"]
classifiers = [
"Development Status :: 4 - Beta", # change to `5 - Production/Stable` when ready
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
1 change: 0 additions & 1 deletion tutorials/AgileRL/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ gymnasium>=0.28.1
imageio>=2.31.1
Pillow>=9.5.0
PyYAML>=5.4.1
wandb>=0.13.10
3 changes: 2 additions & 1 deletion tutorials/CustomEnvironment/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pettingzoo==1.24.0
numpy>=1.21.0
pettingzoo>=1.24.0
Loading