Skip to content

Commit cf7d1b7

Browse files
Martin SchubertMartin Schubert
Martin Schubert
authored and
Martin Schubert
committed
Initial docs
1 parent b72659d commit cf7d1b7

File tree

11 files changed

+589
-300
lines changed

11 files changed

+589
-300
lines changed

.github/workflows/pages.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Sphinx docs to gh-pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-docs:
11+
runs-on: ubuntu-latest
12+
name: Sphinx docs to gh-pages
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.10"
21+
cache: "pip"
22+
cache-dependency-path: pyproject.toml
23+
24+
- name: Setup environment
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install ".[tests,dev,docs]"
28+
29+
- name: docs
30+
run: jb build docs
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: "./docs/_build/html/"
36+
37+
deploy-docs:
38+
needs: build-docs
39+
permissions:
40+
pages: write
41+
id-token: write
42+
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ for i in range(steps):
4545
(value, (response, distance, metrics, aux)), grad = value_and_grad_fn(params)
4646
state = opt.update(grad=grad, value=value, params=params, state=state)
4747
```
48-
With some plotting (see the [example notebook](notebooks/readme_example.ipynb)), this code will produce the following waveguide bend:
48+
With some plotting, this code will produce the following waveguide bend:
4949

50-
![Animated evolution of waveguide bend design](docs/img/waveguide_bend.gif)
50+
![Animated evolution of waveguide bend design](https://github.com/invrs-io/gym/blob/main/docs/img/waveguide_bend.gif?raw=true)
5151

5252
## Challenges
5353
The current list of challenges is below. Check out the notebooks for ready-to-go examples of each.

docs/_config.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Book settings
2+
# Learn more at https://jupyterbook.org/customize/config.html
3+
4+
title: invrs_gym
5+
author: Martin F. Schubert
6+
7+
# Force re-execution of notebooks on each build.
8+
# See https://jupyterbook.org/content/execute.html
9+
execute:
10+
execute_notebooks: cache
11+
timeout: -1
12+
allow_errors: true
13+
# execute_notebooks: force
14+
# execute_notebooks: "off"
15+
16+
latex:
17+
latex_engine: pdflatex # one of 'pdflatex', 'xelatex' (recommended for unicode), 'luatex', 'platex', 'uplatex'
18+
use_jupyterbook_latex: true # use sphinx-jupyterbook-latex for pdf builds as default
19+
20+
# Add a bibtex file so that we can create citations
21+
22+
html:
23+
home_page_in_navbar: true
24+
use_edit_page_button: true
25+
use_repository_button: true
26+
use_issues_button: true
27+
baseurl: https://github.com/invrs-io/gym
28+
29+
# Information about where the book exists on the web
30+
repository:
31+
url: https://github.com/invrs-io/gym
32+
path_to_book: docs # Optional path to your book, relative to the repository root
33+
branch: main # Which branch of the repository should be used when creating links (optional)
34+
35+
launch_buttons:
36+
notebook_interface: jupyterlab
37+
colab_url: "https://colab.research.google.com"
38+
39+
sphinx:
40+
extra_extensions:
41+
- "sphinx.ext.autodoc"
42+
- "sphinx.ext.autodoc.typehints"
43+
- "sphinx.ext.autosummary"
44+
- "sphinx.ext.napoleon"
45+
- "sphinx.ext.viewcode"
46+
- "matplotlib.sphinxext.plot_directive"
47+
config:
48+
autodoc_typehints: description
49+
nb_execution_show_tb: True

docs/_toc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Table of contents
2+
# Learn more at https://jupyterbook.org/customize/toc.html
3+
4+
format: jb-book
5+
root: readme
6+
parts:
7+
- caption: Challenges
8+
chapters:
9+
- file: notebooks/ceviche_challenge

0 commit comments

Comments
 (0)