-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding pdoc-generated example gallery used as both example docs landi…
…ng site and setup.py description (#467) Co-authored-by: Sylwester Arabas <[email protected]>
- Loading branch information
1 parent
857f263
commit dc969ff
Showing
17 changed files
with
115 additions
and
63 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 |
---|---|---|
|
@@ -95,10 +95,18 @@ jobs: | |
- env: | ||
JUPYTER_PLATFORM_DIRS: 1 | ||
run: | | ||
pip3 install pdoc | ||
pip3 install pdoc nbformat | ||
pip install -e . -e ./examples | ||
export PDOC_ALLOW_EXEC=1 | ||
python -We -m pdoc -o html PyMPDATA examples/PyMPDATA_examples -t docs/templates | ||
python - <<EOF | ||
import glob, nbformat | ||
for notebook_path in glob.glob('examples/PyMPDATA_examples/*/*.ipynb'): | ||
with open(notebook_path, encoding="utf8") as fin: | ||
with open(notebook_path + ".badges.md", 'w') as fout: | ||
fout.write(nbformat.read(fin, nbformat.NO_CONVERT).cells[0].source) | ||
EOF | ||
PDOC_ALLOW_EXEC=1 python -We -m pdoc -o html PyMPDATA examples/PyMPDATA_examples -t docs/templates --math | ||
- if: ${{ github.ref == 'refs/heads/main' && matrix.platform == 'ubuntu-latest' }} | ||
uses: JamesIves/[email protected] | ||
with: | ||
|
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
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
""" | ||
This example is based on the paper: | ||
[Bartman et al. 2022](https://doi.org/10.21105/joss.03896). | ||
fig_X.ipynb: | ||
.. include:: ./fig_X.ipynb.badges.md | ||
""" |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
""" | ||
This example demonstrates the use of the Double-Pass Donor-Cell option in `PyMPDATA.options`. | ||
demo.ipynb: | ||
.. include:: ./demo.ipynb.badges.md | ||
""" |
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
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
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
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
6 changes: 4 additions & 2 deletions
6
examples/PyMPDATA_examples/advection_diffusion_1d/__init__.py
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
""" | ||
PyMPDATA 1D advection-diffusion example with error analysis | ||
for different initial parameters. | ||
PyMPDATA 1D advection-diffusion example with error analysis for different initial parameters. | ||
demo.ipynb: | ||
.. include:: ./demo.ipynb.badges.md | ||
""" |
3 changes: 3 additions & 0 deletions
3
examples/PyMPDATA_examples/advection_diffusion_2d/__init__.py
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
""" | ||
PyMPDATA 2D advection-diffusion example with gif creation. | ||
advection-diffusion-2d.ipynb: | ||
.. include:: ./advection-diffusion-2d.ipynb.badges.md | ||
""" |
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
Oops, something went wrong.