-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ColCarroll:docs
PiperOrigin-RevId: 604387310
- Loading branch information
Showing
12 changed files
with
304 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
python-version: [ 3.11 ] | ||
os: [ ubuntu-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[docs] | ||
- name: Upload docs | ||
run: | | ||
mkdocs build # twice, see https://github.com/patrick-kidger/pytkdocs_tweaks | ||
mkdocs gh-deploy --force |
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 |
---|---|---|
|
@@ -23,3 +23,7 @@ poetry.lock | |
|
||
# PyCharm | ||
.idea | ||
|
||
# Documentation | ||
.all_objects.cache | ||
site/ |
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 |
---|---|---|
@@ -0,0 +1,149 @@ | ||
/* Forked from | ||
/* https://github.com/patrick-kidger/equinox/blob/main/docs/_static/custom_css.css | ||
/* Emphasise sections of nav on left hand side */ | ||
|
||
nav.md-nav { | ||
padding-left: 5px; | ||
} | ||
|
||
nav.md-nav--secondary { | ||
border-left: revert !important; | ||
} | ||
|
||
.md-nav__title { | ||
font-size: 0.9rem; | ||
} | ||
|
||
.md-nav__item--section > .md-nav__link { | ||
font-size: 0.9rem; | ||
} | ||
|
||
/* Indent autogenerated documentation */ | ||
|
||
div.doc-contents { | ||
padding-left: 25px; | ||
border-left: 4px solid rgba(230, 230, 230); | ||
} | ||
|
||
/* Increase visibility of splitters "---" */ | ||
|
||
[data-md-color-scheme="default"] .md-typeset hr { | ||
border-bottom-color: rgb(0, 0, 0); | ||
border-bottom-width: 1pt; | ||
} | ||
|
||
[data-md-color-scheme="slate"] .md-typeset hr { | ||
border-bottom-color: rgb(230, 230, 230); | ||
} | ||
|
||
/* More space at the bottom of the page */ | ||
|
||
.md-main__inner { | ||
margin-bottom: 1.5rem; | ||
} | ||
|
||
/* Remove prev/next footer buttons */ | ||
|
||
.md-footer__inner { | ||
display: none; | ||
} | ||
|
||
/* Change font sizes */ | ||
|
||
html { | ||
/* Decrease font size for overall webpage | ||
Down from 137.5% which is the Material default */ | ||
font-size: 110%; | ||
} | ||
|
||
.md-typeset .admonition { | ||
/* Increase font size in admonitions */ | ||
font-size: 100% !important; | ||
} | ||
|
||
.md-typeset details { | ||
/* Increase font size in details */ | ||
font-size: 100% !important; | ||
} | ||
|
||
.md-typeset h1 { | ||
font-size: 1.6rem; | ||
} | ||
|
||
.md-typeset h2 { | ||
font-size: 1.5rem; | ||
} | ||
|
||
.md-typeset h3 { | ||
font-size: 1.3rem; | ||
} | ||
|
||
.md-typeset h4 { | ||
font-size: 1.1rem; | ||
} | ||
|
||
.md-typeset h5 { | ||
font-size: 0.9rem; | ||
} | ||
|
||
.md-typeset h6 { | ||
font-size: 0.8rem; | ||
} | ||
|
||
/* Bugfix: remove the superfluous parts generated when doing: | ||
??? Blah | ||
::: library.something | ||
*/ | ||
|
||
.md-typeset details .mkdocstrings > h4 { | ||
display: none; | ||
} | ||
|
||
.md-typeset details .mkdocstrings > h5 { | ||
display: none; | ||
} | ||
|
||
/* Change default colours for <a> tags */ | ||
|
||
[data-md-color-scheme="default"] { | ||
--md-typeset-a-color: rgb(0, 189, 164) !important; | ||
} | ||
[data-md-color-scheme="slate"] { | ||
--md-typeset-a-color: rgb(0, 189, 164) !important; | ||
} | ||
|
||
/* Highlight functions, classes etc. type signatures. Really helps to make clear where | ||
one item ends and another begins. */ | ||
|
||
[data-md-color-scheme="default"] { | ||
--doc-heading-color: #DDD; | ||
--doc-heading-border-color: #CCC; | ||
--doc-heading-color-alt: #F0F0F0; | ||
} | ||
[data-md-color-scheme="slate"] { | ||
--doc-heading-color: rgb(25,25,33); | ||
--doc-heading-border-color: rgb(25,25,33); | ||
--doc-heading-color-alt: rgb(33,33,44); | ||
--md-code-bg-color: rgb(38,38,50); | ||
} | ||
|
||
h4.doc-heading { | ||
/* NOT var(--md-code-bg-color) as that's not visually distinct from other code blocks.*/ | ||
background-color: var(--doc-heading-color); | ||
border: solid var(--doc-heading-border-color); | ||
border-width: 1.5pt; | ||
border-radius: 2pt; | ||
padding: 0pt 5pt 2pt 5pt; | ||
} | ||
h5.doc-heading, h6.heading { | ||
background-color: var(--doc-heading-color-alt); | ||
border-radius: 2pt; | ||
padding: 0pt 5pt 2pt 5pt; | ||
} | ||
|
||
/* Make errors in notebooks have scrolling */ | ||
.output_error > pre { | ||
overflow: auto; | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
::: bayesnf.evaluate |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
::: bayesnf.inference |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
::: bayesnf.models |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
::: bayesnf.spatiotemporal |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
--8<-- "README.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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
theme: | ||
name: material | ||
features: | ||
- navigation.sections # Sections are included in the navigation on the left. | ||
- navigation.expand # Expand collapsible sections by default | ||
- header.autohide # header disappears as you scroll | ||
palette: | ||
# Light mode / dark mode | ||
# We deliberately don't automatically use `media` to check a user's preferences. We default to light mode as | ||
# (a) it looks more professional, and (b) is more obvious about the fact that it offers a (dark mode) toggle. | ||
- scheme: default | ||
primary: white | ||
accent: amber | ||
toggle: | ||
icon: material/weather-night | ||
name: Switch to dark mode | ||
- scheme: slate | ||
primary: black | ||
accent: amber | ||
toggle: | ||
icon: material/weather-sunny | ||
name: Switch to light mode | ||
icon: | ||
repo: fontawesome/brands/github # GitHub logo in top right | ||
|
||
|
||
site_name: bayesnf | ||
site_description: The documentation for the bayesnf software library. | ||
site_author: Colin Carroll | ||
site_url: https://google.github.io/bayesnf | ||
|
||
repo_url: https://github.com/google/bayesnf | ||
repo_name: google/bayesnf | ||
edit_uri: "" # No edit button, as some of our pages are in /docs and some in /examples via symlink, so it's impossible for them all to be accurate | ||
|
||
strict: true # Don't allow warnings during the build process | ||
|
||
extra_javascript: | ||
# The below three make MathJax work, see https://squidfunk.github.io/mkdocs-material/reference/mathjax/ | ||
- _static/mathjax.js | ||
- https://polyfill.io/v3/polyfill.min.js?features=es6 | ||
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js | ||
|
||
extra_css: | ||
- _static/custom.css | ||
|
||
markdown_extensions: | ||
- pymdownx.arithmatex: # Render LaTeX via MathJax | ||
generic: true | ||
- pymdownx.snippets # Allowing hidden expandable regions denoted by ??? | ||
- pymdownx.superfences # Seems to enable syntax highlighting when used with the Material theme. | ||
- pymdownx.details # Allowing hidden expandable regions denoted by ??? | ||
- admonition | ||
- toc: | ||
permalink: "¤" # Adds a clickable permalink to each section heading | ||
toc_depth: 4 | ||
|
||
plugins: | ||
- search # default search plugin; needs manually re-enabling when using any other plugins | ||
- autorefs # Cross-links to headings | ||
- mkdocstrings: | ||
default_handler: python | ||
handlers: | ||
python: | ||
setup_commands: | ||
- import pytkdocs_tweaks | ||
- pytkdocs_tweaks.main() | ||
- import jaxtyping | ||
- jaxtyping.set_array_name_format("array") | ||
- import jax | ||
- jax.ShapeDtypeStruct.__module__ = "jax" | ||
- jax.core.ClosedJaxpr.__module__ = "jax.core" | ||
|
||
rendering: | ||
# show_root_heading: true # actually display anything at all... | ||
show_root_full_path: true # display "diffrax.asdf" not just "asdf" | ||
show_if_no_docstring: false | ||
show_signature_annotations: true | ||
show_source: false # don't include source code | ||
members_order: source # order methods according to their order of definition in the source code, not alphabetical order | ||
heading_level: 4 | ||
|
||
nav: | ||
- 'index.md' | ||
- Reference: | ||
- 'api/models.md' | ||
- 'api/spatiotemporal.md' | ||
- 'api/inference.md' | ||
- 'api/evaluate.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