Skip to content

Commit

Permalink
Small fixes to docs (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoulao authored Sep 25, 2023
1 parent baf7807 commit 3e7ae6f
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 186 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -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
142 changes: 71 additions & 71 deletions .github/workflows/docs-manual-versioning.yml
Original file line number Diff line number Diff line change
@@ -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
112 changes: 56 additions & 56 deletions .github/workflows/docs-versioning.yml
Original file line number Diff line number Diff line change
@@ -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
24 changes: 12 additions & 12 deletions docs/api/experimental/functional.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3e7ae6f

Please sign in to comment.