diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36beb83b..9df33021 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - uses: pre-commit/action@v3.0.1 build-scratch: - name: ${{ matrix.runs-on }} • py${{ matrix.python }} + name: "${{ matrix.runs-on }} • py${{ matrix.python }}" needs: pre-commit defaults: run: @@ -40,54 +40,19 @@ jobs: fail-fast: false matrix: include: -# To minimise the computational resources, we only use a single python version and the final test-wheels for all python versions + # To minimise the computational resources, we only use a single python version and the final test-wheels for all python versions - runs-on: ubuntu-latest - python: '3.8' + python: '3.12' triplet: x64-linux-mixed -# - runs-on: ubuntu-latest -# python: '3.9' -# triplet: x64-linux-mixed -# - runs-on: ubuntu-latest -# python: '3.10' -# triplet: x64-linux-mixed -# - runs-on: ubuntu-latest -# python: '3.11' -# triplet: x64-linux-mixed -# - runs-on: ubuntu-latest -# python: '3.12' -# triplet: x64-linux-mixed - - runs-on: macos-12 # macos latest is macos-14-arm64 running on M1 chips which doesn't have python support - python: '3.8' + - runs-on: macos-13 + python: '3.12' triplet: x64-osx-mixed -# - runs-on: macos-12 -# python: '3.9' -# triplet: x64-osx-mixed -# - runs-on: macos-12 -# python: '3.10' -# triplet: x64-osx-mixed -# - runs-on: macos-12 -# python: '3.11' -# triplet: x64-osx-mixed -# - runs-on: macos-12 -# python: '3.12' -# triplet: x64-osx-mixed - runs-on: windows-latest - python: '3.8' + python: '3.12' triplet: x64-windows -# - runs-on: windows-latest -# python: '3.9' -# triplet: x64-windows -# - runs-on: windows-latest -# python: '3.10' -# triplet: x64-windows -# - runs-on: windows-latest -# python: '3.11' -# triplet: x64-windows -# - runs-on: windows-latest -# python: '3.12' -# triplet: x64-windows + env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} runs-on: ${{ matrix.runs-on }} @@ -99,24 +64,11 @@ jobs: with: python-version: ${{ matrix.python }} - - name: Install test dependencies + - name: Install windows cmake # TODO(jfarebro): There's a bug with Windows cmake and PEP517 builds via pip install. # As a temporary workaround installing cmake outside of the isolated env seems to work. run: python -m pip install --user cmake - - - uses: microsoft/setup-msbuild@v2 if: runner.os == 'Windows' - # TODO(jfarebro): 02/16/2023 - There's a bug where pkg-config isn't installed on the macOS - # runner. See: https://github.com/actions/runner-images/pull/7125 - - name: Install pkg-config on macOS - if: runner.os == 'macOS' - run: brew install pkg-config - - uses: lukka/run-vcpkg@v11 - with: - vcpkgGitCommitId: "8150939b69720adc475461978e07c2d2bf5fb76e" - # There's a permissions issue with the cache - # https://github.com/microsoft/vcpkg/issues/20121 - doNotCache: true - name: Download and unpack ROMs run: ./scripts/download_unpack_roms.sh @@ -128,21 +80,22 @@ jobs: run: python -m pytest build-wheels: - name: ${{ matrix.runs-on }} • ${{ matrix.arch }} + name: "${{ matrix.runs-on }} • ${{ matrix.arch }}" needs: pre-commit defaults: run: shell: bash strategy: + fail-fast: false matrix: include: - runs-on: ubuntu-latest arch: x86_64 - runs-on: windows-latest arch: AMD64 - - runs-on: macos-12 + - runs-on: macos-13 arch: x86_64 - - runs-on: macos-12 + - runs-on: macos-13 arch: arm64 runs-on: ${{ matrix.runs-on }} @@ -155,7 +108,6 @@ jobs: uses: docker/setup-buildx-action@v3 with: install: true - - name: Build Docker image with vcpkg if: runner.os == 'linux' # using build-push-action (without push) to make use of cache arguments @@ -167,22 +119,6 @@ jobs: push: false load: true - - uses: microsoft/setup-msbuild@v2 - if: runner.os == 'Windows' - # TODO(jfarebro): 02/16/2023 - There's a bug where pkg-config isn't installed on the macOS - # runner. See: https://github.com/actions/runner-images/pull/7125 - - name: Install pkg-config on macOS - if: runner.os == 'macOS' - run: brew install pkg-config - - - uses: lukka/run-vcpkg@v11 - if: runner.os != 'linux' - with: - vcpkgGitCommitId: "8150939b69720adc475461978e07c2d2bf5fb76e" - # There's a permissions issue with the cache - # https://github.com/microsoft/vcpkg/issues/20121 - doNotCache: true - - name: Download and unpack ROMs run: ./scripts/download_unpack_roms.sh @@ -210,10 +146,6 @@ jobs: # ale_py-0.x.x-cp310-cp310-macosx_11_0_arm64.whl # ale_py-0.x.x-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl # ale_py-0.x.x-cp310-cp310-win_amd64.whl - - runs-on: ubuntu-latest - python: '3.8' - wheel-name: 'cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64' - arch: 'x86_64' - runs-on: ubuntu-latest python: '3.9' wheel-name: 'cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64' @@ -230,11 +162,11 @@ jobs: python: '3.12' wheel-name: 'cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64' arch: 'x86_64' + - runs-on: ubuntu-latest + python: '3.13' + wheel-name: 'cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64' + arch: 'x86_64' - - runs-on: windows-latest - python: '3.8' - wheel-name: 'cp38-cp38-win_amd64' - arch: AMD64 - runs-on: windows-latest python: '3.9' wheel-name: 'cp39-cp39-win_amd64' @@ -251,32 +183,32 @@ jobs: python: '3.12' wheel-name: 'cp312-cp312-win_amd64' arch: AMD64 + - runs-on: windows-latest + python: '3.13' + wheel-name: 'cp313-cp313-win_amd64' + arch: AMD64 - - runs-on: macos-12 - python: '3.8' - wheel-name: 'cp38-cp38-macosx_10_15_x86_64' - arch: x86_64 - - runs-on: macos-12 + - runs-on: macos-13 python: '3.9' wheel-name: 'cp39-cp39-macosx_10_15_x86_64' arch: x86_64 - - runs-on: macos-12 + - runs-on: macos-13 python: '3.10' wheel-name: 'cp310-cp310-macosx_10_15_x86_64' arch: x86_64 - - runs-on: macos-12 + - runs-on: macos-13 python: '3.11' wheel-name: 'cp311-cp311-macosx_10_15_x86_64' arch: x86_64 - - runs-on: macos-12 + - runs-on: macos-13 python: '3.12' wheel-name: 'cp312-cp312-macosx_10_15_x86_64' arch: x86_64 + - runs-on: macos-13 + python: '3.13' + wheel-name: 'cp313-cp313-macosx_10_15_x86_64' + arch: x86_64 - - runs-on: macos-14 - python: '3.8' - wheel-name: 'cp38-cp38-macosx_11_0_arm64' - arch: arm64 - runs-on: macos-14 python: '3.9' wheel-name: 'cp39-cp39-macosx_11_0_arm64' @@ -293,6 +225,10 @@ jobs: python: '3.12' wheel-name: 'cp312-cp312-macosx_11_0_arm64' arch: arm64 + - runs-on: macos-14 + python: '3.13' + wheel-name: 'cp313-cp313-macosx_11_0_arm64' + arch: arm64 runs-on: ${{ matrix.runs-on }} @@ -313,7 +249,7 @@ jobs: run: python -m pip install ale_py-0.10.1-${{ matrix.wheel-name }}.whl - name: Install Gymnasium and pytest - run: python -m pip install gymnasium>=1.0.0a2 pytest + run: python -m pip install gymnasium>=1.0.0 pytest - name: Test run: python -m pytest diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index c4d2a300..92e309e7 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -68,7 +68,7 @@ jobs: run: ./scripts/download_unpack_roms.sh - name: Build wheels - uses: pypa/cibuildwheel@v2.21.3 + uses: pypa/cibuildwheel@v2.21 env: CIBW_ARCHS: "${{ matrix.arch }}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e8ade97..838efbaa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-symlinks - id: destroyed-symlinks @@ -36,17 +36,17 @@ repos: - --show-source - --statistics - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.19.0 hooks: - id: pyupgrade - args: ["--py38-plus"] + args: ["--py39-plus"] - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: - id: isort args: ["--profile", "black"] - repo: https://github.com/python/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/pycqa/pydocstyle diff --git a/docs/getting-started.md b/docs/getting-started.md index 322738c3..dd046527 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -6,9 +6,9 @@ The Python interface `ale-py` supports the following configurations: | Platform | Architecture | Python Version | |:--------:|:------------:|:--------------:| -| Linux | x64 | 3.8+ | -| macOS | x64, arm64 | 3.8+ | -| Windows | AMD64 | 3.8+ | +| Linux | x64 | 3.9+ | +| macOS | x64, arm64 | 3.9+ | +| Windows | AMD64 | 3.9+ | To install the Python interface from PyPi simply run: diff --git a/pyproject.toml b/pyproject.toml index 5c197040..5870de92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta" name = "ale-py" description = "The Arcade Learning Environment (ALE) - a platform for AI research." readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = {text = "GPLv2"} keywords = ["reinforcement-learning", "arcade-learning-environment", "atari"] authors = [ @@ -28,11 +28,11 @@ classifiers = [ "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Artificial Intelligence", ] diff --git a/src/ale/python/registration.py b/src/ale/python/registration.py index 55fc72d4..9c0dcdd7 100644 --- a/src/ale/python/registration.py +++ b/src/ale/python/registration.py @@ -3,7 +3,8 @@ from __future__ import annotations from collections import defaultdict -from typing import Any, Callable, Mapping, NamedTuple, Sequence +from collections.abc import Mapping, Sequence +from typing import Any, Callable, NamedTuple import ale_py.roms as roms import gymnasium diff --git a/vcpkg.json b/vcpkg.json index 2066d952..1d06ba79 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -13,6 +13,6 @@ }, "builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18", "overrides": [ - { "name": "sdl2", "version": "2.0.16" } + { "name": "sdl2", "version": "2.24.2" } ] }