Skip to content

Add doc hosting on readthedocs #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

python:
install:
- method: pip
path: .
extra_requirements:
- docs

build:
os: ubuntu-22.04
tools:
python: "3.10"
apt_packages:
- xvfb
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

20 changes: 16 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import qtgallery
# import qtgallery

# -- Project information -----------------------------------------------------

Expand All @@ -30,18 +30,30 @@
extensions = [
"numpydoc",
"sphinx_gallery.gen_gallery",
# "qtgallery",
"sphinx_automodapi.automodapi",
"sphinx_automodapi.smart_resolver",
"sphinx.ext.intersphinx",
]

sphinx_gallery_conf = {
"filename_pattern": ".",
"image_scrapers": (qtgallery.qtscraper,),
"reset_modules": (qtgallery.reset_qapp,),
# Don't run any gallery examples, because they're not working on
# readthedocs at the moment
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭 But it was so nice.

What was the problem? I assume it's not a problem of xfvb on rtd?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, but xvfb just kept crashing. Might be due to some leaking/non-closed widgets, but the error message wasn't helpful enough to make a more educated guess.

Copy link
Collaborator

@samcunliffe samcunliffe May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we would need sudo access to a headless 18.04 VM to try it ourselves?

"filename_pattern": "a^",
# "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": [],
# }

numpydoc_show_class_members = False
automodapi_inheritance_diagram = False

intersphinx_mapping = {
"napari": ("https://napari.org/", None),
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ napari.manifest =

[options.extras_require]
docs =
napari[all]
numpydoc
pydata-sphinx-theme
qtgallery
sphinx
sphinx-automodapi
sphinx-gallery
Expand Down