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 apidoc back to flatland book. #7

Merged
merged 2 commits into from
Jan 19, 2025
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Checks

on:
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build
run: |
pip install -U "jupyter-book>=0.11.2" sphinxcontrib-apidoc flatland-rl
FLATLAND_MODULE_PATH=$(python -c 'import os; import importlib; print(os.path.dirname(importlib.import_module("flatland").__file__))')
FLATLAND_MODULE_VERSION=$(python -c "import flatland; print(flatland.__version__)")
sphinx-apidoc --force -a -e -o apidocs ${FLATLAND_MODULE_PATH} -H "Flatland ${FLATLAND_MODULE_VERSION} API Reference" --tocfile 'index'
jupyter-book build .
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ jobs:
python-version: "3.10"
- name: Build
run: |
pip install -U "jupyter-book>=0.11.2"
jupyter-book build .
pip install -U "jupyter-book>=0.11.2" sphinxcontrib-apidoc flatland-rl
FLATLAND_MODULE_PATH=$(python -c 'import os; import importlib; print(os.path.dirname(importlib.import_module("flatland").__file__))')
FLATLAND_MODULE_VERSION=$(python -c "import flatland; print(flatland.__version__)")
sphinx-apidoc --force -a -e -o apidocs ${FLATLAND_MODULE_PATH} -H "Flatland ${FLATLAND_MODULE_VERSION} API Reference" --tocfile 'index'
jupyter-book build .
# https://github.com/actions/upload-pages-artifact
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
Expand Down
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
# Contribute to Flatland Book

This repository is an aggregation of all the documentation, exploratory research, baselines, un-explored ideas, future research directions for the [Flatland-RL](https://github.com/flatland-association/flatland-rl/) project.
[Flatland Book](https://flatland-association.github.io/flatland-book/) is an aggregation of all the documentation, exploratory research, baselines, un-explored
ideas, future research directions for
the [Flatland-RL](https://github.com/flatland-association/flatland-rl/) project.

# Installation

```
```shell
git clone https://github.com/flatland-association/flatland-book.git

pip install -U "jupyter-book>=0.11.2"
pip install -U "jupyter-book>=0.11.2" sphinxcontrib-apidoc flatland-rl

FLATLAND_MODULE_PATH=$(python -c 'import os; import importlib; print(os.path.dirname(importlib.import_module("flatland").__file__))')
FLATLAND_MODULE_VERSION=$(python -c "import flatland; print(flatland.__version__)")
sphinx-apidoc --force -a -e -o apidocs ${FLATLAND_MODULE_PATH} -H "Flatland ${FLATLAND_MODULE_VERSION} API Reference" --tocfile 'index'
jupyter-book build .
```

Changes to the ToC will require full re-build:
Changes to the ToC will require full re-build by running

```
clear; jupyter-book clean .; jupyter-book build .
```shell
jupyter-book clean .
```

# Author(s)

- Sharada Mohanty
- Florian Laurent
- Nimish Santhosh
- Sharada Mohanty
- Florian Laurent
- Nimish Santhosh
- Erik Nygren
- Adrian Egli
- Manuel Schneider
- Christian Eichenberger
10 changes: 5 additions & 5 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ parts:
- file: environment/pettingzoo
- file: environment/Agent-Close-Following
- file: environment/graph_demo
# - file: _sources/flatland/docs/10_interface_toc.rst

# - caption: Environment Documentation
# chapters:
# - file: _sources/flatland/docs/index
## APIDOC
- caption: APIDOC
chapters:
- file: apidocs/index

## TUTORIALS
- caption: Turorials
- caption: Tutorials
chapters:
- file: tutorials/or
# sections:
Expand Down