-
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 #4 from f-dangel/mkdocs
[DOC] Set up `mkdocs` to for generating documentation
- Loading branch information
Showing
8 changed files
with
112 additions
and
51 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
Empty file.
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 @@ | ||
::: wandb_preempt.get_resume_value | ||
|
||
::: wandb_preempt.Checkpointer | ||
options: | ||
members: | ||
- __init__ | ||
- load_latest_checkpoint | ||
- step |
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,45 @@ | ||
# Developer guide | ||
|
||
This guide describes principles and workflows for developers. | ||
|
||
## Setup | ||
|
||
We recommend programming in a fresh virtual environment. You can set up the | ||
`conda` environment and activate it | ||
|
||
```bash | ||
make conda-env | ||
conda activate wandb_preempt | ||
``` | ||
|
||
If you don't use `conda`, set up your preferred environment and run | ||
|
||
```bash | ||
pip install -e ."[lint,test]" | ||
``` | ||
to install the package in editable mode, along with all required development dependencies | ||
(the quotes are for OS compatibility, see | ||
[here](https://github.com/mu-editor/mu/issues/852#issuecomment-498759372)). | ||
|
||
## Continuous integration | ||
|
||
To standardize code style and enforce high quality, checks are carried out with | ||
Github actions when you push. You can also run them locally, as they are managed | ||
via `make`: | ||
|
||
- Run tests with `make test` | ||
|
||
- Run all linters with `make lint`, or separately with: | ||
|
||
- Run auto-formatting and import sorting with `make black` and `make isort` | ||
|
||
- Run linting with `make flake8` | ||
|
||
- Run docstring checks with `make pydocstyle-check` and `make darglint-check` | ||
|
||
## Documentation | ||
|
||
We use the [Google docstring | ||
convention](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) | ||
and `mkdocs` which allows using markdown syntax in a docstring to achieve | ||
formatting. To build the docs, run `mkdocs serve` in the repository root. |
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 @@ | ||
../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,45 @@ | ||
site_name: wandb_preempt | ||
site_url: https://https://readthedocs.org/projects/wandb_preempt/ | ||
repo_url: https://github.com/f-dangel/wandb_preempt/ | ||
repo_name: f-dangel/wandb_preempt | ||
site_author: Felix Dangel, Scott Lowe | ||
watch: | ||
- wandb_preempt | ||
nav: | ||
- Getting Started: index.md | ||
- API Documentation: api.md | ||
- Developer Notes: develop.md | ||
theme: | ||
name: material | ||
features: | ||
- content.code.copy | ||
copyright: Copyright © 2024 Felix Dangel, Scott Lowe | ||
markdown_extensions: | ||
- pymdownx.arithmatex: # LaTeX math | ||
generic: true | ||
- pymdownx.highlight: # code highlighting | ||
anchor_linenums: true | ||
line_spans: __span | ||
pygments_lang_class: true | ||
- pymdownx.inlinehilite # code highlighting | ||
- pymdownx.snippets # code highlighting | ||
- pymdownx.superfences # code highlighting | ||
- footnotes | ||
plugins: | ||
- mkdocstrings: | ||
default_handler: python | ||
handlers: | ||
python: | ||
options: | ||
show_root_heading: true | ||
show_source: true | ||
show_bases: true | ||
show_signature_annotations: true | ||
separate_signature: true | ||
docstring_section_style: list | ||
merge_init_into_class: true | ||
- search | ||
extra_javascript: | ||
- javascripts/mathjax.js # LaTeX math | ||
- https://polyfill.io/v3/polyfill.min.js?features=es6 # LaTeX math | ||
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js # LaTeX math |
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