Skip to content

Commit

Permalink
Finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiefl committed Sep 1, 2024
1 parent 0a07db0 commit ac6b7b2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ To generate a local copy of the documentation, make sure you've installed poetry
poetry install --with docs
```

Additionally, `pandoc` needs to be installed: https://pandoc.org/installing.html

Then navigate to this directory and run:

```
Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@

# -- Notebook rendering -------------------------------------------------

# Something to consider: https://dokk.org/documentation/nbsphinx/0.9.3/prolog-and-epilog/
nbsphinx_epilog = """"""
nbsphinx_prolog = """"""

nbsphinx_custom_formats = {
".pct.py": ["jupytext.reads", {"fmt": "py:percent"}],
}
Expand Down
10 changes: 9 additions & 1 deletion docs/examples/30_degree_rule.pct.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# %% [markdown]
# # 30-degree rule
#
# NOTE: THIS IS JUST A TEST
#
# $\exp{10} = A_{i}$
#
# $$
# \text{XXX} = \cos{2\pi}
# $$
#
#
# """This script validates the 30-degree rule proposed by Dr. Dave Billiards
#
# For more information about the 30-degree rule, see https://billiards.colostate.edu/faq/30-90-rules/30-degree-rule/
Expand All @@ -12,7 +21,6 @@
import plotly.express as px
import plotly.io as pio

# %%
import pooltool as pt
import pooltool.constants as constants

Expand Down
7 changes: 7 additions & 0 deletions docs/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Summary

All the examples are jupyter notebooks represented in percent format: https://jupytext.readthedocs.io/en/latest/formats-scripts.html#the-percent-format

They can be opened as notebooks by running `jupyter lab`, right clicking the file, and selecting "Open as notebook"

If you have a notebook, and would like to add it to the documentation, convert it to the percent format `jupytext --sync <yours.ipynb>`. It must be suffixed with `.pct.py`. Then open `index.md` and add it.
3 changes: 0 additions & 3 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Examples

## Contents

```{eval-rst}
.. toctree::
:maxdepth: 2
:caption: Contents:
30_degree_rule
```

0 comments on commit ac6b7b2

Please sign in to comment.