-
-
Notifications
You must be signed in to change notification settings - Fork 885
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
351 changed files
with
13,137 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build Documentation website | ||
on: | ||
push: | ||
branches: [main] | ||
permissions: | ||
contents: write | ||
jobs: | ||
docs: | ||
name: Generate Website | ||
runs-on: ubuntu-latest | ||
|
||
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 . | ||
|
||
- 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 | ||
clean-exclude: | | ||
*.*.*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DS_Store | ||
__pycache__ | ||
.vscode/ | ||
build/ | ||
_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
hide-toc: true | ||
--- | ||
|
||
# 404 | ||
|
||
## Page Not Found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Gymnasium-docs | ||
|
||
This folder contains the documentation for [Gymnasium](https://github.com/Farama-Foundation/gymnasium). | ||
|
||
If you are modifying a non-environment page or an atari environment page, please PR this repo. Otherwise, follow the steps below: | ||
|
||
## Instructions for modifying environment pages | ||
|
||
### Editing an environment page | ||
|
||
If you are editing an Atari environment, directly edit the Markdown file in this repository. | ||
|
||
Otherwise, fork Gymnasium and edit the docstring in the environment's Python file. Then, pip install your Gymnasium fork and run `docs/scripts/gen_mds.py` in this repo. This will automatically generate a Markdown documentation file for the environment. | ||
|
||
### Adding a new environment | ||
|
||
#### Atari env | ||
|
||
For Atari envs, add a Markdown file into `pages/environments/atari` then complete the **other steps**. | ||
|
||
#### Non-Atari env | ||
|
||
Ensure the environment is in Gymnasium (or your fork). Ensure that the environment's Python file has a properly formatted markdown docstring. Pip install Gymnasium (or your fork) then run `docs/scripts/gen_mds.py`. This will automatically generate an md page for the environment. Then complete the [other steps](#other-steps). | ||
|
||
#### Other steps | ||
|
||
- Add the corresponding gif into the `docs/_static/videos/{ENV_TYPE}` folder, where `ENV_TYPE` is the category of your new environment (e.g. mujoco). Follow snake_case naming convention. Alternatively, run `docs/scripts/gen_gifs.py`. | ||
- Edit `docs/environments/{ENV_TYPE}/index.md`, and add the name of the file corresponding to your new environment to the `toctree`. | ||
|
||
## Build the Documentation | ||
|
||
Install the required packages and Gymnasium (or your fork): | ||
|
||
``` | ||
pip install -r requirements.txt | ||
pip install gymnasium | ||
``` | ||
|
||
To build the documentation once: | ||
|
||
``` | ||
cd docs | ||
make dirhtml _build | ||
``` | ||
|
||
To rebuild the documentation automatically every time a change is made: | ||
|
||
``` | ||
cd docs | ||
sphinx-autobuild -b dirhtml . _build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
h1 { | ||
font-size: 2.25rem; | ||
} | ||
|
||
h2 { | ||
font-size: 1.75rem; | ||
} | ||
|
||
h3 { | ||
font-size: 1.45rem; | ||
} | ||
|
||
.cookie_alert { | ||
position: fixed; | ||
display: flex; | ||
width: 100%; | ||
min-height: 70px; | ||
background-color: var(--color-background-secondary); | ||
color: var(--color-foreground-primary); | ||
border-top: 1px solid var(--color-background-border); | ||
bottom: 0; | ||
left: 0; | ||
z-index: 99999; | ||
} | ||
|
||
.cookie_container { | ||
display: flex; | ||
align-items: center; | ||
width: 700px; | ||
max-width: calc(100% - 28px); | ||
margin: auto; | ||
} | ||
|
||
.cookie_alert p { | ||
flex: 1; | ||
} | ||
|
||
.cookie_alert button { | ||
background-color: transparent; | ||
border: none; | ||
width: 26px; | ||
height: 26px; | ||
padding: 0; | ||
cursor: pointer; | ||
} | ||
|
||
.cookie_alert button svg .cls-1 { | ||
stroke: var(--color-foreground-primary); | ||
} | ||
|
||
.cookie_alert button svg { | ||
width: 100%; | ||
} | ||
|
||
.sidebar-logo-container { | ||
display: flex; | ||
height: 100px; | ||
} | ||
|
||
/*======================= | ||
Envinronments grid | ||
========================*/ | ||
.env-grid { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
width: 100%; | ||
box-sizing: border-box; | ||
} | ||
.env-grid__cell { | ||
display: flex; | ||
flex-direction: column; | ||
width: 180px; | ||
height: 180px; | ||
padding: 10px; | ||
} | ||
.cell__image-container { | ||
display: flex; | ||
height: 148px; | ||
justify-content: center; | ||
} | ||
.cell__image-container img { | ||
max-height: 100%; | ||
} | ||
.cell__title { | ||
display: flex; | ||
justify-content: center; | ||
text-align: center; | ||
align-items: flex-end; | ||
height: 32px; | ||
line-height: 16px; | ||
} | ||
.more-btn { | ||
width: 240px; | ||
margin: 12px auto; | ||
display: block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.env-grid { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
width: 100%; | ||
box-sizing: border-box; | ||
} | ||
.env-grid__cell { | ||
display: flex; | ||
flex-direction: column; | ||
width: 180px; | ||
height: 180px; | ||
padding: 10px; | ||
} | ||
.cell__image-container { | ||
display: flex; | ||
height: 148px; | ||
justify-content: center; | ||
} | ||
.cell__image-container img { | ||
max-height: 100%; | ||
} | ||
.cell__title { | ||
display: flex; | ||
justify-content: center; | ||
text-align: center; | ||
align-items: flex-end; | ||
height: 32px; | ||
line-height: 16px; | ||
} | ||
.more-btn { | ||
width: 240px; | ||
margin: 12px auto; | ||
display: block; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{% extends "furo/base.html" %} | ||
|
||
{%- block regular_scripts -%} | ||
{{ super() }} | ||
|
||
<script> | ||
(() => { | ||
if (!localStorage.getItem("shownCookieAlert")) { | ||
const boxElem = document.createElement("div"); | ||
boxElem.classList.add("cookie_alert"); | ||
const containerElem = document.createElement("div"); | ||
containerElem.classList.add("cookie_container"); | ||
const textElem = document.createElement("p"); | ||
textElem.innerHTML = `This page uses <a href="https://analytics.google.com/"> | ||
Google Analytics</a> to collect statistics. You can disable it by blocking | ||
the JavaScript coming from www.google-analytics.com.`; | ||
containerElem.appendChild(textElem); | ||
const closeBtn = document.createElement("button"); | ||
closeBtn.innerHTML = `<?xml version="1.0" ?><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:2px;}</style></defs><title/><g id="cross"><line class="cls-1" x1="7" x2="25" y1="7" y2="25"/><line class="cls-1" x1="7" x2="25" y1="25" y2="7"/></g></svg>` | ||
closeBtn.onclick = () => { | ||
localStorage.setItem("shownCookieAlert", "true"); | ||
boxElem.style.display = "none"; | ||
} | ||
containerElem.appendChild(closeBtn); | ||
boxElem.appendChild(containerElem); | ||
document.body.appendChild(boxElem); | ||
} | ||
})() | ||
|
||
</script> | ||
|
||
<!-- Google tag (gtag.js) --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JGXSLW7N06"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
|
||
gtag('config', 'G-JGXSLW7N06'); | ||
</script> | ||
|
||
{%- endblock regular_scripts -%} |
Oops, something went wrong.