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

Use Quarto / Quartodoc for documentation #421

Merged
merged 80 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 70 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
8433373
Notebook examples in documentation
ecomodeller Dec 16, 2023
214b0c7
Merge branch 'main' into docs-examples-notebooks
jsmariegaard Dec 21, 2023
d3865a7
Merge branch 'main' into docs-examples-notebooks
ecomodeller Jan 17, 2024
7781dd1
Merge branch 'main' into docs-examples-notebooks
ecomodeller Feb 12, 2024
2113ad5
Updated notebook examples
ecomodeller Feb 12, 2024
45f1feb
Merge branch 'main' into docs-examples-notebooks
ecomodeller Feb 13, 2024
356635e
Updated reprs
ecomodeller Feb 13, 2024
93baf24
WIP
ecomodeller Feb 13, 2024
14656cb
WIP
ecomodeller Feb 13, 2024
3d51e77
Generated by quartodoc
ecomodeller Feb 13, 2024
cc26b9e
CI
ecomodeller Feb 13, 2024
a5de179
Font-awesome icons
ecomodeller Feb 13, 2024
2a55b5b
No interaction
ecomodeller Feb 13, 2024
f32998b
References header in docsstring not supported
ecomodeller Feb 13, 2024
0959c60
Notes
ecomodeller Feb 13, 2024
1f0669c
Note != Notes
ecomodeller Feb 14, 2024
d130cd2
Update
ecomodeller Feb 14, 2024
ae24a17
Convert notebooks
ecomodeller Feb 14, 2024
2f5a17e
Github links
ecomodeller Feb 15, 2024
1674608
Add extensions
ecomodeller Feb 15, 2024
b5bcb52
Valid YAML
ecomodeller Feb 15, 2024
ba436b1
We need jupyter to run notebooks.
ecomodeller Feb 15, 2024
fc345e1
Terminology
ecomodeller Feb 15, 2024
3aff6f3
More links to api
ecomodeller Feb 15, 2024
bd95d50
Quartodoc from git has
ecomodeller Feb 16, 2024
c8c66ba
Updated notebooks
ecomodeller Feb 16, 2024
3c22c0a
More api
ecomodeller Feb 16, 2024
7847ff6
Docstrings
ecomodeller Feb 16, 2024
efef72a
Executable examples FTW
ecomodeller Feb 17, 2024
2858975
Callouts
ecomodeller Feb 17, 2024
514cc59
Executable plotting page
ecomodeller Feb 20, 2024
f303e03
Taylor plot
ecomodeller Feb 20, 2024
7c10652
Taylor returns figure
ecomodeller Feb 20, 2024
bfe47eb
Merge branch 'main' into quarto
ecomodeller Feb 20, 2024
cb7592e
Short getting started etc.
ecomodeller Feb 20, 2024
cca5e7c
Better nested navigation
ecomodeller Feb 20, 2024
56c0ada
API in sidebar
ecomodeller Feb 20, 2024
50526b3
Icons FTW
ecomodeller Feb 20, 2024
7839aa0
Icons FTW
ecomodeller Feb 20, 2024
d1f4fcd
Merge branch 'quarto' of github.com:DHI/modelskill into quarto
ecomodeller Feb 20, 2024
2ee6a04
Misc
ecomodeller Feb 21, 2024
79a0689
Inherited
ecomodeller Feb 21, 2024
3bf5368
Cosmo
ecomodeller Mar 15, 2024
74c6d37
Merge branch 'main' into quarto
ecomodeller Oct 7, 2024
c948df3
Quartodoc version
ecomodeller Oct 7, 2024
50cb57c
Runnable examples in Quantity
ecomodeller Oct 7, 2024
ba84d5f
Update Python version
ecomodeller Oct 7, 2024
bfa0695
Executable examples
ecomodeller Nov 11, 2024
c268b35
qmd instead md
ecomodeller Nov 11, 2024
c6654fd
Update docs workflow
ecomodeller Nov 11, 2024
e60f8f5
Need netcdf library
ecomodeller Nov 11, 2024
ff801d6
Links
ecomodeller Nov 12, 2024
fe2c626
Exit 1 on failure
ecomodeller Nov 12, 2024
766a2eb
A hacky check for failure
ecomodeller Nov 12, 2024
e335adb
Clean target
ecomodeller Nov 12, 2024
0e8bd6c
Strings instead of categories
ecomodeller Nov 12, 2024
fc39cc1
Plotly is needed for docs
ecomodeller Nov 12, 2024
d4aceb2
Executable overview (simplified)
ecomodeller Nov 12, 2024
fdf713f
Executable code and links to API documentation
ecomodeller Nov 12, 2024
aaa08ab
Upload rendered html as artifact
ecomodeller Nov 12, 2024
20497f6
Stupid Copilot
ecomodeller Nov 12, 2024
f0c8edd
Code folding FTW
ecomodeller Nov 12, 2024
5851e45
Metrics was missing from API
ecomodeller Nov 12, 2024
deee50e
One line summary docstrings
ecomodeller Nov 13, 2024
f074d5d
List plotting functions in the overview
ecomodeller Nov 13, 2024
412c4bc
Merge branch 'main' into quarto
ecomodeller Nov 14, 2024
7d295e5
Add API to left sidebar
ecomodeller Nov 19, 2024
384f46c
Remove links to plotting module
ecomodeller Nov 19, 2024
9bda875
Custom table styling
ecomodeller Nov 19, 2024
81eb788
Merge branch 'quarto' of github.com:DHI/modelskill into quarto
ecomodeller Nov 19, 2024
7453b95
Custom api pages
ecomodeller Nov 20, 2024
a19484d
Hide active page (not working)
ecomodeller Nov 20, 2024
f6b90a5
Longer Comparison class docstring
ecomodeller Nov 20, 2024
00de2ae
Add missing custom index page
ecomodeller Nov 22, 2024
440a437
Remove scatter plot from home page
ecomodeller Nov 22, 2024
449271d
Merge branch 'main' into quarto
ecomodeller Dec 12, 2024
f735e3a
Hybrid navigation
ecomodeller Dec 12, 2024
e18208b
Trying different way to get API sidebar
ecomodeller Dec 12, 2024
f824dd5
No Mkdocs in this branch
ecomodeller Dec 12, 2024
9a3d923
Very close to the existing docs structure
ecomodeller Dec 13, 2024
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source .venv/bin/activate
28 changes: 0 additions & 28 deletions .github/workflows/build_docs.yml

This file was deleted.

45 changes: 29 additions & 16 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
name: Documentation

on:
on:
push:
branches:
- main
branches: [ main]
pull_request:
branches: [ main]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: 3.12

- name: Install dependencies
run: |
python -m pip install --upgrade pip

- name: Install modelskill
run: pip install .[dev]

- name: MkDocs
run: mkdocs build
run: |
pip install .[docs]

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Build documentation
run: |
make docs

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/_site/

- name: Publish to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site

publish_dir: docs/_site/

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,8 @@ notebooks/sandbox.ipynb
streamlit_app.py
notes.md

notebooks/Untitled.ipynb
notebooks/Untitled.ipynb

docs/_site/
docs/_extensions/
docs/api/*.qmd
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ coverage:
pytest --cov-report html --cov=$(LIB) tests/

docs: FORCE
mkdocs build
set -e; \
cd docs; \
quartodoc build; \
quarto render; \
if [ ! -f _site/index.html ]; then \
echo "Error: index.html not found. Quarto render failed."; \
exit 1; \
fi; \
cd -

clean:
rm -rf .pytest_cache
rm -rf .mypy_cache
rm -rf .coverage
rm -rf dist
rm -rf docs/_site


FORCE:
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.quarto/
_sidebar.yml
objects.json
7 changes: 7 additions & 0 deletions docs/_extensions/fontawesome/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Font Awesome support
author: Carlos Scheidegger
version: 1.1.0
quarto-required: ">=1.2.269"
contributes:
shortcodes:
- fontawesome.lua
Loading
Loading