Skip to content

Commit

Permalink
Merge branch 'master' into use-system-pybind11
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts authored Jul 23, 2024
2 parents 52b3261 + 4e5de3c commit 3d4a1f6
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 14 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
# Look for GitHub Actions workflows in the `root` directory
directory: "/"
# Check the for updates once a week
schedule:
interval: "weekly"
2 changes: 2 additions & 0 deletions .github/docker/manylinux-vcpkg.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ LABEL org.opencontainers.image.source https://github.com/Farama-Foundation/Arcad
RUN yum install -y curl unzip zip tar

RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg
RUN cd /opt/vcpkg && git reset --hard 8150939b6


ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg"
ENV PATH="${PATH}:/opt/vcpkg"
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ 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'
triplet: x64-linux-mixed
Expand Down Expand Up @@ -176,6 +176,7 @@ jobs:
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
Expand Down Expand Up @@ -204,10 +205,10 @@ jobs:
matrix:
include:
# example wheel names (if the wheel names change, look at the `ls wheels/` for the new names)
# ale_py-0.9.0-cp310-cp310-macosx_10_15_x86_64.whl
# ale_py-0.9.0-cp310-cp310-macosx_11_0_arm64.whl
# ale_py-0.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
# ale_py-0.9.0-cp310-cp310-win_amd64.whl
# ale_py-0.x.x-cp310-cp310-macosx_10_15_x86_64.whl
# 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 # arch: x86_64
python: '3.8'
wheel-name: 'cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64'
Expand Down Expand Up @@ -288,10 +289,10 @@ jobs:

- name: Build
# wildcarding doesn't work for some reason, therefore, update the project version here
run: python -m pip install wheels/ale_py-0.9.0-${{ matrix.wheel-name }}.whl
run: python -m pip install wheels/ale_py-0.9.1-${{ matrix.wheel-name }}.whl

- name: Install Gymnasium and pytest
run: python -m pip install gymnasium>=1.0.0a1 pytest
run: python -m pip install gymnasium>=1.0.0a2 pytest

- name: Test
run: python -m pytest
1 change: 1 addition & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Note: Make sure you're using an up-to-date version of `pip` or the installation

You can now import the ALE in your Python projects with providing a direct interface to Stella for interacting with games
```python
from ale_py import ALEInterface
from ale_py import ALEInterface, roms

ale = ALEInterface()
ale.loadROM("Breakout")
ale.loadROM(roms.get_rom_path("Breakout"))
ale.reset_game()

reward = ale.act(0) # noop
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if (UNIX AND BUILD_CPP_LIB)

# Configure installable cmake config
configure_package_config_file(
${CMAKE_MODULE_PATH}/${PROJECT_NAME}-config.cmake.in
${CMAKE_CURRENT_SOURCE_DIR}/../cmake/${PROJECT_NAME}-config.cmake.in
${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})

Expand Down
3 changes: 2 additions & 1 deletion src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)

set(PYBIND11_VER 2.12.0)
set(PYBIND11_VER 2.13.1)

include(FetchContent)
set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 ${PYBIND11_VER} QUIET)

if(NOT pybind11_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion tests/python/test_python_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_get_ram(tetris):
tetris.getRAM(preallocate)
assert exc_info.type == TypeError

preallocate = np.empty((1), dtype=np.uint8)
preallocate = np.empty(1, dtype=np.uint8)
with pytest.raises(RuntimeError) as exc_info:
tetris.getRAM(preallocate)
assert exc_info.type == RuntimeError
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "arcade-learning-environment",
"version": "0.9.0",
"version": "0.9.1",
"dependencies": [
"zlib"
],
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.0
0.9.1

0 comments on commit 3d4a1f6

Please sign in to comment.