Skip to content

Commit

Permalink
simplify diagram, add styling
Browse files Browse the repository at this point in the history
  • Loading branch information
jessica-mitchell committed Aug 29, 2023
1 parent da83b4d commit 4b76446
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,109 +23,41 @@ with each release of NEST having its own documentation.

This workflow aims for the concept of **user-correctable documentation**.


.. mermaid::
:zoom:
:caption: Overview of documentation build. Drag and zoom to explore.

flowchart LR

classDef source color:#fff, stroke:#f63, stroke-width:2px, fill:#f63;
classDef ext color:#fff, stroke:#c072f42, stroke-width:2px, fill:#072f42;
classDef sphinx color:#fff, stroke:#652200, stroke-width:2px, fill:#652200;

subgraph BUILD: Read the docs or _build/
subgraph output
html:::sphinx
arti
end
ar-->html
ap-->arti["artifacts (downloadable)"]:::sphinx
ai-->arti
subgraph sphinx
parse((parse rst)):::sphinx-->html
subgraph autodoc
api_docstrings:::sphinx-->html
end
subgraph gallery
ai["auto_examples: ipynb"]:::sphinx
ar["auto_examples: rst"]:::sphinx
ap["auto_examples: py"]:::sphinx
end
subgraph custom_extensions
extractor_userdocs.py:::ext-->html
button["fn add_button_to_examples: conf.py"]:::ext-->html
end
subgraph nbsphinx
notebooks:::sphinx --> html
end
end
end

subgraph SOURCE: nest/nest-simulator
docs["doc/htmldoc: .rst"]:::source-->sphinx
models["cpp models: .h"]:::source-->extractor_userdocs.py
py["pynest/examples: .py"]:::source-->gallery
api["pynest/nest .py"]:::source-->autodoc
ipynb["model_details: .ipynb"]:::source-->nbsphinx
end
subgraph nest/nest-simulator-examples
Jupyter_notebook_pyexamples:::source-->button
ai -..-> Jupyter_notebook_pyexamples
end

.. mermaid::
:zoom:
:caption: Overview of documentation build. Drag and zoom to explore.
flowchart TB

flowchart LR
sphinx:::TextPosition

classDef nest stroke:#f63, stroke-width:2px, fill:#fff;
classDef TextPosition padding-right:20em, padding-top:10em;
classDef orangeFill color:#fff, stroke:#f63, stroke-width:2px, fill:#f63;
classDef blueFill color:#fff, stroke:#072f42, stroke-width:2px, fill:#072f42;
classDef brownFill color:#fff, stroke:#652200, stroke-width:2px, fill:#652200;

subgraph BUILD: Read the docs or _build/
subgraph output
html:::nest
arti
end
ar-->html
ap-->arti["artifacts (downloadable)"]:::nest
ai-->arti
subgraph sphinx
parse((parse rst)):::nest-->html
subgraph autodoc
api_docstrings:::nest-->html
end
subgraph gallery
ai["auto_examples: ipynb"]:::nest
ar["auto_examples: rst"]:::nest
ap["auto_examples: py"]:::nest
end
subgraph custom_extensions
extractor_userdocs.py:::nest-->html
button["fn add_button_to_examples: conf.py"]:::nest-->html
end
subgraph nbsphinx
notebooks:::nest --> html
end
subgraph sphinx[SPHINX]
read(Read source files):::blueFill-->ext
read-->custom
subgraph Parse_rst ["Parse rst"]
ext(sphinx_extensions):::blueFill
custom(custom_extensions):::blueFill
end
Parse_rst-->build
build(Build output formats):::blueFill
end
subgraph SOURCE FILES
source(repo: nest/nest-simulator):::orangeFill-->read
end

subgraph OUTPUT["OUTPUT"]
direction TB
build--local-->local(_build directory):::brownFill
build-->rtd(Read the Docs):::brownFill
local-->HTML(HTML):::brownFill
rtd-->HTML
end

subgraph SOURCE: nest/nest-simulator
docs["doc/htmldoc: .rst"]:::nest-->sphinx
models["cpp models: .h"]:::nest-->extractor_userdocs.py
py["pynest/examples: .py"]:::nest-->gallery
api["pynest/nest .py"]:::nest-->autodoc
ipynb["model_details: .ipynb"]:::nest-->nbsphinx
end
subgraph nest/nest-simulator-examples
Jupyter_notebook_pyexamples:::nest-->button
ai -..-> Jupyter_notebook_pyexamples
end


.. image:: ../../../static/img/documentation_workflow.png
:width: 500
:alt: Alternative text

.. note::
This workflow shows you how to create **user-level documentation**
Expand Down
10 changes: 7 additions & 3 deletions doc/htmldoc/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ section#kernel-attributes-nest-nestmodule dd {
*************************************************************/

.mermaid .cluster rect {
fill: #0E6A9322 !important;
fill: #47555B21 !important;
stroke: None !important;
stroke-width: None !important;
}
Expand All @@ -119,8 +119,12 @@ rect.basic.label-container {
figure, .align-default {
text-align: center;
}


.mermaid svg {
/* outline: auto; */
outline-color: #f0f0f069;
outline-width: medium;
outline-style: groove;
}


/**************************************************************************************
Expand Down

0 comments on commit 4b76446

Please sign in to comment.