Skip to content

Commit

Permalink
Add Python 3.12 support (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffelten authored Oct 24, 2024
1 parent d4d81ca commit 44324d5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ 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']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -20,14 +20,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- 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
pip install uv
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
pip install gymnasium
pip install -e .[all]
uv pip install --system -e .[all]
- name: Full Python tests
run: |
pytest tests/test_envs.py
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand All @@ -36,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.
Expand All @@ -52,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"]
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 44324d5

Please sign in to comment.