From 3f4ac2ee175c6de7eb858fce1ae450d77862edaf Mon Sep 17 00:00:00 2001 From: Jeroen Pinxten Date: Thu, 15 Feb 2024 12:25:49 +0000 Subject: [PATCH] BAC-9154: add mermaidjs support to docs Merge in BAC/icometrix-sdk from feature/mermaid-docs to master Squashed commit of the following: commit 449e263ef7c39a214eda6cfee69099564d14fed0 Merge: d2bceb7 d7c6ca8 Author: Jeroen Pinxten Date: Thu Feb 15 11:27:37 2024 +0100 Merge branch 'master' into feature/mermaid-docs # Conflicts: # docs/developer_guide/models.rst commit d2bceb77cb0d968f338c13987182d50087f84dd7 Author: Jeroen Pinxten Date: Thu Feb 15 11:26:21 2024 +0100 BAC-9154: model relation docs commit 625f3acedec41de2ad0aa78821f563f657867b5e Author: Jeroen Pinxten Date: Thu Feb 15 11:22:32 2024 +0100 BAC-9154: add mermaidJS support in DOCS --- docs/conf.py | 3 ++- docs/developer_guide/model_relations.mmd | 11 +++++++++++ docs/developer_guide/models.rst | 11 ++++++++++- docs/models/index.rst | 7 ++++--- docs/requirements.txt | 1 + 5 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 docs/developer_guide/model_relations.mmd diff --git a/docs/conf.py b/docs/conf.py index 91b35c3..66a97d3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,8 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ - "sphinx.ext.autodoc" + "sphinx.ext.autodoc", + "sphinxcontrib.mermaid" ] # sphinx.ext.autodoc options diff --git a/docs/developer_guide/model_relations.mmd b/docs/developer_guide/model_relations.mmd new file mode 100644 index 0000000..04cc509 --- /dev/null +++ b/docs/developer_guide/model_relations.mmd @@ -0,0 +1,11 @@ +erDiagram + USERS }|--|{ PROJECTS : "has access to" + PROJECTS ||--|{ PATIENTS : contains + PATIENTS ||--|{ STUDIES : contains + STUDIES ||--|{ SERIES : contains + SERIES ||--|{ DICOMS : contains + STUDIES ||--|{ PIPELINE-RESULT : has + PIPELINE-RESULTS ||--|{ CUSTOMER-RESULTS : has + PATIENTS ||--|{ PIPELINE-LONG-RESULTS : has + PIPELINE-LONG-RESULTS ||--|{ CUSTOMER-LONG-RESULTS : has + STUDIES ||--|| CUSTOMER-REPORTS : has diff --git a/docs/developer_guide/models.rst b/docs/developer_guide/models.rst index ae31b17..7d2f72e 100644 --- a/docs/developer_guide/models.rst +++ b/docs/developer_guide/models.rst @@ -20,4 +20,13 @@ Collections ----------- When fetching a collection of models from the API; you will always get a subset of that collection in combination with -some extra meta data. See: :doc:`paginators` \ No newline at end of file +<<<<<<< HEAD +some extra meta data. See: :doc:`paginators` + +Relations +--------- + +High level overview of the relations between the available entities + +.. mermaid:: model_relations.mmd + diff --git a/docs/models/index.rst b/docs/models/index.rst index 91685d3..b59cd52 100644 --- a/docs/models/index.rst +++ b/docs/models/index.rst @@ -3,9 +3,10 @@ Models .. toctree:: - customer_report - patient + user project + patient upload - user + customer_result + customer_report base diff --git a/docs/requirements.txt b/docs/requirements.txt index ee10b82..8963455 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ -r ../requirements.txt sphinx>=7.2.6 +sphinxcontrib-mermaid~=0.9.2 furo \ No newline at end of file