From 42b8fb0cbbab02a88720fd700d34cf96a491c71b Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 15 May 2023 08:49:52 +0100 Subject: [PATCH 1/4] Revert "Disable gallery execution" This reverts commit f88ec4a33166c4b4fffc0664cbdbcdc8137fcc38. --- docs/conf.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index efff247a..9986ab64 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,11 +37,9 @@ ] sphinx_gallery_conf = { - # Don't run any gallery examples, because they're not working on - # readthedocs at the moment - "filename_pattern": "a^", - # "image_scrapers": (qtgallery.qtscraper,), - # "reset_modules": (qtgallery.reset_qapp,), + "filename_pattern": ".", + "image_scrapers": (qtgallery.qtscraper,), + "reset_modules": (qtgallery.reset_qapp,), } From c7a5e4e60595650475bdac317090392163ef25ee Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 15 May 2023 08:50:28 +0100 Subject: [PATCH 2/4] Revert "Disable gallery generation" This reverts commit 27dcdc9f29b3dccbb419584f102f2ba2c7238f7e. --- docs/conf.py | 17 ++++++++--------- setup.cfg | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9986ab64..d1a90a9b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,7 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) -# import qtgallery +import qtgallery # -- Project information ----------------------------------------------------- @@ -30,7 +30,7 @@ extensions = [ "numpydoc", "sphinx_gallery.gen_gallery", - # "qtgallery", + "qtgallery", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", "sphinx.ext.intersphinx", @@ -42,13 +42,12 @@ "reset_modules": (qtgallery.reset_qapp,), } - -# qtgallery_conf = { -# "xvfb_size": (640, 480), -# "xvfb_color_depth": 24, -# "xfvb_use_xauth": False, -# "xfvb_extra_args": [], -# } +qtgallery_conf = { + "xvfb_size": (640, 480), + "xvfb_color_depth": 24, + "xfvb_use_xauth": False, + "xfvb_extra_args": [], +} numpydoc_show_class_members = False automodapi_inheritance_diagram = False diff --git a/setup.cfg b/setup.cfg index aa4769a3..1e09aca4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -50,6 +50,7 @@ docs = napari[all] numpydoc pydata-sphinx-theme + qtgallery sphinx sphinx-automodapi sphinx-gallery From a22be3038ace69efe1a4d92f0707da31ffbfba25 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 18 May 2023 14:26:34 +0100 Subject: [PATCH 3/4] Try building docs on GH actions --- .github/workflows/docs.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 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..50d37fe7 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,35 @@ +name: Build docs + +on: + pull_request: + branches: + - main + +jobs: + build-and-upload: + name: Build & Upload Artifact + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v3 + with: + python-version: "3.10" + + - uses: tlambert03/setup-qt-libs@v1 + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + python -m pip install ".[docs]" + - name: Build Docs + uses: aganders3/headless-gui@v1 + with: + run: make html + working-directory: ./docs + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: docs + path: docs/_build From e0213e72e47c891455bdaba660c511ee34fdd201 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 18 May 2023 14:33:03 +0100 Subject: [PATCH 4/4] Try commenting out xvfb config --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d1a90a9b..5a317aed 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -42,12 +42,12 @@ "reset_modules": (qtgallery.reset_qapp,), } -qtgallery_conf = { +"""qtgallery_conf = { "xvfb_size": (640, 480), "xvfb_color_depth": 24, "xfvb_use_xauth": False, "xfvb_extra_args": [], -} +}""" numpydoc_show_class_members = False automodapi_inheritance_diagram = False