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

Run quick start in docs #1811

Merged
merged 20 commits into from
Sep 19, 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
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ repos:
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
Expand Down
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
},
"notebook.formatOnSave.enabled": false,
"notebook.codeActionsOnSave": {
"source.fixAll.ruff": true,
"source.organizeImports.ruff": true
// https://github.com/astral-sh/ruff-vscode/issues/593
"source.fixAll.ruff": "never",
"source.organizeImports.ruff": "never"
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/_site/
/site_libs/
/reference/python/
/tutorial/crystal-basin/
guide/data/
*.html
objects.json
11 changes: 9 additions & 2 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ website:
left:
- text: "Overview"
file: index.qmd
- text: "Tutorials"
file: tutorial/natural-flow.ipynb
- text: "How-to guides"
file: guide/quickstart.qmd
file: guide/examples.ipynb
- text: "Concepts"
file: concept/concept.qmd
- text: "Reference"
Expand All @@ -31,9 +33,14 @@ website:
- changelog.qmd
- known_issues.qmd

- title: "Tutorials"
contents:
- tutorial/natural-flow.ipynb
- tutorial/irrigation-demand.ipynb
- tutorial/reservoir.ipynb

- title: "How-to guides"
contents:
- guide/quickstart.qmd
- guide/examples.ipynb
- guide/qgis.qmd
- guide/coupling.qmd
Expand Down
13 changes: 0 additions & 13 deletions docs/guide/examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -405,19 +405,6 @@
"ribasim basic/ribasim.toml\n",
"```\n",
"\n",
"From Python you can run it with:\n",
"\n",
"```python\n",
"import subprocess\n",
"result = subprocess.run([cli_path, toml_path], capture_output=True, encoding=\"utf-8\")\n",
"print(result.stderr)\n",
"result.check_returncode()\n",
"```\n",
"\n",
"Where `cli_path` is a string with either the full path to the Ribasim executable, like `r\"c:\\ribasim_windows\\ribasim\"`, or just `\"ribasim\"` in case you added the `ribasim_windows` folder to your PATH.\n",
"\n",
"The `print(result.stderr)` ensures you see the same logging and error messages that you would see in the terminal. And `result.check_returncode()` will throw an error when the simulation was not successful.\n",
"\n",
"After running the model, read back the results:"
]
},
Expand Down
Loading