Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts authored Jan 13, 2025
2 parents eabc796 + f9398ba commit 8af2490
Show file tree
Hide file tree
Showing 211 changed files with 2,982 additions and 369 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Add any other context about the problem here.

### Checklist

- [ ] I have checked that there is no similar [issue](https://github.com/Farama-Foundation/MiniGrid/issues) in the repo (**required**)
- [ ] I have checked that there is no similar [issue](https://github.com/Farama-Foundation/MiniGrid/issues) in the repo (**required**)
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "[Proposal] Proposal title"



### Proposal
### Proposal

A clear and concise description of the proposal.

Expand Down
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"
File renamed without changes.
16 changes: 16 additions & 0 deletions .github/docker/py-old.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# A Dockerfile that sets up a full Gym install with test dependencies
ARG PYTHON_VERSION
FROM python:$PYTHON_VERSION

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN apt-get -y update \
&& apt-get install --no-install-recommends -y \
xvfb

COPY ../.. /usr/local/minigrid/
WORKDIR /usr/local/minigrid/

RUN pip install .[wfc,testing] gymnasium==0.29.1 numpy==1.26.4

ENTRYPOINT ["/usr/local/minigrid/.github/docker/docker_entrypoint"]
9 changes: 3 additions & 6 deletions py.Dockerfile → .github/docker/py.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ RUN apt-get -y update \
&& apt-get install --no-install-recommends -y \
xvfb

COPY . /usr/local/minigrid/
COPY ../.. /usr/local/minigrid/
WORKDIR /usr/local/minigrid/

RUN pip install .[testing] --no-cache-dir

RUN ["chmod", "+x", "/usr/local/minigrid/docker_entrypoint"]

ENTRYPOINT ["/usr/local/minigrid/docker_entrypoint"]
RUN pip install .[wfc,testing]

ENTRYPOINT ["/usr/local/minigrid/.github/docker/docker_entrypoint"]
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ only: issues

# issues:
# exemptLabels:
# - confirmed
# - confirmed
8 changes: 4 additions & 4 deletions .github/workflows/build-docs-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
env:
SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install dependencies
run: pip install -r docs/requirements.txt

- name: Register Envs
run: pip install -e .
run: pip install -e .[wfc]

- name: Build Envs Docs
run: python docs/_scripts/gen_env_docs.py
Expand All @@ -46,4 +46,4 @@ jobs:
with:
folder: _build
target-folder: main
clean: false
clean: false
8 changes: 4 additions & 4 deletions .github/workflows/build-docs-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
env:
SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'

Expand All @@ -26,7 +26,7 @@ jobs:
run: pip install -r docs/requirements.txt

- name: Register Envs
run: pip install -e .
run: pip install -e .[wfc]

- name: Build Envs Docs
run: python docs/_scripts/gen_env_docs.py
Expand Down Expand Up @@ -59,4 +59,4 @@ jobs:
folder: _build
clean-exclude: |
*.*.*/
main
main
22 changes: 0 additions & 22 deletions .github/workflows/build.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/manual-build-docs-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ jobs:
env:
SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: inputs.commit == ''

- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: inputs.commit != ''
with:
ref: ${{ inputs.commit }}

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install dependencies
run: pip install -r docs/requirements.txt

- name: Register Envs
run: pip install -e .
run: pip install -e .[wfc]

- name: Build Envs Docs
run: python docs/_scripts/gen_env_docs.py
Expand Down Expand Up @@ -71,4 +71,4 @@ jobs:
folder: _build
clean-exclude: |
*.*.*/
main
main
16 changes: 9 additions & 7 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# https://pre-commit.com
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
name: pre-commit
on: [pull_request, push]
name: Run pre-commit
on:
pull_request:
push:
branches: [master]

permissions:
contents: read
contents: read # to fetch code (actions/checkout)

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install pre-commit
- run: pre-commit --version
- run: pre-commit install
- run: pre-commit run --all-files
- run: pre-commit run --all-files
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
name: build-publish

on:
push:
branches: [master]
pull_request:
branches: [master]
release:
types: [published]

Expand All @@ -21,26 +17,17 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: '3.10'
- name: Install pypa/build
run: >-
python -m
pip install -U
build
run: python -m pip install -U build
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
run: python -m build --sdist --wheel --outdir dist/ .
- name: Store wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: dist

Expand All @@ -51,7 +38,7 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Download dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: artifact
path: dist
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build
on: [pull_request, push]

permissions:
contents: read

jobs:
build-latest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- run: |
docker build -f .github/docker/py.Dockerfile \
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \
--tag minigrid-docker .
- name: Run tests
run: docker run minigrid-docker pytest
- name: Run doctest
run: docker run minigrid-docker pytest --doctest-modules minigrid/

build-old:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
docker build -f .github/docker/py-old.Dockerfile \
--build-arg PYTHON_VERSION="3.10" \
--tag minigrid-docker .
- name: Run tests
run: docker run minigrid-docker pytest
50 changes: 33 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-symlinks
- id: destroyed-symlinks
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-ast
- id: check-added-large-files
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: detect-private-key
- id: debug-statements
- repo: https://github.com/python/black
rev: 22.3.0
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
rev: v2.3.0
hooks:
- id: codespell
args:
- --ignore-words-list=linz
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 7.1.1
hooks:
- id: flake8
args:
- '--per-file-ignores=*/__init__.py:F401'
# - --ignore=
- --ignore=E203, W503
- --max-complexity=30
- --max-line-length=456
- --show-source
- --statistics
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
Expand All @@ -36,18 +52,18 @@ repos:
# - --convention=google
# additional_dependencies: ["toml"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.0
rev: v3.19.1
hooks:
- id: pyupgrade
args: ["--py37-plus"]
- repo: local
hooks:
- id: pyright
name: pyright
entry: pyright
language: node
pass_filenames: false
types: [python]
additional_dependencies: ["pyright"]
args:
- --project=pyproject.toml
# - repo: local
# hooks:
# - id: pyright
# name: pyright
# entry: pyright
# language: node
# pass_filenames: false
# types: [python]
# additional_dependencies: ["pyright@1.1.383"]
# args:
# - --project=pyproject.toml
9 changes: 6 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ preferred-citation:
given-names: Pablo Samuel
- family-names: Terry
given-names: Jordan
journal: CoRR
title: Minigrid
volume: abs/2306.13831
title: "Minigrid & Miniworld: Modular & Customizable Reinforcement Learning Environments for Goal-Oriented Tasks"
type: inproceedings
year: 2023
conference:
name: "Neural Information Processing Systems (NeurIPS)"
publisher:
name: "Proceedings of the Conference on Neural Information Processing Systems (NeurIPS)"
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

Loading

0 comments on commit 8af2490

Please sign in to comment.