From aa678ced216478ef63e6865fc0746de5e181358d Mon Sep 17 00:00:00 2001 From: Marnix Kraus Date: Fri, 10 Nov 2023 11:02:27 +0100 Subject: [PATCH 1/5] Add c4 system context diagram to index.qmd To show the components that we use within RIBASIM --- docs/assets/c4_system.qmd | 34 ++++++++++++++++++++++++++++++++++ docs/index.qmd | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 docs/assets/c4_system.qmd diff --git a/docs/assets/c4_system.qmd b/docs/assets/c4_system.qmd new file mode 100644 index 000000000..273112f35 --- /dev/null +++ b/docs/assets/c4_system.qmd @@ -0,0 +1,34 @@ +```{mermaid} +flowchart TB +modeler([Modeler]):::user + +api["Ribasim Python API\n[python]"]:::system +modeler-->|prepare model|api + +ribasim["Ribasim\n[julia]"]:::system +modeler-->|start|ribasim + +subgraph qgisBoundary[QGIS] + QGIS[QGIS Application]:::system_ext + qgisPlugin["Ribasim QGIS plugin\n[python]"]:::system + QGIS-->qgisPlugin +end +modeler-->|prepare model|qgisBoundary + +model[("input model data\n[toml + geopackage + arrow]")]:::system +qgisPlugin-->|read/write|model +api-->|read/write|model +ribasim-->|simulate|model + +output[("simulation output\n[arrow]")]:::system +ribasim-->|write|output + +class qgisBoundary boundary + +%% class definitions for C4 model +classDef default stroke-width:1px,stroke:white,color:white; +classDef system fill:#1168bd; +classDef user fill:#08427b; +classDef system_ext fill:#999999; +classDef boundary fill:transparent,stroke-dasharray:5 5,stroke:black,color:black; +``` diff --git a/docs/index.qmd b/docs/index.qmd index 8597df9a7..9104070c3 100644 --- a/docs/index.qmd +++ b/docs/index.qmd @@ -44,6 +44,8 @@ Currently only Windows builds for `ribasim_cli.zip` are available. See [Usage](core/usage.qmd) for more information. +{{< include assets/c4_system.qmd >}} + # Status The initial focus is on being able to From 26cefcb686779d2d5dbbdeedc6f9b0214648ba88 Mon Sep 17 00:00:00 2001 From: Marnix Kraus Date: Fri, 10 Nov 2023 11:19:46 +0100 Subject: [PATCH 2/5] Change mermaid file extension to .mmd As described in https://quarto.org/docs/authoring/diagrams.html#file-include --- docs/assets/{c4_system.qmd => c4_system.mmd} | 2 -- docs/index.qmd | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) rename docs/assets/{c4_system.qmd => c4_system.mmd} (98%) diff --git a/docs/assets/c4_system.qmd b/docs/assets/c4_system.mmd similarity index 98% rename from docs/assets/c4_system.qmd rename to docs/assets/c4_system.mmd index 273112f35..9dd8824dd 100644 --- a/docs/assets/c4_system.qmd +++ b/docs/assets/c4_system.mmd @@ -1,4 +1,3 @@ -```{mermaid} flowchart TB modeler([Modeler]):::user @@ -31,4 +30,3 @@ classDef system fill:#1168bd; classDef user fill:#08427b; classDef system_ext fill:#999999; classDef boundary fill:transparent,stroke-dasharray:5 5,stroke:black,color:black; -``` diff --git a/docs/index.qmd b/docs/index.qmd index 9104070c3..02a595d70 100644 --- a/docs/index.qmd +++ b/docs/index.qmd @@ -44,7 +44,10 @@ Currently only Windows builds for `ribasim_cli.zip` are available. See [Usage](core/usage.qmd) for more information. -{{< include assets/c4_system.qmd >}} +```{mermaid} +%%| file: assets/c4_system.mmd +%%| fig-cap: "System overview of Ribasim" +``` # Status From 34df440b0b72062fd2079876ad9fcde26333b1b4 Mon Sep 17 00:00:00 2001 From: Marnix Kraus Date: Fri, 10 Nov 2023 11:57:54 +0100 Subject: [PATCH 3/5] Remove the name API Ribasim Python is what we use in the rest of the documentation --- docs/assets/c4_system.mmd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/assets/c4_system.mmd b/docs/assets/c4_system.mmd index 9dd8824dd..cc5a59a89 100644 --- a/docs/assets/c4_system.mmd +++ b/docs/assets/c4_system.mmd @@ -1,7 +1,7 @@ flowchart TB modeler([Modeler]):::user -api["Ribasim Python API\n[python]"]:::system +api["Ribasim Python\n[python]"]:::system modeler-->|prepare model|api ribasim["Ribasim\n[julia]"]:::system @@ -25,8 +25,8 @@ ribasim-->|write|output class qgisBoundary boundary %% class definitions for C4 model -classDef default stroke-width:1px,stroke:white,color:white; -classDef system fill:#1168bd; -classDef user fill:#08427b; -classDef system_ext fill:#999999; -classDef boundary fill:transparent,stroke-dasharray:5 5,stroke:black,color:black; +classDef default stroke-width:1px,stroke:white,color:white +classDef system fill:#1168bd +classDef user fill:#08427b +classDef system_ext fill:#999999 +classDef boundary fill:transparent,stroke-dasharray:5 5,stroke:black,color:black From 2155e9092de9e076b6e232039de188d0c9eb9802 Mon Sep 17 00:00:00 2001 From: Marnix Kraus Date: Fri, 10 Nov 2023 15:08:23 +0100 Subject: [PATCH 4/5] Add component diagram to julia core index.qmd --- docs/assets/c4_component_ribasim.mmd | 39 ++++++++++++++++++++++++++++ docs/core/index.qmd | 5 ++++ 2 files changed, 44 insertions(+) create mode 100644 docs/assets/c4_component_ribasim.mmd diff --git a/docs/assets/c4_component_ribasim.mmd b/docs/assets/c4_component_ribasim.mmd new file mode 100644 index 000000000..5b751e62a --- /dev/null +++ b/docs/assets/c4_component_ribasim.mmd @@ -0,0 +1,39 @@ +flowchart TB +modeler([Modeler]):::user + +api["Ribasim Python\n[python]"]:::system +modeler-->|prepare model|api + +subgraph ribasimBoundary[Ribasim] + ribasim["Ribasim.jl\n[julia]"]:::system + libribasim["libribasim\n[julia + python + BMI]"]:::system + cli["Ribasim CLI\n[julia]"]:::system + cli-->ribasim + libribasim-->ribasim +end +modeler-->|start|cli +modeler-->|coupled simulation|libribasim + +subgraph qgisBoundary[QGIS] + QGIS[QGIS Application]:::system_ext + qgisPlugin["Ribasim QGIS plugin\n[python]"]:::system + QGIS-->qgisPlugin +end +modeler-->|prepare model|qgisBoundary + +model[("input model data\n[toml + geopackage + arrow]")]:::system +qgisPlugin-->|read/write|model +api-->|read/write|model +ribasim-->|simulate|model + +output[("simulation output\n[arrow]")]:::system +ribasim-->|write|output + +class qgisBoundary,ribasimBoundary boundary + +%% class definitions for C4 model +classDef default stroke-width:1px,stroke:white,color:white +classDef system fill:#1168bd +classDef user fill:#08427b +classDef system_ext fill:#999999 +classDef boundary fill:transparent,stroke-dasharray:5 5,stroke:black,color:black diff --git a/docs/core/index.qmd b/docs/core/index.qmd index 407dd2bf7..daeb53b2b 100644 --- a/docs/core/index.qmd +++ b/docs/core/index.qmd @@ -11,3 +11,8 @@ The core is implemented in the [Julia programming language](https://julialang.or can be found in the [Ribasim repository](https://github.com/Deltares/Ribasim) under the `core/` folder. For developers we also advise to read the [developer documentation](../contribute/core.qmd). + +```{mermaid} +%%| file: ../assets/c4_component_ribasim.mmd +%%| fig-cap: "Component overview of Ribasim" +``` From 92648ecc564ccc7d667beca9d0b3b77cad6eda63 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Fri, 10 Nov 2023 15:54:11 +0100 Subject: [PATCH 5/5] Update docs/assets/c4_system.mmd --- docs/assets/c4_system.mmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assets/c4_system.mmd b/docs/assets/c4_system.mmd index cc5a59a89..7a40986fa 100644 --- a/docs/assets/c4_system.mmd +++ b/docs/assets/c4_system.mmd @@ -19,7 +19,7 @@ qgisPlugin-->|read/write|model api-->|read/write|model ribasim-->|simulate|model -output[("simulation output\n[arrow]")]:::system +output[("simulation results\n[arrow]")]:::system ribasim-->|write|output class qgisBoundary boundary