Skip to content

Commit 55fa6ff

Browse files
authored
add better API docs (#31)
1 parent 702eb5b commit 55fa6ff

15 files changed

Lines changed: 138 additions & 4 deletions

.github/workflows/docs-test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: docs build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
env:
12+
# enable color output from Sphinx
13+
FORCE_COLOR: "1"
14+
15+
jobs:
16+
docs:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
- name: Install pandoc and doxygen
24+
run: |
25+
sudo apt install pandoc doxygen
26+
27+
- name: Setup Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: '3.11'
31+
cache: "pip"
32+
33+
- name: Install dependencies
34+
run: pip install -r ./requirements.txt
35+
36+
- name: Install ppmpy
37+
run: pip install --editable .
38+
39+
- name: Build docs
40+
run: |
41+
jupyter-book build --all ./docs

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ __pycache__
88
*.exe
99

1010
_build.*
11+
_build
12+
13+
flycheck*
1114

1215
*.pdf
1316

docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
To generate the API docs, from the root directory, do:
2+
3+
sphinx-apidoc -f -M -e -o docs ppmpy

docs/_toc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ parts:
1818

1919
- caption: API
2020
chapters:
21-
- file: api.rst
21+
- file: ppmpy.rst
22+

docs/modules.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ppmpy
2+
=====
3+
4+
.. toctree::
5+
:maxdepth: 4
6+
7+
ppmpy

docs/ppmpy.advection.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ppmpy.advection module
2+
======================
3+
4+
.. automodule:: ppmpy.advection
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/ppmpy.eigen.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ppmpy.eigen module
2+
==================
3+
4+
.. automodule:: ppmpy.eigen
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/ppmpy.euler.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ppmpy.euler module
2+
==================
3+
4+
.. automodule:: ppmpy.euler
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/ppmpy.gravity.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ppmpy.gravity module
2+
====================
3+
4+
.. automodule:: ppmpy.gravity
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/ppmpy.grid.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ppmpy.grid module
2+
=================
3+
4+
.. automodule:: ppmpy.grid
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

0 commit comments

Comments
 (0)