Skip to content

Commit

Permalink
Merge pull request #34 from wpbonelli/c4
Browse files Browse the repository at this point in the history
draft c4 diagrams https://c4model.com/
  • Loading branch information
wpbonelli authored Oct 3, 2024
2 parents eea01c8 + 55a7838 commit 83602f6
Showing 1 changed file with 104 additions and 0 deletions.
104 changes: 104 additions & 0 deletions docs/dev/c4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# FloPy C4 diagrams

Documenting prospective FloPy architecture.

```mermaid
C4Context
title [Context] FloPy / MF6
Enterprise_Boundary(ec, "EC Framework") {
Person(hydrologist, "Hydrologist", "determines optimal pumping rate for well field")
Person(student, "Student", "simulates salt water intrusion in coastal aquifer")
Person(professor, "Professor", "teaches groundwater modeling course")
Person(institution, "Lab/Institution", "maintains pre-/post-processing extensions")
Person(developer, "Developer", "debugs issues, develops features/models")
System(flopy, "FloPy")
System(mf6, "MODFLOW 6")
Rel(flopy, mf6, "wraps")
Rel(hydrologist, flopy, "uses")
Rel(student, flopy, "uses")
Rel(professor, flopy, "uses")
Rel(institution, flopy, "extends")
Rel(developer, flopy, "develops")
UpdateRelStyle(hydrologist, flopy, $lineColor="blue")
UpdateRelStyle(student, flopy, $lineColor="blue")
UpdateRelStyle(professor, flopy, $lineColor="blue")
UpdateRelStyle(institution, flopy, $lineColor="blue", $offsetX="-190", $offsetY="10")
UpdateRelStyle(developer, flopy, $lineColor="blue")
}
```

```mermaid
C4Container
title [Containers] FloPy / MF6
Enterprise_Boundary(ec, "EC Framework") {
Boundary(mf6, "MODFLOW 6"){
SystemDb(dfn, "Definition files")
}
Boundary(flopy, "FloPy") {
Boundary(devs, "Developer APIs") {
System(fpycodegen, "Code generation")
System(fpycore, "Core framework")
}
Boundary(users, "User APIs") {
System(fpymf6, "MODFLOW 6 module")
System(fpyprepost, "Pre-/post-processing")
}
Rel(fpymf6, fpycore, "imports")
Rel(fpyprepost, fpycore, "imports")
Rel(fpycodegen, dfn, "inspects")
Rel(fpycodegen, fpymf6, "generates")
}
Person(dev, "Developer", "")
Person(user, "User", "")
Rel(dev, dfn, "develops")
Rel(dev, fpycore, "develops")
Rel(dev, fpycodegen, "uses")
Rel(user, fpymf6, "uses")
Rel(user, fpyprepost, "uses")
UpdateRelStyle(dev, dfn, $lineColor="blue", $offsetX="-20" $offsetY="-30")
UpdateRelStyle(dev, fpycore, $lineColor="blue", $offsetY="90")
UpdateRelStyle(dev, fpycodegen, $lineColor="blue", $offsetY="50")
UpdateRelStyle(user, fpymf6, $lineColor="blue", $offsetY="50")
UpdateRelStyle(user, fpyprepost, $lineColor="blue", $offsetY="50")
UpdateRelStyle(user, fpycore, $lineColor="blue", $offsetX="-20" $offsetY="-10")
}
UpdateLayoutConfig($c4ShapeInRow="5", $c4BoundaryInRow="5")
```

```mermaid
C4Component
title [Component] FloPy code generation
Container_Boundary(fpycodegen, "Code generation") {
Component(templates, "Jinja templates")
Component(genscript, "Generator script")
}
Container_Boundary(fpymf6, "MF6 module") {
Component(comp1, "IDM component 1")
Component(comp2, "IDM component 2")
}
Container_Boundary(fpycore, "Core framework") {
Component(ctx, "Input contexts")
}
Rel(genscript, templates, "uses")
Rel(genscript, comp1, "creates")
Rel(genscript, comp2, "creates")
Rel(genscript, ctx, "uses")
Rel(comp1, ctx, "imports")
Rel(comp2, ctx, "imports")
```

0 comments on commit 83602f6

Please sign in to comment.