Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add website #496

Merged
merged 11 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
50 changes: 50 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build main branch documentation website

on:
push:
branches: [master]

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 ALE
run: pip install .

# - 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
73 changes: 73 additions & 0 deletions .github/workflows/docs-manual-versioning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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 ALE
run: pip install .

# - 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
61 changes: 61 additions & 0 deletions .github/workflows/docs-versioning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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: Get tag
id: tag
uses: dawidd6/action-get-tag@v1

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

- name: Install ALE
run: pip install .

# - 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: ${{steps.tag.outputs.tag}}
clean: false

- name: Upload to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _build
clean-exclude: |
*.*.*/
main
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,6 @@ dmypy.json

# Cython debug symbols
cython_debug/

# Docs
/docs/_build/
7 changes: 7 additions & 0 deletions docs/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
hide-toc: true
---

# 404 - Page Not Found

## The requested page could not be found.
20 changes: 20 additions & 0 deletions docs/Makefile
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)
34 changes: 20 additions & 14 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
# The Arcade Learning Environment (ALE)
# ALE-docs

The Arcade Learning Environment (ALE) is a framework that allows researchers and hobbyists to develop AI agents for Atari 2600 games. It is built on top of the Atari 2600 emulator [Stella](https://github.com/stella-emu/stella) and separates the details of emulation from agent design.
This folder contains the documentation for [Arcade-Learning-Environment](https://github.com/Farama-Foundation/arcade-Learning-Environment).

For an overview of our goals for the ALE read [The Arcade Learning Environment: An Evaluation Platform for General Agents](https://jair.org/index.php/jair/article/view/10819). If you use ALE in your research, we ask that you please [cite](./citing.md) the appropriate paper(s) in reference to the environment.
## Editing an environment page

## Table of Contents
If you are editing an Atari environment, directly edit the Markdown file in this repository.

1. [Getting Started](./getting-started.md)
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.

2. [Environment Specification](./environment.md)
## Build the Documentation

3. [C++ Interface](./cpp-interface.md)
Install the required packages and Gymnasium (or your fork):

4. [Python Interface](./python-interface.md)
```
pip install -r docs/requirements.txt
```

5. [Gym Interface](./gym-interface.md)
To build the documentation once:

6. [Supported Games](./games.md)
```
cd docs
make html
```

7. [Visualization](./visualization.md)
To rebuild the documentation automatically every time a change is made:

8. [FAQ](./faq.md)

9. [Citing](./citing.md)
```
cd docs
sphinx-autobuild -b html . _build
```
Loading
Loading