-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from UCL/mmg/add-docs
Add MkDocs documentation
- Loading branch information
Showing
12 changed files
with
184 additions
and
29 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,38 @@ | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
- name: Cache tox | ||
uses: actions/cache@v4 | ||
with: | ||
path: .tox | ||
key: tox-${{ hashFiles('pyproject.toml') }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
cache: "pip" | ||
cache-dependency-path: "pyproject.toml" | ||
- name: Install tox | ||
run: python -m pip install tox | ||
- name: Build HTML documentation with tox | ||
run: tox -e docs | ||
- name: Publish documentation on GitHub pages | ||
if: success() && github.event_name != 'pull_request' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: site | ||
publish_branch: gh-pages | ||
user_name: "github-actions[bot]" | ||
user_email: "github-actions[bot]@users.noreply.github.com" |
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 |
---|---|---|
|
@@ -3,7 +3,9 @@ | |
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) | ||
[![Tests status][tests-badge]][tests-link] | ||
[![Linting status][linting-badge]][linting-link] | ||
[![Documentation status][docs-badge]][docs-link] | ||
[![License][license-badge]](./LICENSE.md) | ||
[![Documentation](https://img.shields.io/badge/MkDocs-documentation-blue?logo=materialformkdocs&logoColor=white)](https://github-pages.ucl.ac.uk/calibr/) | ||
|
||
<!-- | ||
[![PyPI version][pypi-version]][pypi-link] | ||
|
@@ -16,6 +18,8 @@ | |
[tests-link]: https://github.com/UCL/calibr/actions/workflows/tests.yml | ||
[linting-badge]: https://github.com/UCL/calibr/actions/workflows/linting.yml/badge.svg | ||
[linting-link]: https://github.com/UCL/calibr/actions/workflows/linting.yml | ||
[docs-badge]: https://github.com/UCL/calibr/actions/workflows/docs.yml/badge.svg | ||
[docs-link]: https://github.com/UCL/calibr/actions/workflows/docs.yml | ||
[conda-badge]: https://img.shields.io/conda/vn/conda-forge/calibr | ||
[conda-link]: https://github.com/conda-forge/calibr-feedstock | ||
[pypi-link]: https://pypi.org/project/calibr/ | ||
|
@@ -53,18 +57,7 @@ likelihood evaluations. Expect lots of rough edges! | |
|
||
This project is developed in collaboration with the [Centre for Advanced Research Computing](https://ucl.ac.uk/arc), University College London. | ||
|
||
## About | ||
|
||
### Project Team | ||
|
||
- Matt Graham ([matt-graham](https://github.com/matt-graham)) | ||
|
||
### Research Software Engineering Contact | ||
|
||
Centre for Advanced Research Computing, University College London | ||
([[email protected]](mailto:[email protected])) | ||
|
||
## Getting Started | ||
## Getting started | ||
|
||
### Prerequisites | ||
|
||
|
@@ -90,9 +83,9 @@ and then install in editable mode by running | |
pip install -e . | ||
``` | ||
|
||
### Running locally | ||
### Documentation | ||
|
||
How to run the application on your local system. | ||
Documentation for the package is available at <https://github-pages.ucl.ac.uk/calibr/>. | ||
|
||
### Running tests | ||
|
||
|
@@ -111,6 +104,24 @@ pytest tests | |
|
||
again from the root of the repository. | ||
|
||
### Building documentation | ||
|
||
The MkDocs HTML documentation can be built locally by running | ||
|
||
```sh | ||
tox -e docs | ||
``` | ||
|
||
from the root of the repository. The built documentation will be written to | ||
`site`. | ||
|
||
Alternatively to build and preview the documentation locally, in a Python | ||
environment with the optional `docs` dependencies installed, run | ||
|
||
```sh | ||
mkdocs serve | ||
``` | ||
|
||
## Acknowledgements | ||
|
||
This work was funded by a grant from the ExCALIBUR programme. |
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 @@ | ||
{! include-markdown "../LICENSE.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,3 @@ | ||
# API reference | ||
|
||
::: calibr |
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 @@ | ||
{! include-markdown "../README.md" rewrite-relative-urls=false !} |
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,67 @@ | ||
site_name: calibr | ||
site_description: "Documentation website for calibr" | ||
site_author: "Matt Graham" | ||
copyright: "Copyright © 2024 University College London" | ||
repo_url: "https://github.com/UCL/calibr/" | ||
repo_name: "UCL/calibr" | ||
edit_uri: edit/main/docs/ | ||
|
||
validation: | ||
omitted_files: warn | ||
absolute_links: warn | ||
unrecognized_links: warn | ||
|
||
theme: | ||
name: "material" | ||
features: | ||
- content.action.edit | ||
palette: | ||
- media: "(prefers-color-scheme)" | ||
toggle: | ||
icon: material/brightness-auto | ||
name: Switch to light mode | ||
- media: "(prefers-color-scheme: light)" | ||
scheme: default | ||
toggle: | ||
icon: material/brightness-7 | ||
name: Switch to dark mode | ||
- media: "(prefers-color-scheme: dark)" | ||
scheme: slate | ||
toggle: | ||
icon: material/brightness-4 | ||
name: Switch to system preference | ||
icon: | ||
repo: fontawesome/brands/github | ||
|
||
nav: | ||
- Overview: index.md | ||
- API reference: api.md | ||
- License: LICENSE.md | ||
|
||
markdown_extensions: | ||
- pymdownx.tasklist | ||
|
||
plugins: | ||
- search | ||
- mkdocstrings: | ||
default_handler: python | ||
handlers: | ||
python: | ||
docstring_style: google | ||
import: | ||
- "https://docs.python.org/3/objects.inv" | ||
- "https://numpy.org/doc/stable/objects.inv" | ||
- "https://jax.readthedocs.io/en/latest/objects.inv" | ||
paths: [src] | ||
options: | ||
show_submodules: true | ||
separate_signature: true | ||
line_length: 88 | ||
- include-markdown: | ||
opening_tag: "{!" | ||
closing_tag: "!}" | ||
|
||
extra: | ||
social: | ||
- icon: fontawesome/brands/github | ||
link: "https://github.com/UCL" |
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 +1 @@ | ||
"""An example file.""" | ||
"""Bayesian calibration of simulations using Gaussian process emulation.""" |
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