Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: Restructure docs #145

Merged
merged 10 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: "true"
fetch-depth: 0 # fetch all commits/branches
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: "true"
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
sudo apt install libglu1
- name: Test notebooks
run: |
pytest --nbmake examples/
pytest --nbmake docs/**/*ipynb

# upload code coverage report
code-coverage:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Add `branch_network` and `trunk_network` arguments to `DeepONet` to allow for custom network architectures.
- Add `MaskedOperator` base class.
- Add `DeepCatOperator`.
- Restructure documentation, separating notebooks into tutorials and how-to guides.

## 0.1.0

Expand Down
23 changes: 13 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ pre-commit install

## Build documentation

API documentation and examples from notebooks are built with
[mkdocs](https://www.mkdocs.org/).
API documentation is built with [mkdocs](https://www.mkdocs.org/).
Notebooks are an integral part of the documentation as well.

You can use this command to continuously rebuild documentation
Expand Down Expand Up @@ -92,15 +91,9 @@ pytest -m "not slow"

## Notebooks

We use notebooks both as documentation (copied over to `docs/examples`) and as
integration tests. All notebooks in the `examples` directory are executed
during the test run.

We use notebooks both as documentation and as integration tests.
Because we want documentation to include the full dataset, we commit notebooks
with their outputs running with full datasets to the repo. The notebooks are
then added by CI to the section
[Examples](https://aai-institute.github.io/continuiti/examples.html) of the
documentation.
with their outputs running with full datasets to the repo.

### Hiding cells in notebooks

Expand Down Expand Up @@ -135,6 +128,16 @@ To only hide the input and
```
for hiding the output only.

If a cell should be skipped in CI (e.g. because the full data set is missing),
you can use:

```yaml
"tags": [
"skip-execution"
]
```


### Plots in Notebooks
If you add a plot to a notebook, which should also render nicely in browser
dark mode, add the tag *invertible-output*, i.e.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ pip install -e .[dev]

## Usage
Our [Documentation](https://aai-institute.github.io/continuiti/) contains a
verbose introduction to operator learning, a collection of examples using
continuiti, and a class documentation.
collection of tutorials on how to learn operators using continuiti,
a collection of how-to guides to solve specific problems, more background,
and a class documentation.

In general, the operator syntax in **continuiti** is
```python
Expand Down
1 change: 0 additions & 1 deletion benchmarks/.gitattributes

This file was deleted.

3 changes: 0 additions & 3 deletions benchmarks/navierstokes/ns_test_144.png

This file was deleted.

3 changes: 0 additions & 3 deletions benchmarks/navierstokes/ns_test_179.png

This file was deleted.

3 changes: 0 additions & 3 deletions benchmarks/navierstokes/ns_train_587.png

This file was deleted.

3 changes: 0 additions & 3 deletions benchmarks/navierstokes/ns_train_648.png

This file was deleted.

4 changes: 2 additions & 2 deletions build_scripts/copy_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ def on_pre_build(config):
)
target_filepath.symlink_to(file)

logger.info("Finished copying notebooks to examples directory")
logger.info("Finished copying notebooks to benchmarks directory")


@mkdocs.plugins.event_priority(-100)
def on_shutdown():
logger.info("Removing temporary examples directory")
logger.info("Removing temporary benchmarks directory")
for file in docs_benchmarks_dir.glob("*.json"):
file.unlink()
44 changes: 0 additions & 44 deletions build_scripts/copy_notebooks.py

This file was deleted.

Loading
Loading