From a8967c63bd1187ce1b33648ffcd023f2d1eaae8b Mon Sep 17 00:00:00 2001 From: Florian Felten Date: Thu, 24 Oct 2024 11:22:50 +0200 Subject: [PATCH 1/7] Python 3.12 --- .github/workflows/test.yml | 2 +- pyproject.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f205a95..9b541846 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/pyproject.toml b/pyproject.toml index d4b42d55..34a539f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", 'Intended Audience :: Science/Research', 'Topic :: Scientific/Engineering :: Artificial Intelligence', ] @@ -80,7 +81,7 @@ mo_gymnasium = [ [tool.black] line-length = 127 -target-version = ['py38', 'py39', 'py310', 'py311'] +target-version = ['py38', 'py39', 'py310', 'py311', 'py312'] include = '\.pyi?$' [tool.isort] From 3321167b89bcc01ec84d3ba07a6d59b1b274f48b Mon Sep 17 00:00:00 2001 From: Florian Felten Date: Thu, 24 Oct 2024 11:30:16 +0200 Subject: [PATCH 2/7] Remove forced mujoco version from tests --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b541846..05c03a6a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: jobs: linux-test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] @@ -21,7 +21,6 @@ jobs: - name: Install dependencies run: | pip install pytest - pip install mujoco==2.3.2 git clone https://github.com/benelot/pybullet-gym.git pip install -e pybullet-gym sudo apt-get update From d613304c1d1cc97583d87cbba8bc6913a76f87e7 Mon Sep 17 00:00:00 2001 From: Florian Felten Date: Thu, 24 Oct 2024 11:37:42 +0200 Subject: [PATCH 3/7] Bump pygame --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 34a539f9..e779a7c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ mario = ["nes-py", "gym-super-mario-bros"] minecart = ["scipy >=1.7.3 "] mujoco = ["mujoco >=2.2.0", "imageio >=2.14.1"] highway = ["highway-env >=1.8"] -box2d = ["box2d-py ==2.3.5", "pygame ==2.1.3.dev8", "swig ==4.*"] +box2d = ["box2d-py ==2.3.5", "pygame >=2.1.3", "swig ==4.*"] all = [ # All dependencies above except accept-rom-license # NOTE: No need to manually remove the duplicates, setuptools automatically does that. @@ -53,7 +53,7 @@ all = [ "highway-env >= 1.9.1", # box2d "box2d-py ==2.3.5", - "pygame ==2.1.3.dev8", + "pygame >=2.1.3", "swig ==4.*", ] testing = ["pytest ==7.1.3"] From 167a18999e325626e6bad490e630d43cf78dfbc0 Mon Sep 17 00:00:00 2001 From: Florian Felten Date: Thu, 24 Oct 2024 16:17:27 +0200 Subject: [PATCH 4/7] remove other unnecessary deps --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05c03a6a..e8459f8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,11 +21,8 @@ jobs: - name: Install dependencies run: | pip install pytest - git clone https://github.com/benelot/pybullet-gym.git - pip install -e pybullet-gym sudo apt-get update sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb patchelf ffmpeg cmake swig - pip install gymnasium pip install -e .[all] - name: Full Python tests run: | From b65be99bfafd1e4e789511934caa291cd42274b6 Mon Sep 17 00:00:00 2001 From: Florian Felten Date: Thu, 24 Oct 2024 16:20:59 +0200 Subject: [PATCH 5/7] Try to use uv for pip install --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8459f8d..abfdb6e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,10 +20,11 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - pip install pytest + pip install uv + uv pip install pytest sudo apt-get update sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb patchelf ffmpeg cmake swig - pip install -e .[all] + uv pip install -e .[all] - name: Full Python tests run: | pytest tests/test_envs.py From 5a9357dcca0d3e0bb89da5a1f94618dd680de805 Mon Sep 17 00:00:00 2001 From: Florian Felten Date: Thu, 24 Oct 2024 16:22:27 +0200 Subject: [PATCH 6/7] Use system install for uv --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index abfdb6e2..c05a60ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,10 +21,10 @@ jobs: - name: Install dependencies run: | pip install uv - uv pip install pytest + uv pip install --system pytest sudo apt-get update sudo apt-get install libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb patchelf ffmpeg cmake swig - uv pip install -e .[all] + uv pip install --system -e .[all] - name: Full Python tests run: | pytest tests/test_envs.py From df228a2c2e700859200cc4672e09a80c02a85b8a Mon Sep 17 00:00:00 2001 From: Florian Felten Date: Thu, 24 Oct 2024 17:06:05 +0200 Subject: [PATCH 7/7] Add supported versions on readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 708bb3a6..cfa346dc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Python](https://img.shields.io/pypi/pyversions/mo-gymnasium.svg)](https://badge.fury.io/py/mo-gymnasium) +[![PyPI](https://badge.fury.io/py/mo-gymnasium.svg)](https://badge.fury.io/py/mo-gymnasium) ![tests](https://github.com/Farama-Foundation/mo-gymnasium/workflows/Python%20tests/badge.svg) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)