From 063a0a7dcaf32389e43200853faca0e25c16c3be Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 09:40:21 +0100 Subject: [PATCH 1/9] Add github action to build docs for testing purposes Signed-off-by: Johannes Mueller --- .github/workflows/docs.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..f58eec3d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,30 @@ +name: Documentation + +on: + pull_request: + push: + branches: + - master + - develop + +jobs: + build: + runs-on: ubuntu-latest + env: + MPLBACKEND: svg + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U setuptools setuptools_scm wheel + pip install -e .[all,docs] + - name: Build docs + run: sphinx-build -Xfrozen_modules=off -b html docs _build/html From a10bd8cb6f65d6021f2ecd6ee9c1f175b45a7112 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 09:49:57 +0100 Subject: [PATCH 2/9] Tweak sphinx-build command Signed-off-by: Johannes Mueller --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 18d97111..39b63911 100644 --- a/setup.cfg +++ b/setup.cfg @@ -87,6 +87,7 @@ docs = pyvista[all,jupyter] trame<3 ipywidgets + ipython<8.17.0 # https://github.com/ipython/ipython/issues/14235 xvfbwrapper From cf5f63949b44c8bc0b3d72d8d071326a63bbc591 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 09:57:27 +0100 Subject: [PATCH 3/9] Trash -Xfrozen_modules option Signed-off-by: Johannes Mueller --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f58eec3d..96d36086 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,4 +27,4 @@ jobs: pip install -U setuptools setuptools_scm wheel pip install -e .[all,docs] - name: Build docs - run: sphinx-build -Xfrozen_modules=off -b html docs _build/html + run: sphinx-build -b html docs _build/html From 88de866ffef711d2a25bea9dca094a32fc382a3e Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 10:03:25 +0100 Subject: [PATCH 4/9] Add ipykernel to docs section Signed-off-by: Johannes Mueller --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 39b63911..61b98f61 100644 --- a/setup.cfg +++ b/setup.cfg @@ -88,6 +88,7 @@ docs = trame<3 ipywidgets ipython<8.17.0 # https://github.com/ipython/ipython/issues/14235 + ipykernel xvfbwrapper From 76a4cb8a1f444e4933ed4d2a2b90173fa7894e99 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 10:10:40 +0100 Subject: [PATCH 5/9] Add pandoc to docs deps Signed-off-by: Johannes Mueller --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index 61b98f61..29ea9e33 100644 --- a/setup.cfg +++ b/setup.cfg @@ -78,6 +78,7 @@ testing = docs = sphinx + pandoc nbsphinx nbsphinx-link sphinx_rtd_theme>=1.0 From 8ba4d210f7388746aee2d5f64504a93cb0c11ce2 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 10:12:57 +0100 Subject: [PATCH 6/9] Set PYDEVD_DISABLE_FILE_VALIDATION=1 for docs to suppress warnings Signed-off-by: Johannes Mueller --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 96d36086..483dd858 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,6 +12,7 @@ jobs: runs-on: ubuntu-latest env: MPLBACKEND: svg + PYDEVD_DISABLE_FILE_VALIDATION: 1 strategy: fail-fast: false From 2b0e81a0c33f340c3d79abc1a7b28fbafae8390c Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 10:15:05 +0100 Subject: [PATCH 7/9] Install pandoc using apt-get in docs CI Signed-off-by: Johannes Mueller --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 483dd858..800688d9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,5 +27,6 @@ jobs: python -m pip install --upgrade pip pip install -U setuptools setuptools_scm wheel pip install -e .[all,docs] + apt-get install pandoc - name: Build docs run: sphinx-build -b html docs _build/html From 7f2f84e0953476298e65fb2d39ef882e77b39800 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 10:19:47 +0100 Subject: [PATCH 8/9] Use sudo to install pandoc Signed-off-by: Johannes Mueller --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 800688d9..03be2c8f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,6 +27,6 @@ jobs: python -m pip install --upgrade pip pip install -U setuptools setuptools_scm wheel pip install -e .[all,docs] - apt-get install pandoc + sudo apt-get install pandoc - name: Build docs run: sphinx-build -b html docs _build/html From 9c16db6c24621bd84346914ee4688852421706ab Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Wed, 22 Nov 2023 10:25:36 +0100 Subject: [PATCH 9/9] Revert "Add pandoc to docs deps" This reverts commit 76a4cb8a1f444e4933ed4d2a2b90173fa7894e99. Signed-off-by: Johannes Mueller --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 29ea9e33..61b98f61 100644 --- a/setup.cfg +++ b/setup.cfg @@ -78,7 +78,6 @@ testing = docs = sphinx - pandoc nbsphinx nbsphinx-link sphinx_rtd_theme>=1.0