From f3a94aaab2f0b77bf140ee9fe1a4dcb1190da5d4 Mon Sep 17 00:00:00 2001 From: nikki everett Date: Tue, 11 Jun 2024 11:54:35 -0500 Subject: [PATCH 1/6] change diagram format and install npm package to render diagrams Signed-off-by: nikki everett --- .readthedocs.yml | 2 ++ docs/conf.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 6efd1f88cc..821642b222 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,8 +8,10 @@ build: os: "ubuntu-22.04" tools: python: "mambaforge-22.9" + nodejs: "20.14.0" jobs: post_install: + - npm install -g @mermaid-js/mermaid-cli - cat monodocs-environment.lock.yaml - conda-lock install --name $READTHEDOCS_VERSION monodocs-environment.lock.yaml - pip install ./flyteidl diff --git a/docs/conf.py b/docs/conf.py index c7c1bcd75a..b3bfaacd8f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -294,7 +294,7 @@ myst_enable_extensions = ["colon_fence"] # Sphinx-mermaid config -mermaid_output_format = "raw" +mermaid_output_format = "png" mermaid_version = "latest" mermaid_init_js = "mermaid.initialize({startOnLoad:false});" From 9dd6498010ed1294e9003407fb3e6dd51f1091b2 Mon Sep 17 00:00:00 2001 From: nikki everett Date: Tue, 11 Jun 2024 11:59:46 -0500 Subject: [PATCH 2/6] readthedocs wants a whole number Signed-off-by: nikki everett --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 821642b222..5f545c51c9 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,7 +8,7 @@ build: os: "ubuntu-22.04" tools: python: "mambaforge-22.9" - nodejs: "20.14.0" + nodejs: "20" jobs: post_install: - npm install -g @mermaid-js/mermaid-cli From 415edb4a2f4c46de9ac1fc5a5924cb69b8ec0785 Mon Sep 17 00:00:00 2001 From: nikki everett Date: Tue, 11 Jun 2024 14:54:34 -0500 Subject: [PATCH 3/6] move commands around Signed-off-by: nikki everett --- .readthedocs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5f545c51c9..e7abb8f311 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,13 +11,14 @@ build: nodejs: "20" jobs: post_install: - - npm install -g @mermaid-js/mermaid-cli - cat monodocs-environment.lock.yaml - conda-lock install --name $READTHEDOCS_VERSION monodocs-environment.lock.yaml - pip install ./flyteidl - conda info - conda env list - conda list + - npm install -g @mermaid-js/mermaid-cli + - which mmdc # Build documentation in the docs/ directory with Sphinx sphinx: From 6668ebc3f668c2417a41da652ce40fb3df63ca9f Mon Sep 17 00:00:00 2001 From: nikki everett Date: Tue, 11 Jun 2024 15:38:38 -0500 Subject: [PATCH 4/6] try setting mermaid command location Signed-off-by: nikki everett --- .readthedocs.yml | 2 +- docs/conf.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index e7abb8f311..557fc5c52c 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -18,7 +18,7 @@ build: - conda env list - conda list - npm install -g @mermaid-js/mermaid-cli - - which mmdc + - echo $MONODOCS_DEV_BUILD # Build documentation in the docs/ directory with Sphinx sphinx: diff --git a/docs/conf.py b/docs/conf.py index 284aaaa9fb..3c36f9e937 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -299,6 +299,8 @@ mermaid_output_format = "png" mermaid_version = "latest" mermaid_init_js = "mermaid.initialize({startOnLoad:false});" +if os.environ.get("MONODOCS_DEV_BUILD"): + mermaid_cmd = "/home/docs/.asdf/shims/mmdc" # Makes it so that only the command is copied, not the output copybutton_prompt_text = "$ " From 4007360432635b5a619204cbec4f21614e60ec8f Mon Sep 17 00:00:00 2001 From: nikki everett Date: Tue, 11 Jun 2024 16:23:16 -0500 Subject: [PATCH 5/6] change location of mermaid_cmd if not local build Signed-off-by: nikki everett --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 3c36f9e937..38344530c1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -299,7 +299,7 @@ mermaid_output_format = "png" mermaid_version = "latest" mermaid_init_js = "mermaid.initialize({startOnLoad:false});" -if os.environ.get("MONODOCS_DEV_BUILD"): +if not os.environ.get("MONODOCS_DEV_BUILD"): mermaid_cmd = "/home/docs/.asdf/shims/mmdc" # Makes it so that only the command is copied, not the output From 0cb167e34fbca09625def3091fe73a01d1b8cfcd Mon Sep 17 00:00:00 2001 From: nikki everett Date: Tue, 11 Jun 2024 16:51:02 -0500 Subject: [PATCH 6/6] check location of mmdc again Signed-off-by: nikki everett --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 557fc5c52c..e7abb8f311 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -18,7 +18,7 @@ build: - conda env list - conda list - npm install -g @mermaid-js/mermaid-cli - - echo $MONODOCS_DEV_BUILD + - which mmdc # Build documentation in the docs/ directory with Sphinx sphinx: