Skip to content

Commit

Permalink
Merge pull request #2 from astrofrog/fix-docs-warnings
Browse files Browse the repository at this point in the history
Fix documentation warnings
  • Loading branch information
astrofrog committed Aug 15, 2023
2 parents 8d27fd5 + fa55ff4 commit f0eef78
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 31 deletions.
6 changes: 3 additions & 3 deletions doc/customizing_guide/custom_viewer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ setting of each widget is available to the plotting functions:
* ``bins`` is set to an integer
* ``hitrate`` is set to a boolean
* ``color`` is set to ``'Reds'`` or ``'Purples'``
* ``x``, ``y``, and ``hit`` are passed as :class:`~glue.viewers.custom.qt.custom_viewer.AttributeWithInfo` objects (which are just numpy arrays with a special ``id`` attribute, useful when performing selection below).
* ``x``, ``y``, and ``hit`` are passed as :class:`~glue_qt.viewers.custom.custom_viewer.AttributeWithInfo` objects (which are just numpy arrays with a special ``id`` attribute, useful when performing selection below).

The plotting functions can use these variables to draw the appropriate
plots -- in particular, the ``show_hexbin`` function chooses
Expand All @@ -180,7 +180,7 @@ Viewer Subclasses
-----------------
The shot chart example used decorators to define custom plot functions.
However, if your used to writing classes you can also subclass
:class:`~glue.viewers.custom.qt.custom_viewer.CustomViewer` directly. The code is largely the
:class:`~glue_qt.viewers.custom.custom_viewer.CustomViewer` directly. The code is largely the
same:

.. literalinclude:: scripts/bball_viewer_class.py
Expand Down Expand Up @@ -211,7 +211,7 @@ UI Elements

Simple user interfaces are created by specifying keywords to
:func:`~glue.custom_viewer` or class-level variables to
:class:`~glue.viewers.custom.qt.custom_viewer.CustomViewer` subclasses. The type of
:class:`~glue_qt.viewers.custom.custom_viewer.CustomViewer` subclasses. The type of
widget, and the value passed to plot functions, depends on the value
assigned to each variable. See :func:`~glue.custom_viewer` for
information.
Expand Down
10 changes: 5 additions & 5 deletions doc/customizing_guide/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,6 @@ provides more information about what the registry is and how it can be used.
=========================== =========================================================
Registry name Registry class
=========================== =========================================================
``qt_client`` :class:`glue.config.QtClientRegistry`
``qt_fixed_layout_tab`` :class:`glue.config.QtFixedLayoutTabRegistry`
``viewer_tool`` :class:`glue.config.ViewerToolRegistry`
``data_factory`` :class:`glue.config.DataFactoryRegistry`
``data_exporter`` :class:`glue.config.DataExporterRegistry`
Expand All @@ -584,14 +582,16 @@ Registry name Registry class
``colormaps`` :class:`glue.config.ColormapRegistry`
``exporters`` :class:`glue.config.ExporterRegistry`
``settings`` :class:`glue.config.SettingRegistry`
``preference_panes`` :class:`glue.config.PreferencePanesRegistry`
``fit_plugin`` :class:`glue.config.ProfileFitterRegistry`
``layer_action`` :class:`glue.config.LayerActionRegistry`
``startup_action`` :class:`glue.config.StartupActionRegistry`
``autolinker`` :class:`glue.config.AutoLinkerRegistry`
``data_translator`` :class:`glue.config.DataTranslatorRegistry`
``subset_state_translator`` :class:`glue.config.SubsetDefinitionTranslatorRegistry`
``session_patch`` :class:`glue.config.SessionPatchRegistry`
``qt_client`` :class:`glue_qt.config.QtClientRegistry`
``qt_fixed_layout_tab`` :class:`glue_qt.config.QtFixedLayoutTabRegistry`
``preference_panes`` :class:`glue_qt.config.PreferencePanesRegistry`
``layer_action`` :class:`glue_qt.config.LayerActionRegistry`
``startup_action`` :class:`glue_qt.config.StartupActionRegistry`
=========================== =========================================================

.. _lazy_load_plugin:
Expand Down
4 changes: 2 additions & 2 deletions doc/customizing_guide/full_custom_qt_viewer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Now let's say we want to use this widget in glue, without having to change
anything in ``MyWidget``. The best way to do this is to create a new class,
``MyGlueWidget``, that will wrap around ``MyWidget`` and make it
glue-compatible. The glue widget should inherit from
:class:`~glue.viewers.common.qt.data_viewer.DataViewer` (this class does a few
:class:`~glue_qt.viewers.common.data_viewer.DataViewer` (this class does a few
boilerplate things such as, for example, adding the ability to drag and drop
data onto your data viewer). The simplest glue widget wrapper that you can write
that will show ``MyWidget`` is::
Expand Down Expand Up @@ -167,7 +167,7 @@ client that can listen to specific messages from the hub::
Using layers
------------

By default, any sub-class of `~glue.viewers.common.qt.data_viewer` will
By default, any sub-class of `~glue_qt.viewers.common.data_viewer` will
also include a list of layers in the central panel in the dashboard. Layers can
be thought of as specific components of visualizations - for example, in a
scatter plot, the main dataset will be a layer, while each individual subset
Expand Down
4 changes: 2 additions & 2 deletions doc/customizing_guide/matplotlib_qt_viewer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ property for this to work.
Data viewer
-----------

The :class:`~glue.viewers.matplotlib.qt.data_viewer.MatplotlibDataViewer` class
The :class:`~glue_qt.viewers.matplotlib.data_viewer.MatplotlibDataViewer` class
adds functionality on top of the base
:class:`~glue.viewers.common.qt.data_viewer.DataViewer`
:class:`~glue_qt.viewers.common.data_viewer.DataViewer`
class:

* It automatically sets up the Matplotlib axes
Expand Down
6 changes: 3 additions & 3 deletions doc/customizing_guide/qt_viewer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ this to create a widget to control the viewer state::

from echo.qt import autoconnect_callbacks_to_qt
from qtpy.QtWidgets import QWidget
from glue.utils.qt import load_ui
from glue_qt.utils import load_ui

class TutorialViewerStateWidget(QWidget):

Expand All @@ -93,11 +93,11 @@ Data viewer

In the case of Qt, defining a data viewer is similar to the general case
described in :ref:`state-viewer` but this time we need to use the
``DataViewer`` class from ``glue.viewers.common.qt.data_viewer`` and define
``DataViewer`` class from ``glue_qt.viewers.common.data_viewer`` and define
two additional attributes to point to the widgets that control the viewer
and layer state::

from glue.viewers.common.qt.data_viewer import DataViewer
from glue_qt.viewers.common.data_viewer import DataViewer

class TutorialDataViewer(DataViewer):

Expand Down
10 changes: 5 additions & 5 deletions doc/customizing_guide/toolbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ Including toolbars in custom viewers
When defining a data viewer (as described in :ref:`state-qt-viewer`), it
is straightforward to add a toolbar that can then be used to add tools. To do
this, when defining your
:class:`~glue.viewers.common.qt.data_viewer.DataViewer` subclass,
:class:`~glue_qt.viewers.common.data_viewer.DataViewer` subclass,
you should also specify the ``_toolbar_cls`` and ``tools`` class-level
attributes, which should give the class to use for the toolbar, and the default
tools that should be present in the toolbar:

.. code:: python
from glue.viewers.common.qt.data_viewer import DataViewer
from glue.viewers.common.qt.toolbar import BasicToolbar
from glue_qt.viewers.common.data_viewer import DataViewer
from glue_qt.viewers.common.toolbar import BasicToolbar
class MyViewer(DataViewer):
Expand Down Expand Up @@ -230,6 +230,6 @@ Tool ID Class
``'select:rectangle'`` :class:`~glue.viewers.matplotlib.toolbar_mode.RectangleMode`
``'select:xrange'`` :class:`~glue.viewers.matplotlib.toolbar_mode.HRangeMode`
``'select:yange'`` :class:`~glue.viewers.matplotlib.toolbar_mode.VRangeMode`
``'image:colormap'`` :class:`~glue.viewers.matplotlib.qt.toolbar_mode.ColormapMode`
``'image:contrast'`` :class:`~glue.viewers.matplotlib.qt.toolbar_mode.ContrastMode`
``'image:colormap'`` :class:`~glue_qt.viewers.matplotlib.toolbar_mode.ColormapMode`
``'image:contrast'`` :class:`~glue_qt.viewers.matplotlib.toolbar_mode.ContrastMode`
====================== ========================================================
6 changes: 6 additions & 0 deletions doc/developer_guide/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ Utilities

.. automodapi:: glue_qt.utils.widget_properties
:no-inheritance-diagram:

Configuration
=============

.. automodapi:: glue_qt.config
:no-inheritance-diagram:
4 changes: 2 additions & 2 deletions doc/developer_guide/organization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ utilities that do not depend on any other parts of Glue. These utilities don't
know about Glue data objects, subsets, or specific data viewers. Instead, this
sub-package includes utilities such as :func:`~glue.utils.geometry.points_inside_poly`,
a function to find whether points are inside a polygon, or
:func:`~glue.utils.qt.cmap2pixmap`, a function to convert a Matplotlib colormap
:func:`~glue_qt.utils.cmap2pixmap`, a function to convert a Matplotlib colormap
into a Qt ``QPixmap`` instance. This is one of the easiest sub-packages to
approach -- it is just a collection of small helper functions and classes and
doesn't require understanding any other parts of Glue.
Expand All @@ -55,7 +55,7 @@ as the scatter plot and image viewers. Each viewer is contained in a
sub-package of :mod:`!glue.viewers`, such as :mod:`!glue.viewers.scatter`. A
:mod:`!glue.viewers.common` sub-package is also provided, with utilities and
base classes that might be useful for various viewers. For instance, the
:mod:`!glue.viewers.common.qt.toolbar_mode` sub-module contains code related to
:mod:`!glue_qt.viewers.common.toolbar_mode` sub-module contains code related to
defining toolbar mouse 'modes' for selection.

:mod:`!glue.dialogs`
Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In order to make sure that everything works as expected, and that we don't
introduce any regressions when making changes, Glue includes a number of tests.
All tests are contained inside the ``tests/`` directories in each sub-package
of Glue. For example, the tests for the ``glue.core`` functionality are in
``glue/core/tests``. The tests for the ``glue.utils.qt`` functionality are in
``glue/core/tests``. The tests for the ``glue_qt.utils`` functionality are in
``glue/utils/qt/tests``. Tests should always live close to the code they are
testing.

Expand Down
2 changes: 1 addition & 1 deletion doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ requires running the following magic function::
%gui qt

And then starting glue (probably by calling :ref:`qglue <qglue>` or creating an
instance of :class:`~glue.app.qt.application.GlueApplication`) from the
instance of :class:`~glue_qt.app.application.GlueApplication`) from the
notebook.

If you encounter an error like this::
Expand Down
4 changes: 2 additions & 2 deletions doc/installation/pip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Installing with pip

**Platforms:** MacOS X, Linux, and Windows

You can install glue along with **all** :ref:`required and optional dependencies
<glue-deps>` with `pip <https://pip.pypa.io/en/stable/>`__ using::
You can install glue along with **all** required and optional dependencies
with `pip <https://pip.pypa.io/en/stable/>`__ using::

pip install glueviz[all,qt]

Expand Down
8 changes: 4 additions & 4 deletions doc/python_guide/data_viewer_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ Viewer Viewer state Data layer state Subset lay
|profile_viewer| |profile_viewer_state| |profile_layer_state| |profile_layer_state|
=================== ========================= ======================= ========================

.. |scatter_viewer| replace:: :class:`~glue.viewers.scatter.qt.ScatterViewer`
.. |scatter_viewer| replace:: :class:`~glue_qt.viewers.scatter.ScatterViewer`
.. |scatter_viewer_state| replace:: :class:`~glue.viewers.scatter.state.ScatterViewerState`
.. |scatter_layer_state| replace:: :class:`~glue.viewers.scatter.state.ScatterLayerState`

.. |image_viewer| replace:: :class:`~glue.viewers.image.qt.ImageViewer`
.. |image_viewer| replace:: :class:`~glue_qt.viewers.image.ImageViewer`
.. |image_viewer_state| replace:: :class:`~glue.viewers.image.state.ImageViewerState`
.. |image_data_state| replace:: :class:`~glue.viewers.image.state.ImageLayerState`
.. |image_subset_state| replace:: :class:`~glue.viewers.image.state.ImageSubsetLayerState`

.. |histogram_viewer| replace:: :class:`~glue.viewers.histogram.qt.HistogramViewer`
.. |histogram_viewer| replace:: :class:`~glue_qt.viewers.histogram.HistogramViewer`
.. |histogram_viewer_state| replace:: :class:`~glue.viewers.histogram.state.HistogramViewerState`
.. |histogram_layer_state| replace:: :class:`~glue.viewers.histogram.state.HistogramLayerState`

.. |profile_viewer| replace:: :class:`~glue.viewers.profile.qt.ProfileViewer`
.. |profile_viewer| replace:: :class:`~glue_qt.viewers.profile.ProfileViewer`
.. |profile_viewer_state| replace:: :class:`~glue.viewers.profile.state.ProfileViewerState`
.. |profile_layer_state| replace:: :class:`~glue.viewers.profile.state.ProfileLayerState`

Expand Down
2 changes: 1 addition & 1 deletion doc/python_guide/ipython_terminal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ available by default (these are also listed when you open the terminal):
* ``hub`` is the main communication hub.

* ``application`` is the top level
:class:`~glue.app.qt.application.GlueApplication`, which has access to plot
:class:`~glue_qt.app.application.GlueApplication`, which has access to plot
windows (among other things)

Additionally, you can drag datasets and subsets into the terminal window, to
Expand Down

0 comments on commit f0eef78

Please sign in to comment.