Skip to content

Commit

Permalink
Merge branch 'main' into rajeeja/welzl
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeeja committed Jun 27, 2024
2 parents 504bc08 + 6719a54 commit 9462e49
Show file tree
Hide file tree
Showing 26 changed files with 3,738 additions and 2,181 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/thumbnails/3_75_mpas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/thumbnails/mpas_topology.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 16 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,21 @@ def __getattr__(cls, name):

autodoc_typehints = "none"

# notebooks to exclude from run-time execution, will use rendered version
nb_execution_excludepatterns = ["3_75km_mpas.ipynb"]


# custom scripts for making a gallery of examples notebooks
def update_gallery(app: Sphinx):
"""Update the gallery of examples notebooks."""
"""Update the gallery page."""

LOGGER.info("creating gallery...")
LOGGER.info("Updating gallery page...")

notebooks = yaml.safe_load(pathlib.Path(app.srcdir, "gallery.yml").read_bytes())
gallery = yaml.safe_load(pathlib.Path(app.srcdir, "gallery.yml").read_bytes())

items = [
f"""
for key in gallery:
items = [
f"""
.. grid-item-card::
:text-align: center
:link: {item['path']}
Expand All @@ -218,20 +222,19 @@ def update_gallery(app: Sphinx):
+++
{item['title']}
"""
for item in notebooks
]
for item in gallery[key]
]

items_md = indent(dedent("\n".join(items)), prefix=" ")
markdown = f"""
items_md = indent(dedent("\n".join(items)), prefix=" ")
markdown = f"""
.. grid:: 1 2 3 3
:gutter: 2
{items_md}
"""

pathlib.Path(app.srcdir, "notebook-examples.txt").write_text(markdown)

LOGGER.info("gallery created")
pathlib.Path(app.srcdir, f"{key}-gallery.txt").write_text(markdown)
LOGGER.info(f"{key} gallery page updated.")
LOGGER.info("Gallery page updated.")


# Allow for changes to be made to the css in the theme_overrides file
Expand Down
25 changes: 0 additions & 25 deletions docs/examples.rst

This file was deleted.

Loading

0 comments on commit 9462e49

Please sign in to comment.