Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 95c813a

Browse filesBrowse files
authored
Merge pull request #132 from melissawm/enable-gallery-melissa
Debug gallery
2 parents b2c35ff + 612fb32 commit 95c813a
Copy full SHA for 95c813a

File tree

5 files changed

+54
-19
lines changed
Filter options

5 files changed

+54
-19
lines changed

‎.github/workflows/docs.yml

Copy file name to clipboard
+35Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build docs
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-upload:
10+
name: Build & Upload Artifact
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- uses: actions/setup-python@v3
16+
with:
17+
python-version: "3.10"
18+
19+
- uses: tlambert03/setup-qt-libs@v1
20+
21+
- name: Install Dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install ".[docs]"
25+
- name: Build Docs
26+
uses: aganders3/headless-gui@v1
27+
with:
28+
run: make html
29+
working-directory: ./docs
30+
31+
- name: Upload artifact
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: docs
35+
path: docs/_build

‎docs/changelog.rst

Copy file name to clipboardExpand all lines: docs/changelog.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Changelog
66

77
New features
88
~~~~~~~~~~~~
9-
- Added `MPLWidget` as a widget containing just a Matplotlib canvas
9+
- Added ``MPLWidget`` as a widget containing just a Matplotlib canvas
1010
without any association with a napari viewer.
1111

1212
Visual improvements
@@ -24,7 +24,7 @@ Changes
2424
- Labels plotting with the features scatter widget no longer have underscores
2525
replaced with spaces.
2626
- ``NapariMPLWidget.update_layers()`` has been removed as it is intended to be
27-
private API. Use `NapariMPLWidget.on_update_layers` instead to implement
27+
private API. Use ``NapariMPLWidget.on_update_layers`` instead to implement
2828
funcitonality when layer selection is changed.
2929

3030
Bug fixes

‎docs/conf.py

Copy file name to clipboardExpand all lines: docs/conf.py
+14-15Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# import os
1414
# import sys
1515
# sys.path.insert(0, os.path.abspath('.'))
16-
# import qtgallery
16+
import qtgallery
1717

1818
# -- Project information -----------------------------------------------------
1919

@@ -30,27 +30,23 @@
3030
extensions = [
3131
"numpydoc",
3232
"sphinx_gallery.gen_gallery",
33-
# "qtgallery",
3433
"sphinx_automodapi.automodapi",
3534
"sphinx_automodapi.smart_resolver",
3635
"sphinx.ext.intersphinx",
3736
]
3837

3938
sphinx_gallery_conf = {
40-
# Don't run any gallery examples, because they're not working on
41-
# readthedocs at the moment
42-
"filename_pattern": "a^",
43-
# "image_scrapers": (qtgallery.qtscraper,),
44-
# "reset_modules": (qtgallery.reset_qapp,),
39+
"filename_pattern": ".",
40+
"image_scrapers": (qtgallery.qtscraper,),
41+
"reset_modules": (qtgallery.reset_qapp,),
4542
}
4643

47-
48-
# qtgallery_conf = {
49-
# "xvfb_size": (640, 480),
50-
# "xvfb_color_depth": 24,
51-
# "xfvb_use_xauth": False,
52-
# "xfvb_extra_args": [],
53-
# }
44+
qtgallery_conf = {
45+
"xvfb_size": (640, 480),
46+
"xvfb_color_depth": 24,
47+
"xfvb_use_xauth": False,
48+
"xfvb_extra_args": [],
49+
}
5450

5551
numpydoc_show_class_members = False
5652
automodapi_inheritance_diagram = False
@@ -66,7 +62,10 @@
6662
nitpicky = True
6763
# Can't work out how to link this properley using intersphinx and the PyQT6 docs.
6864
# TODO: fix at some point
69-
nitpick_ignore = [("py:class", "PyQt6.QtWidgets.QWidget")]
65+
nitpick_ignore = [
66+
("py:class", "PyQt6.QtWidgets.QWidget"),
67+
("py:class", "PyQt5.QtWidgets.QWidget"),
68+
]
7069

7170
# Add any paths that contain templates here, relative to this directory.
7271
templates_path = ["_templates"]

‎setup.cfg

Copy file name to clipboardExpand all lines: setup.cfg
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ docs =
5050
napari[all]
5151
numpydoc
5252
pydata-sphinx-theme
53+
qtgallery
5354
sphinx
5455
sphinx-automodapi
5556
sphinx-gallery

‎src/napari_matplotlib/base.py

Copy file name to clipboardExpand all lines: src/napari_matplotlib/base.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ class NapariMPLWidget(MPLWidget):
103103
"""
104104
Widget containing a Matplotlib canvas and toolbar.
105105
106-
In addition to `BaseNapariMPLWidget`, this class handles callbacks
106+
In addition to ``BaseNapariMPLWidget``, this class handles callbacks
107107
to automatically update figures when the layer selection or z-step
108108
is changed in the napari viewer. To take advantage of this sub-classes
109109
should implement the ``clear()`` and ``draw()`` methods.
110110
111-
When both the z-step and layer selection is changed, ``clear()`` is called
111+
When both the z-step and layer selection is changed, ``clear()`` is called
112112
and if the number a type of selected layers are valid for the widget
113113
``draw()`` is then called. When layer selection is changed ``on_update_layers()``
114114
is also called, which can be useful e.g. for updating a layer list in a

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.