Skip to content

Commit

Permalink
Set up Quarto website (#37)
Browse files Browse the repository at this point in the history
Still very minimal, but after this we can start filling it in, and
including the notebooks to the documentation.

Does not yet include the edits to thegoodcloud.md from #36. Probably
that file needs some extra tweaks anyway to make it render nicely.
  • Loading branch information
visr authored Nov 14, 2023
1 parent 574546a commit 2cb8882
Show file tree
Hide file tree
Showing 10 changed files with 11,781 additions and 7,953 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docs
on:
push:
branches: [main]
paths-ignore: [".teamcity/**"]
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
name: Docs
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
- name: Prepare pixi
run: pixi run install-without-pre-commit

- name: Check Quarto installation and all engines
run: pixi run quarto-check

- name: Render Quarto Project
run: pixi run quarto-render

- name: Publish Quarto Project
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
cache: true
- name: Prepare pixi
run: pixi run install-without-pre-commit
- name: Run mypy on hydamo
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
cache: true
- name: Prepare pixi
run: pixi run install-without-pre-commit

Expand Down
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.quarto/
/_site/
/reference/
41 changes: 41 additions & 0 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
project:
type: website

website:
title: "Ribasim-NL"
navbar:
left:
- reference/index.qmd
- cloudstorage.qmd
right:
- icon: github
href: https://github.com/Deltares/Ribasim-NL
aria-label: GitHub

format:
html:
theme: cosmo
css: styles.css
toc: true

quartodoc:
style: pkgdown
dir: reference
title: API Reference
package: null
sections:
- title: HyDAMO
package: hydamo
desc: The HyDAMO class represents the HyDAMO data model.
contents:
- HyDAMO
- ExtendedGeoDataFrame
- find_nearest_branch
- possibly_intersecting
- add_styles_to_geopackage
- read_style
- title: Ribasim-NL
package: ribasim_nl
desc: Ribasim-NL code.
contents:
- CloudStorage
1 change: 1 addition & 0 deletions docs/assets/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* css styles */
22 changes: 22 additions & 0 deletions docs/thegoodcloud.md → docs/cloudstorage.qmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: "Cloud storage"
---

# Connecting The Good Cloud

## OS environment variables
Expand All @@ -21,6 +25,16 @@ And else
cloud_storage = CloudStorage(password=password, data_dir=my_data_dir)
```

## Download sources (basisgegevens)
Find all sources

```
# find all sources, `PBL_watertypenkaart`
sources = cloud_storage.source_data
# download, `PBL_watertypenkaart`
cloud.download_basisgegevens(bronnen=["PBL_watertypenkaart"])
```

## Find water authorities
To find available water authorities:
```
Expand All @@ -39,3 +53,11 @@ cloud_storage.download_verwerkt(authority)
# to download all
cloud_storage.download_all(authority)
```

## Upload manipulated data (aangeleverd)
```
authority = "Rijkswaterstaat"
# upload local `aangeleverd` directory to cloud-storage
cloud_storage.upload_aangeleverd(authority, overwrite=True)
```
6 changes: 6 additions & 0 deletions docs/index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Ribasim-NL"
---

Ribasim-NL facilitates Ribasim water resources modeling in the Netherlands.
For more informantion on Ribasim itself please see the [Ribasim documentation](https://deltares.github.io/Ribasim/).
Loading

0 comments on commit 2cb8882

Please sign in to comment.