From 8acb50a170da3c08a6a2dec58fb58548b5d30fb2 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 3 May 2023 14:53:53 +0100 Subject: [PATCH 01/10] Add RTD configuration --- .readthedocs.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..80cdbc7d --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,13 @@ +version: 2 + +python: + install: + - method: pip + path: . + extra_requirements: + - docs + +build: + os: ubuntu-22.04 + tools: + python: "3.10" From 57c38388e490c6eec88413d9eb1b283e9990941c Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 3 May 2023 15:09:21 +0100 Subject: [PATCH 02/10] Install qt from apt --- .readthedocs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 80cdbc7d..bbeac208 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,3 +11,5 @@ build: os: ubuntu-22.04 tools: python: "3.10" + apt_packages: + - qtbase5-dev From afc3bf8bb5b8c9e7799e6725e9bdfc584d808479 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 4 May 2023 13:59:59 +0100 Subject: [PATCH 03/10] Add napari[all] to doc deps --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index ddf3862b..111f47d6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -46,6 +46,7 @@ napari.manifest = [options.extras_require] docs = + napari[all] numpydoc pydata-sphinx-theme qtgallery From 432fb7a65145ca5fbdbb1006d1c43514efc737ad Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 4 May 2023 14:05:09 +0100 Subject: [PATCH 04/10] Install xvfb in RTD environment --- .readthedocs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index bbeac208..4e4045dd 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,3 +13,4 @@ build: python: "3.10" apt_packages: - qtbase5-dev + - xvfb From 16cf94ed0fc688ba1d49253398ca2fd5360fce3a Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 4 May 2023 14:16:48 +0100 Subject: [PATCH 05/10] Add xvfb conf to conf.py [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index a6e60fa3..6f9a21b4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -41,6 +41,13 @@ "reset_modules": (qtgallery.reset_qapp,), } +qtgallery_conf = { + "xvfb_size": (640, 480), + "xvfb_color_depth": 24, + "xfvb_use_xauth": False, + "xfvb_extra_args": [], +} + numpydoc_show_class_members = False intersphinx_mapping = { From 5c89d57dd3bbb2836f82324c259c51377b6524df Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 4 May 2023 14:26:03 +0100 Subject: [PATCH 06/10] Add qtgallery to sphinx extensions --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index 6f9a21b4..808620c7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,6 +30,7 @@ extensions = [ "numpydoc", "sphinx_gallery.gen_gallery", + "qtgallery", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", "sphinx.ext.intersphinx", From 69a17265f92f4110bb94105c97f338b300ebc37a Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 4 May 2023 14:34:09 +0100 Subject: [PATCH 07/10] Turn off inheritance diagrams --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index 808620c7..12eb0f0c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -50,6 +50,7 @@ } numpydoc_show_class_members = False +automodapi_inheritance_diagram = False intersphinx_mapping = { "napari": ("https://napari.org/", None), From f73e079110918dec43f72404c2001324dbfca011 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 4 May 2023 14:48:20 +0100 Subject: [PATCH 08/10] Don't install qt5 from apt --- .readthedocs.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4e4045dd..797cee13 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,5 +12,4 @@ build: tools: python: "3.10" apt_packages: - - qtbase5-dev - xvfb From f88ec4a33166c4b4fffc0664cbdbcdc8137fcc38 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 10 May 2023 11:10:35 +0100 Subject: [PATCH 09/10] Disable gallery execution --- docs/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 12eb0f0c..df0ac447 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,7 +37,9 @@ ] sphinx_gallery_conf = { - "filename_pattern": ".", + # 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,), } From 27dcdc9f29b3dccbb419584f102f2ba2c7238f7e Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 10 May 2023 11:16:14 +0100 Subject: [PATCH 10/10] Disable gallery generation --- docs/conf.py | 21 +++++++++++---------- setup.cfg | 1 - 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index df0ac447..6bcc09ea 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", @@ -40,16 +40,17 @@ # 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,), + # "image_scrapers": (qtgallery.qtscraper,), + # "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 111f47d6..6ddb4e6b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -49,7 +49,6 @@ docs = napari[all] numpydoc pydata-sphinx-theme - qtgallery sphinx sphinx-automodapi sphinx-gallery