From 9b8eee21f81e473eb6ebd0449b3c723ab73da149 Mon Sep 17 00:00:00 2001 From: "Epanchinzeva, Alexandra" Date: Wed, 3 Apr 2024 12:34:58 +0200 Subject: [PATCH 01/24] initial commit --- .github/workflows/publish.yml | 50 +++++++++++++++++++ doc/build-doc.sh | 4 +- doc/index.html | 1 + doc/set_version.sh | 3 ++ doc/sources/_static/{style.css => custom.css} | 8 +++ doc/sources/_static/version_switcher.js | 36 +++++++++++++ doc/sources/_templates/layout.html | 5 ++ doc/sources/_templates/versions.html | 22 ++++++++ doc/sources/conf.py | 13 ++++- doc/versions.json | 11 ++++ 10 files changed, 149 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish.yml create mode 100644 doc/index.html create mode 100644 doc/set_version.sh rename doc/sources/_static/{style.css => custom.css} (89%) mode change 100755 => 100644 create mode 100644 doc/sources/_static/version_switcher.js create mode 100644 doc/sources/_templates/versions.html create mode 100644 doc/versions.json diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..d25be93c64 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,50 @@ +name: publish +'on': + push: + branches: + main + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: install dependencies + run: | + sudo apt update + sudo apt install -y pandoc git + pip3 install -r requirements-doc.txt + cd doc + source set_version.sh + echo Generating version $DOC_VERSION + - name: build docs + run: | + cd doc + source set_version.sh + chmod +x build-doc.sh + ./build-doc.sh + sphinx-build -b html sources _build/html + mv _build/html ../../$DOC_VERSION + rm -rf _build + cp versions.json ../.. + cp index.html ../.. + - name: deploy docs + run: | + cd doc + source set_version.sh + cd .. + git fetch + git checkout -- doc/build-doc.sh + git checkout gh-pages + rm -rf $DOC_VERSION + mv -f ../$DOC_VERSION . + mv ../versions.json . + mv ../index.html . + rm -rf doc + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@github.com" + git add . + git commit -m "latest HTML output" + git push -f https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages diff --git a/doc/build-doc.sh b/doc/build-doc.sh index 2037a6fcc0..6e591e37b0 100644 --- a/doc/build-doc.sh +++ b/doc/build-doc.sh @@ -28,5 +28,5 @@ cd .. cp examples/notebooks/*.ipynb doc/$SAMPLES_DIR # build the documentation -cd doc -make html +# cd doc +# make html diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000000..f8511450db --- /dev/null +++ b/doc/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/doc/set_version.sh b/doc/set_version.sh new file mode 100644 index 0000000000..a5e1bb6484 --- /dev/null +++ b/doc/set_version.sh @@ -0,0 +1,3 @@ +export DOC_VERSION=2024.3 +rm -f sources/doc_version.json +echo "{\"version\":\"$DOC_VERSION\"}" >> sources/doc_version.json \ No newline at end of file diff --git a/doc/sources/_static/style.css b/doc/sources/_static/custom.css old mode 100755 new mode 100644 similarity index 89% rename from doc/sources/_static/style.css rename to doc/sources/_static/custom.css index 1a1e4f9a57..9f70829e05 --- a/doc/sources/_static/style.css +++ b/doc/sources/_static/custom.css @@ -121,3 +121,11 @@ div.quotation { a#wap_dns {display: none;} + +button#version-switcher-button { + background-color: #2980b9; +} + +div#version-switcher-dropdown { + display: inline; +} \ No newline at end of file diff --git a/doc/sources/_static/version_switcher.js b/doc/sources/_static/version_switcher.js new file mode 100644 index 0000000000..bc817160a6 --- /dev/null +++ b/doc/sources/_static/version_switcher.js @@ -0,0 +1,36 @@ +fetch("https:///intel.github.io/scikit-learn-intelex/versions.json").then(response => response.text()).then(respText=> + load_versions(respText)); + + +function load_versions(json){ + var button = document.getElementById('version-switcher-button') + var container = document.getElementById('version-switcher-dropdown') + var loc = window.location.href; + var s = document.createElement('select'); + s.style = "border-radius:5px;" + const versions = JSON.parse(json); + for (entry of versions){ + var o = document.createElement('option'); + var optionText = ''; + if ('name' in entry){ + optionText = entry.name; + }else{ + optionText = entry.version; + } + o.value = entry.url; + if (current_version == entry.version){ + o.selected = true; + optionText = optionText; + } + o.innerHTML = optionText; + s.append(o); + } + s.addEventListener("change", (event)=> { + var current_url = new URL(window.location.href); + var path = current_url.pathname; + //strip version from path + var page_path = path.substring(project_name.length+current_version.length+3); + window.location.href = s.value + page_path; + }); + container.append(s); +} \ No newline at end of file diff --git a/doc/sources/_templates/layout.html b/doc/sources/_templates/layout.html index 3f710964db..f70ee96a92 100644 --- a/doc/sources/_templates/layout.html +++ b/doc/sources/_templates/layout.html @@ -15,3 +15,8 @@ } {% endblock %} + +{% block menu %} + {% include "versions.html" %} + {{ super() }} +{% endblock %} \ No newline at end of file diff --git a/doc/sources/_templates/versions.html b/doc/sources/_templates/versions.html new file mode 100644 index 0000000000..0e97937894 --- /dev/null +++ b/doc/sources/_templates/versions.html @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 810c6534d6..b479177313 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -31,6 +31,10 @@ # import os import sys +import json + +with open('doc_version.json') as jsonFile: + doc_version = json.load(jsonFile) sys.path.insert(0, os.path.abspath("../")) @@ -42,9 +46,9 @@ author = "Intel" # The short X.Y version -version = "2024.3.0" +version = doc_version["version"] # The full version, including alpha/beta/rc tags -release = "2024.3.0" +release = version # -- General configuration --------------------------------------------------- @@ -138,6 +142,10 @@ "titles_only": False, } +html_context = { + "current_version":version, + "project_name":"scikit-learn-intelex" +} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -147,6 +155,7 @@ def setup(app): app.add_css_file("custom.css") + app.add_js_file("version_switcher.js") # -- Options for HTMLHelp output --------------------------------------------- diff --git a/doc/versions.json b/doc/versions.json new file mode 100644 index 0000000000..eb3ff3d588 --- /dev/null +++ b/doc/versions.json @@ -0,0 +1,11 @@ +[ + { + "name": "2024.3 (latest)", + "version": "2024.3", + "url": "https:///intel.github.io/scikit-learn-intelex/2024.3/" + }, + { + "version": "2023.2", + "url": "https:///intel.github.io/scikit-learn-intelex/2023.2/" + } +] \ No newline at end of file From d7c5d7f6fdbd2cce93325ca549822ad8034e04c5 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Wed, 3 Apr 2024 15:11:46 +0200 Subject: [PATCH 02/24] Update publish.yml --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d25be93c64..843a04bb1e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,3 +48,4 @@ jobs: git add . git commit -m "latest HTML output" git push -f https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages + From 769c7f5c05da152e44499c7c3ff72e526706935c Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 17:11:25 +0200 Subject: [PATCH 03/24] Update doc/set_version.sh Co-authored-by: Nikolay Petrov --- doc/set_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/set_version.sh b/doc/set_version.sh index a5e1bb6484..5f59c7c781 100644 --- a/doc/set_version.sh +++ b/doc/set_version.sh @@ -1,3 +1,3 @@ export DOC_VERSION=2024.3 rm -f sources/doc_version.json -echo "{\"version\":\"$DOC_VERSION\"}" >> sources/doc_version.json \ No newline at end of file +echo "{\"version\":\"$DOC_VERSION\"}" >> sources/doc_version.json From bdeb75a76ccb6b1066121edfa1557e67d5ade449 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 17:11:42 +0200 Subject: [PATCH 04/24] Update doc/index.html Co-authored-by: Nikolay Petrov --- doc/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.html b/doc/index.html index f8511450db..ec14ef8346 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1 +1 @@ - \ No newline at end of file + From fe62ff4097a8e9556220a1ece5ed0714cb776c8d Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 17:11:52 +0200 Subject: [PATCH 05/24] Update doc/sources/_static/custom.css Co-authored-by: Nikolay Petrov --- doc/sources/_static/custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sources/_static/custom.css b/doc/sources/_static/custom.css index 9f70829e05..1db55bd294 100644 --- a/doc/sources/_static/custom.css +++ b/doc/sources/_static/custom.css @@ -128,4 +128,4 @@ button#version-switcher-button { div#version-switcher-dropdown { display: inline; -} \ No newline at end of file +} From cfd4aab0ac2b01e2d6238ebf6f11093cf12c8546 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 17:12:02 +0200 Subject: [PATCH 06/24] Update doc/sources/_static/version_switcher.js Co-authored-by: Nikolay Petrov --- doc/sources/_static/version_switcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sources/_static/version_switcher.js b/doc/sources/_static/version_switcher.js index bc817160a6..89b0311972 100644 --- a/doc/sources/_static/version_switcher.js +++ b/doc/sources/_static/version_switcher.js @@ -33,4 +33,4 @@ function load_versions(json){ window.location.href = s.value + page_path; }); container.append(s); -} \ No newline at end of file +} From 02678ea328d55ebfa85fe8a4ffb05d27fddb7dc5 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 17:12:12 +0200 Subject: [PATCH 07/24] Update doc/sources/_templates/layout.html Co-authored-by: Nikolay Petrov --- doc/sources/_templates/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sources/_templates/layout.html b/doc/sources/_templates/layout.html index f70ee96a92..22ed1accc6 100644 --- a/doc/sources/_templates/layout.html +++ b/doc/sources/_templates/layout.html @@ -19,4 +19,4 @@ {% block menu %} {% include "versions.html" %} {{ super() }} -{% endblock %} \ No newline at end of file +{% endblock %} From 297382960c16446c72ddf381c96601b02c7e2cd8 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 17:12:17 +0200 Subject: [PATCH 08/24] Update doc/sources/_templates/versions.html Co-authored-by: Nikolay Petrov --- doc/sources/_templates/versions.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/sources/_templates/versions.html b/doc/sources/_templates/versions.html index 0e97937894..40556b8b74 100644 --- a/doc/sources/_templates/versions.html +++ b/doc/sources/_templates/versions.html @@ -19,4 +19,5 @@ role="listbox" aria-labelledby="{{ button_id }}"> - \ No newline at end of file + + \ No newline at end of file From 4b551419cbc7a845d6bf91c050789edce9c22511 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 17:12:23 +0200 Subject: [PATCH 09/24] Update doc/versions.json Co-authored-by: Nikolay Petrov --- doc/versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/versions.json b/doc/versions.json index eb3ff3d588..9c3d6028f4 100644 --- a/doc/versions.json +++ b/doc/versions.json @@ -8,4 +8,4 @@ "version": "2023.2", "url": "https:///intel.github.io/scikit-learn-intelex/2023.2/" } -] \ No newline at end of file +] From 913ff311dcb6bff9445e5c3699813034ac54c815 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 17:48:19 +0200 Subject: [PATCH 10/24] Update doc/sources/_templates/versions.html Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> --- doc/sources/_templates/versions.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/sources/_templates/versions.html b/doc/sources/_templates/versions.html index 40556b8b74..0e97937894 100644 --- a/doc/sources/_templates/versions.html +++ b/doc/sources/_templates/versions.html @@ -19,5 +19,4 @@ role="listbox" aria-labelledby="{{ button_id }}"> - - \ No newline at end of file + \ No newline at end of file From 32925375d028019004779a23338312327d58d69a Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 18:06:58 +0200 Subject: [PATCH 11/24] Update conf.py --- doc/sources/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index b479177313..331ec7e1d7 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -30,8 +30,8 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os -import sys import json +import sys with open('doc_version.json') as jsonFile: doc_version = json.load(jsonFile) From 6af180ef459c87ba22686a8350cc305c0174c1d1 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 18:41:21 +0200 Subject: [PATCH 12/24] Update conf.py --- doc/sources/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 331ec7e1d7..ae242dbc25 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -29,8 +29,8 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import os import json +import os import sys with open('doc_version.json') as jsonFile: From f1bc63102ac6586fbfe7c510a4e28ab4d578d360 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 20:36:48 +0200 Subject: [PATCH 13/24] Update conf.py --- doc/sources/conf.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index ae242dbc25..61482572ee 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -25,15 +25,16 @@ # -- Path setup -------------------------------------------------------------- +import json + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import json import os import sys -with open('doc_version.json') as jsonFile: +with open("doc_version.json") as jsonFile: doc_version = json.load(jsonFile) sys.path.insert(0, os.path.abspath("../")) @@ -142,10 +143,7 @@ "titles_only": False, } -html_context = { - "current_version":version, - "project_name":"scikit-learn-intelex" -} +html_context = {"current_version": version, "project_name": "scikit-learn-intelex"} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, From d2c9a9d8f8d656347f26ebf0d92c3bed8b0ac9c1 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Thu, 4 Apr 2024 21:28:40 +0200 Subject: [PATCH 14/24] Update set_version.sh --- doc/set_version.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/set_version.sh b/doc/set_version.sh index 5f59c7c781..f9fce17b9d 100644 --- a/doc/set_version.sh +++ b/doc/set_version.sh @@ -1,3 +1,7 @@ -export DOC_VERSION=2024.3 +if [ -z "${DALROOT}" ]; then + export DALROOT=${PREFIX} +fi + +export DOC_VERSION=`python -c "from ..scripts.version import get_onedal_version; print(get_onedal_version(${DALROOT})" rm -f sources/doc_version.json echo "{\"version\":\"$DOC_VERSION\"}" >> sources/doc_version.json From 6f82ff0a81577c959cc2e297fa6ead410138caaf Mon Sep 17 00:00:00 2001 From: Alexandra Date: Mon, 15 Apr 2024 10:27:39 +0200 Subject: [PATCH 15/24] Update doc/set_version.sh Co-authored-by: ethanglaser <42726565+ethanglaser@users.noreply.github.com> --- doc/set_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/set_version.sh b/doc/set_version.sh index f9fce17b9d..a5d16fbe81 100644 --- a/doc/set_version.sh +++ b/doc/set_version.sh @@ -2,6 +2,6 @@ if [ -z "${DALROOT}" ]; then export DALROOT=${PREFIX} fi -export DOC_VERSION=`python -c "from ..scripts.version import get_onedal_version; print(get_onedal_version(${DALROOT})" +export DOC_VERSION=`python -c "from ..scripts.version import get_onedal_version; print(get_onedal_version(${DALROOT}))"` rm -f sources/doc_version.json echo "{\"version\":\"$DOC_VERSION\"}" >> sources/doc_version.json From 07354a55789f0dc8ffa2746bb10c45a06fb30a4e Mon Sep 17 00:00:00 2001 From: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Mon, 15 Apr 2024 11:30:13 -0700 Subject: [PATCH 16/24] Update doc/set_version.sh --- doc/set_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/set_version.sh b/doc/set_version.sh index a5d16fbe81..1d714780ab 100644 --- a/doc/set_version.sh +++ b/doc/set_version.sh @@ -2,6 +2,6 @@ if [ -z "${DALROOT}" ]; then export DALROOT=${PREFIX} fi -export DOC_VERSION=`python -c "from ..scripts.version import get_onedal_version; print(get_onedal_version(${DALROOT}))"` +export DOC_VERSION=`python -c "import sys; import os; sys.path.append(os.path.join(os.getcwd(), '..', 'scripts')); from version import get_onedal_version; print(get_onedal_version(${DALROOT}))"` rm -f sources/doc_version.json echo "{\"version\":\"$DOC_VERSION\"}" >> sources/doc_version.json From 44c559ecf3437f2455a316893e3b5853c70ffdd6 Mon Sep 17 00:00:00 2001 From: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:01:24 -0700 Subject: [PATCH 17/24] Update doc/set_version.sh --- doc/set_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/set_version.sh b/doc/set_version.sh index 1d714780ab..506bd48384 100644 --- a/doc/set_version.sh +++ b/doc/set_version.sh @@ -2,6 +2,6 @@ if [ -z "${DALROOT}" ]; then export DALROOT=${PREFIX} fi -export DOC_VERSION=`python -c "import sys; import os; sys.path.append(os.path.join(os.getcwd(), '..', 'scripts')); from version import get_onedal_version; print(get_onedal_version(${DALROOT}))"` +export DOC_VERSION=`python -c "import sys; import os; sys.path.append(os.path.join(os.getcwd(), '..', 'scripts')); from version import get_onedal_version; print(get_onedal_version('${DALROOT}'))"` rm -f sources/doc_version.json echo "{\"version\":\"$DOC_VERSION\"}" >> sources/doc_version.json From b330bc4df12c250f94312a6096297f3e184ecea4 Mon Sep 17 00:00:00 2001 From: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:20:05 -0700 Subject: [PATCH 18/24] Update doc/sources/conf.py --- doc/sources/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 61482572ee..5ecd0dd768 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -34,11 +34,11 @@ import os import sys -with open("doc_version.json") as jsonFile: - doc_version = json.load(jsonFile) - sys.path.insert(0, os.path.abspath("../")) +with open("sources/doc_version.json") as jsonFile: + doc_version = json.load(jsonFile) + # -- Project information ----------------------------------------------------- From c02fc0783f1ce93231617660f5498cdc3bd06e5e Mon Sep 17 00:00:00 2001 From: Alexandra Date: Wed, 17 Apr 2024 10:23:02 +0200 Subject: [PATCH 19/24] Update doc/sources/_templates/versions.html Co-authored-by: Nikolay Petrov --- doc/sources/_templates/versions.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/sources/_templates/versions.html b/doc/sources/_templates/versions.html index 0e97937894..40556b8b74 100644 --- a/doc/sources/_templates/versions.html +++ b/doc/sources/_templates/versions.html @@ -19,4 +19,5 @@ role="listbox" aria-labelledby="{{ button_id }}"> - \ No newline at end of file + + \ No newline at end of file From c79be5d08ad793ce6504f5c27b253d10223f6486 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Mon, 22 Apr 2024 14:27:46 +0200 Subject: [PATCH 20/24] Update set_version.sh --- doc/set_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/set_version.sh b/doc/set_version.sh index 506bd48384..6441942594 100644 --- a/doc/set_version.sh +++ b/doc/set_version.sh @@ -2,6 +2,6 @@ if [ -z "${DALROOT}" ]; then export DALROOT=${PREFIX} fi -export DOC_VERSION=`python -c "import sys; import os; sys.path.append(os.path.join(os.getcwd(), '..', 'scripts')); from version import get_onedal_version; print(get_onedal_version('${DALROOT}'))"` +export DOC_VERSION=$(python -c "import sys; import os; sys.path.append(os.path.join(os.getcwd(), '..', 'scripts')); from version import get_onedal_version; print(get_onedal_version('${DALROOT}'))") rm -f sources/doc_version.json echo "{\"version\":\"$DOC_VERSION\"}" >> sources/doc_version.json From a628e6eff64d2c26a3ea45b1aec6ec8bef1e68ae Mon Sep 17 00:00:00 2001 From: Alexandra Date: Mon, 22 Apr 2024 14:36:15 +0200 Subject: [PATCH 21/24] Update build-doc.sh --- doc/build-doc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/build-doc.sh b/doc/build-doc.sh index 6e591e37b0..ae49eb9515 100644 --- a/doc/build-doc.sh +++ b/doc/build-doc.sh @@ -27,6 +27,6 @@ mkdir $SAMPLES_DIR cd .. cp examples/notebooks/*.ipynb doc/$SAMPLES_DIR -# build the documentation +# to build the docs locally, uncomment the following lines # cd doc # make html From e331b72d97bb3af1e40083096bfab56a989b48a1 Mon Sep 17 00:00:00 2001 From: Alexandra Date: Mon, 22 Apr 2024 19:24:41 +0200 Subject: [PATCH 22/24] Update version_switcher.js --- doc/sources/_static/version_switcher.js | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/sources/_static/version_switcher.js b/doc/sources/_static/version_switcher.js index 89b0311972..5c83e2bf98 100644 --- a/doc/sources/_static/version_switcher.js +++ b/doc/sources/_static/version_switcher.js @@ -20,7 +20,6 @@ function load_versions(json){ o.value = entry.url; if (current_version == entry.version){ o.selected = true; - optionText = optionText; } o.innerHTML = optionText; s.append(o); From 2bcf4a6c933e79b306791a8e3def13add945d51e Mon Sep 17 00:00:00 2001 From: Alexandra Date: Mon, 22 Apr 2024 19:25:04 +0200 Subject: [PATCH 23/24] Update version_switcher.js --- doc/sources/_static/version_switcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sources/_static/version_switcher.js b/doc/sources/_static/version_switcher.js index 5c83e2bf98..0dfdb0a3b1 100644 --- a/doc/sources/_static/version_switcher.js +++ b/doc/sources/_static/version_switcher.js @@ -24,7 +24,7 @@ function load_versions(json){ o.innerHTML = optionText; s.append(o); } - s.addEventListener("change", (event)=> { + s.addEventListener("change", ()=> { var current_url = new URL(window.location.href); var path = current_url.pathname; //strip version from path From 01d772598d99458a3e2769d3f989ea834b13d5ac Mon Sep 17 00:00:00 2001 From: ethanglaser <42726565+ethanglaser@users.noreply.github.com> Date: Sun, 28 Apr 2024 22:17:47 -0400 Subject: [PATCH 24/24] Update doc/sources/conf.py --- doc/sources/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 5ecd0dd768..d5eae6d4bc 100755 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -36,9 +36,11 @@ sys.path.insert(0, os.path.abspath("../")) -with open("sources/doc_version.json") as jsonFile: - doc_version = json.load(jsonFile) +script_dir = os.path.dirname(os.path.abspath(__file__)) +doc_version_path = os.path.join(script_dir, "doc_version.json") +with open(doc_version_path) as jsonFile: + doc_version = json.load(jsonFile) # -- Project information -----------------------------------------------------