diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 48d8b5a4c..6fbe46227 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -1,46 +1,46 @@ -name: Build main branch documentation website -on: - push: - branches: [main] -permissions: - contents: write -jobs: - docs: - name: Generate Website - runs-on: ubuntu-latest - env: - SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install dependencies - run: pip install -r docs/requirements.txt - - - name: Install Gymnasium - run: pip install .[box2d,mujoco] - - - name: Build Envs Docs - run: python docs/_scripts/gen_mds.py && python docs/_scripts/gen_envs_display.py - - - name: Build - run: sphinx-build -b dirhtml -v docs _build - - - name: Move 404 - run: mv _build/404/index.html _build/404.html - - - name: Update 404 links - run: python docs/_scripts/move_404.py _build/404.html - - - name: Remove .doctrees - run: rm -r _build/.doctrees - - - name: Upload to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: _build - target-folder: main - clean: false +name: Build main branch documentation website +on: + push: + branches: [main] +permissions: + contents: write +jobs: + docs: + name: Generate Website + runs-on: ubuntu-latest + env: + SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install dependencies + run: pip install -r docs/requirements.txt + + - name: Install Gymnasium + run: pip install .[box2d,mujoco,jax] torch + + - name: Build Envs Docs + run: python docs/_scripts/gen_mds.py && python docs/_scripts/gen_envs_display.py + + - name: Build + run: sphinx-build -b dirhtml -v docs _build + + - name: Move 404 + run: mv _build/404/index.html _build/404.html + + - name: Update 404 links + run: python docs/_scripts/move_404.py _build/404.html + + - name: Remove .doctrees + run: rm -r _build/.doctrees + + - name: Upload to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: _build + target-folder: main + clean: false diff --git a/.github/workflows/docs-manual-versioning.yml b/.github/workflows/docs-manual-versioning.yml index ea8086945..9b816f7c5 100644 --- a/.github/workflows/docs-manual-versioning.yml +++ b/.github/workflows/docs-manual-versioning.yml @@ -1,71 +1,71 @@ -name: Manual Docs Versioning -on: - workflow_dispatch: - inputs: - version: - description: 'Documentation version to create' - required: true - commit: - description: 'Commit used to build the Documentation version' - required: false - latest: - description: 'Latest version' - type: boolean - -permissions: - contents: write -jobs: - docs: - name: Generate Website for new version - runs-on: ubuntu-latest - env: - SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v3 - if: inputs.commit == '' - - - uses: actions/checkout@v3 - if: inputs.commit != '' - with: - ref: ${{ inputs.commit }} - - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install dependencies - run: pip install -r docs/requirements.txt - - - name: Install Gymnasium - run: pip install .[box2d,mujoco] - - - name: Build Envs Docs - run: python docs/_scripts/gen_mds.py && python docs/_scripts/gen_envs_display.py - - - name: Build - run: sphinx-build -b dirhtml -v docs _build - - - name: Move 404 - run: mv _build/404/index.html _build/404.html - - - name: Update 404 links - run: python docs/_scripts/move_404.py _build/404.html - - - name: Remove .doctrees - run: rm -r _build/.doctrees - - - name: Upload to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: _build - target-folder: ${{ inputs.version }} - clean: false - - - name: Upload to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - if: inputs.latest - with: - folder: _build - clean-exclude: | - *.*.*/ - main +name: Manual Docs Versioning +on: + workflow_dispatch: + inputs: + version: + description: 'Documentation version to create' + required: true + commit: + description: 'Commit used to build the Documentation version' + required: false + latest: + description: 'Latest version' + type: boolean + +permissions: + contents: write +jobs: + docs: + name: Generate Website for new version + runs-on: ubuntu-latest + env: + SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + if: inputs.commit == '' + + - uses: actions/checkout@v3 + if: inputs.commit != '' + with: + ref: ${{ inputs.commit }} + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install dependencies + run: pip install -r docs/requirements.txt + + - name: Install Gymnasium + run: pip install .[box2d,mujoco,jax] torch + + - name: Build Envs Docs + run: python docs/_scripts/gen_mds.py && python docs/_scripts/gen_envs_display.py + + - name: Build + run: sphinx-build -b dirhtml -v docs _build + + - name: Move 404 + run: mv _build/404/index.html _build/404.html + + - name: Update 404 links + run: python docs/_scripts/move_404.py _build/404.html + + - name: Remove .doctrees + run: rm -r _build/.doctrees + + - name: Upload to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: _build + target-folder: ${{ inputs.version }} + clean: false + + - name: Upload to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + if: inputs.latest + with: + folder: _build + clean-exclude: | + *.*.*/ + main diff --git a/.github/workflows/docs-versioning.yml b/.github/workflows/docs-versioning.yml index 8eb50d754..2a5e2e2a8 100644 --- a/.github/workflows/docs-versioning.yml +++ b/.github/workflows/docs-versioning.yml @@ -1,56 +1,56 @@ -name: Docs Versioning -on: - push: - tags: - - 'v?*.*.*' -permissions: - contents: write -jobs: - docs: - name: Generate Website for new version - runs-on: ubuntu-latest - env: - SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install dependencies - run: pip install -r docs/requirements.txt - - - name: Install Gymnasium - run: pip install .[box2d,mujoco] - - - name: Build Envs Docs - run: python docs/_scripts/gen_mds.py && python docs/_scripts/gen_envs_display.py - - - name: Build - run: sphinx-build -b dirhtml -v docs _build - - - name: Move 404 - run: mv _build/404/index.html _build/404.html - - - name: Update 404 links - run: python docs/_scripts/move_404.py _build/404.html - - - name: Remove .doctrees - run: rm -r _build/.doctrees - - - name: Upload to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: _build - target-folder: ${{github.ref_name}} - clean: false - - - name: Upload to GitHub Pages - uses: JamesIves/github-pages-deploy-action@v4 - if: ${{ !contains(github.ref_name, 'a') }} - with: - folder: _build - clean-exclude: | - *.*.*/ - main +name: Docs Versioning +on: + push: + tags: + - 'v?*.*.*' +permissions: + contents: write +jobs: + docs: + name: Generate Website for new version + runs-on: ubuntu-latest + env: + SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + + - name: Install dependencies + run: pip install -r docs/requirements.txt + + - name: Install Gymnasium + run: pip install .[box2d,mujoco,jax] torch + + - name: Build Envs Docs + run: python docs/_scripts/gen_mds.py && python docs/_scripts/gen_envs_display.py + + - name: Build + run: sphinx-build -b dirhtml -v docs _build + + - name: Move 404 + run: mv _build/404/index.html _build/404.html + + - name: Update 404 links + run: python docs/_scripts/move_404.py _build/404.html + + - name: Remove .doctrees + run: rm -r _build/.doctrees + + - name: Upload to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: _build + target-folder: ${{github.ref_name}} + clean: false + + - name: Upload to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4 + if: ${{ !contains(github.ref_name, 'a') }} + with: + folder: _build + clean-exclude: | + *.*.*/ + main diff --git a/docs/api/experimental/functional.md b/docs/api/experimental/functional.md index ec31ecbe3..451696aac 100644 --- a/docs/api/experimental/functional.md +++ b/docs/api/experimental/functional.md @@ -7,23 +7,23 @@ title: Functional ## gymnasium.experimental.FuncEnv ```{eval-rst} -.. autoclass:: gymnasium.experimental.FuncEnv +.. autoclass:: gymnasium.experimental.functional.FuncEnv -.. autofunction:: gymnasium.experimental.FuncEnv.initial -.. autofunction:: gymnasium.experimental.FuncEnv.transition +.. autofunction:: gymnasium.experimental.functional.FuncEnv.initial +.. autofunction:: gymnasium.experimental.functional.FuncEnv.transition -.. autofunction:: gymnasium.experimental.FuncEnv.observation -.. autofunction:: gymnasium.experimental.FuncEnv.reward -.. autofunction:: gymnasium.experimental.FuncEnv.terminal +.. autofunction:: gymnasium.experimental.functional.FuncEnv.observation +.. autofunction:: gymnasium.experimental.functional.FuncEnv.reward +.. autofunction:: gymnasium.experimental.functional.FuncEnv.terminal -.. autofunction:: gymnasium.experimental.FuncEnv.state_info -.. autofunction:: gymnasium.experimental.FuncEnv.step_info +.. autofunction:: gymnasium.experimental.functional.FuncEnv.state_info +.. autofunction:: gymnasium.experimental.functional.FuncEnv.step_info -.. autofunction:: gymnasium.experimental.FuncEnv.transform +.. autofunction:: gymnasium.experimental.functional.FuncEnv.transform -.. autofunction:: gymnasium.experimental.FuncEnv.render_image -.. autofunction:: gymnasium.experimental.FuncEnv.render_init -.. autofunction:: gymnasium.experimental.FuncEnv.render_close +.. autofunction:: gymnasium.experimental.functional.FuncEnv.render_image +.. autofunction:: gymnasium.experimental.functional.FuncEnv.render_init +.. autofunction:: gymnasium.experimental.functional.FuncEnv.render_close ``` ## gymnasium.experimental.func2env.FunctionalJaxCompatibilityEnv diff --git a/docs/requirements.txt b/docs/requirements.txt index f9c624c7b..a3c113178 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,7 @@ sphinx sphinx-autobuild myst-parser -git+https://github.com/sphinx-gallery/sphinx-gallery.git@4006662c8c1984453a247dc6d3df6260e5b00f4b#egg=sphinx_gallery +sphinx-gallery==0.14.0 git+https://github.com/Farama-Foundation/Celshast#egg=furo moviepy pygame