Skip to content

Commit

Permalink
Merge pull request #1425 from astrofrog/misc-bug-fixes
Browse files Browse the repository at this point in the history
Miscellaneous bug fixes
  • Loading branch information
astrofrog authored Oct 16, 2017
2 parents 534b39f + 7ad3719 commit 5d87e4a
Show file tree
Hide file tree
Showing 50 changed files with 342 additions and 163 deletions.
35 changes: 14 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ env:
- PYTHON_VERSION=3.6
global:
# We add astropy-ci-extras to have the latest version of Astropy with older Numpy versions.
- CONDA_CHANNELS=astropy-ci-extras
- MATPLOTLIB_VERSION=1.5
- NUMPY_VERSION=1.11
- ASTROPY_VERSION=1.3
- IPYTHON_VERSION=5
- CONDA_CHANNELS="astropy-ci-extras astropy"
- PYTEST_ARGS="--cov glue -vs"
- ASTROPY_VERSION=stable
- NUMPY_VERSION=stable
- NO_CFG_FILES=false
- QT_PKG=pyqt5
- SETUP_XVFB=True
- SPHINX_VERSION=1.5
- CONDA_DEPENDENCIES="pip dill ipython matplotlib scipy cython h5py pygments pyzmq scikit-image pandas sphinx xlrd pillow pytest mock coverage pyyaml sphinx_rtd_theme qtpy traitlets ipykernel qtconsole"
- PIP_DEPENDENCIES="pytest-cov coveralls pyavm astrodendro awscli plotly spectral-cube"
- CONDA_DEPENDENCIES="pip dill ipython matplotlib scipy cython h5py pygments pyzmq scikit-image pandas sphinx xlrd pillow pytest mock coverage pyyaml sphinx_rtd_theme qtpy traitlets ipykernel qtconsole spectral-cube pytest-cov"
- PIP_DEPENDENCIES="coveralls pyavm astrodendro awscli plotly"
- PIP_FALLBACK=false
- REMOVE_INSTALL_REQUIRES=0
- secure: NvQVc3XmmjXNVKrmaD31IgltsOImlnt3frAl4wU0pM223iejr7V57hz/V5Isx6sTANWEiRBMG27v2T8e5IiB7DQTxFUleZk3DWXQV1grw/GarEGUawXAgwDWpF0AE/7BRVJYqo2Elgaqf28+Jkun8ewvfPCiEROD2jWEpnZj+IQ=
- secure: "SU9BYH8d9eNigypG3lC83s0NY6Mq9AHGKXyEGeXDtz1npJIC1KHdzPMP1v1K3dzCgl1p6ReMXPjZMCENyfNkad/xvzTzGk0Nu/4BjihrUPV6+ratVeLpv0JLm8ikh8q+sZURkdtzUOlds+Hfn5ku4LdpT87tcKHY9TINAGA34ZM="
Expand Down Expand Up @@ -64,20 +62,14 @@ matrix:
PIP_DEPENDENCIES="pytest-cov coveralls"
REMOVE_INSTALL_REQUIRES=1

# We need to keep the following on 2.7 because of linkchecker
- os: linux
env: PYTHON_VERSION=2.7
env: PYTHON_VERSION=3.6
DOC_TRIGGER=1
APP_TRIGGER=1
PYTEST_ARGS="--cov glue --no-optional-skip"
NO_CFG_FILES=true

# Test with older package versions:

- os: linux
env: PYTHON_VERSION=2.7
QT_PKG=pyqt

- os: linux
env: PYTHON_VERSION=2.7
MATPLOTLIB_VERSION=1.4
Expand Down Expand Up @@ -125,9 +117,7 @@ before_install:
- if [[ $QT_PKG == pyqt5 ]]; then export CONDA_DEPENDENCIES="pyqt=5 "$CONDA_DEPENDENCIES; fi

# Documentation dependencies
# Note that we need to specify requests 2.9 because of a bug in the version check in linkchecker,
# and we can't use conda since requests 2.9 won't exist for e.g. Python 3.6
- if [ $DOC_TRIGGER ]; then export PIP_DEPENDENCIES="sphinx-automodapi numpydoc linkchecker requests==2.9 "$PIP_DEPENDENCIES; fi
- if [ $DOC_TRIGGER ]; then export PIP_DEPENDENCIES="sphinx-automodapi numpydoc requests "$PIP_DEPENDENCIES; fi

# Install ci-helpers and set up conda
- git clone git://github.com/astropy/ci-helpers.git
Expand Down Expand Up @@ -204,16 +194,19 @@ script:

- if [[ $QT_PKG == False ]]; then glue --version; fi

- python setup.py test -a "$PYTEST_ARGS";
- python setup.py test -a "$PYTEST_ARGS"

# In the following, we use separate if statements for each line, to make
# sure the exit code from each one is taken into account for the overall
# exit code.
- if [ $DOC_TRIGGER ]; then cd doc; make html 2> warnings.log; cd ..; fi
- if [ $DOC_TRIGGER ]; then cd doc; make html linkcheck 2> warnings.log; cd ..; fi
- if [ $DOC_TRIGGER ]; then cat doc/warnings.log; fi
# make sure stderr was empty, i.e. no warnings
- if [ $DOC_TRIGGER ]; then test ! -s doc/warnings.log; fi
- if [ $DOC_TRIGGER ]; then linkchecker --ignore-url=".*fontawesome.*" doc/_build/html; fi

# Check for any broken links, ignore 'redirected with Found'
- if [ $DOC_TRIGGER ]; then grep -v "redirected with Found" doc/_build/linkcheck/output.txt > doc/_build/linkcheck/output_no_found_redirect.txt; fi
- if [ $DOC_TRIGGER ]; then test ! -s doc/_build/linkcheck/output_no_found_redirect.txt; fi

after_success:

Expand Down
23 changes: 23 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ v0.11.2 (unreleased)
* Fixed bug in spectrum tool that caused the upper range in aggregations
to be incorrectly calculated. [#1402]

* Fixed icon for scatter plot layer when a colormap is used, and fix issues with
viewer layer icons not updating immediately. [#1425]

* Fixed dragging and dropping session files onto glue (this now loads the session
rather than trying to load it as a dataset). Also now show a warning when
the application is about to be reset to open a new session. [#1425]

* Make sure no errors happen if making a selection in an empty viewer. [#1425]

* Fix creating faceted subsets on Python 3.x when no dataset is selected. [#1425]

* Fix issues with overlaying a scatter layer on an image. [#1425]

* Fix issues with labels for categorical axes in the scatter and histogram
viewers, in particular when loading viewers with categorical axes from
session files. [#1425]

* Make sure a GUI error message is shown when adding non-1-dimensional data
to a table viewer. [#1425]

* Fix issues when trying to launch glue multiple times from a Jupyter session.
[#1425]

v0.11.1 (2017-08-25)
--------------------

Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ environment:
# to the matrix section.
CONDA_DEPENDENCIES: "astropy scipy cython pyqt matplotlib h5py pygments pyzmq scikit-image pandas xlrd pillow pytest mock coverage ipython ipykernel qtconsole traitlets qtpy"
PIP_DEPENDENCIES: "plotly"
PIP_FALLBACK: "False"

matrix:
- PYTHON_VERSION: "2.7"
Expand Down
2 changes: 1 addition & 1 deletion doc/customizing_guide/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ specify custom translation functions. Here's how:
.. literalinclude:: scripts/config_link_example.py

Some remarks about this code:
#. ``link_function`` is used as a `decorator <http://stackoverflow.com/questions/739654/understanding-python-decorators/1594484#1594484>`_. The decorator adds the function to Glue's list of link functions
#. ``link_function`` is used as a `decorator <https://stackoverflow.com/a/1594484/180783>`_. The decorator adds the function to Glue's list of link functions
#. We provide a short summary of the function in the ``info`` keyword, and a list of ``output_labels``. Usually, only one quantity is returned, so ``output_labels`` has one element.
#. Glue will always pass numpy arrays as inputs to a link function, and expects a numpy array (or a tuple of numpy arrays) as output

Expand Down
2 changes: 1 addition & 1 deletion doc/developer_guide/coding_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Coding guidelines
Glue is written entirely in Python, and we abide by the following guidelines:

* All code should be Python 2 and 3-compatible. We do this by using the `six
<https://pythonhosted.org/six/>`_ package, which we bundle in
<https://pypi.python.org/pypi/six>`_ package, which we bundle in
``glue.external.six``.

* We follow many of the same guidelines as the `Astropy <http://www.astropy.org>`_ project, which you can find `here <http://docs.astropy.org/en/stable/development/codeguide.html#coding-style-conventions>`__.
Expand Down
6 changes: 3 additions & 3 deletions doc/developer_guide/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ Continuous integration

Every time someone opens a pull request to the Glue repository, and every time
we merge changes into the code base, all the tests are run on `Travis
<http://travis-ci.org>`_ and `AppVeyor <http://www.appveyor.com/>`_. This is
<https://travis-ci.org>`_ and `AppVeyor <https://www.appveyor.com/>`_. This is
referred to as *Continuous Integration*. One of the nice things about continuous integration is that it allows us to
automatically run the tests for different operating systems, Python versions,
versions of Numpy, and Qt frameworks (PyQt4, PyQt5, and PySide).

`Travis <http://travis-ci.org>`_ runs tests on Linux and MacOS X, and `AppVeyor
<http://www.appveyor.com/>`_ runs the tests on Windows. When you open a pull
`Travis <https://travis-ci.org>`_ runs tests on Linux and MacOS X, and `AppVeyor
<https://www.appveyor.com/>`_ runs the tests on Windows. When you open a pull
request, you will be able to check the status of the tests at the bottom, which
will look something like this:

Expand Down
2 changes: 1 addition & 1 deletion doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Something is broken, or confusing. What should I do?
----------------------------------------------------

If you think you've found a bug in Glue, feel free to add an issue to the
`GitHub issues page <https://github.com/glue-viz/glue/issues?state=open>`_. If
`GitHub issues page <https://github.com/glue-viz/glue/issues?q=is%3Aopen>`_. If
you have general questions, feel free to post a message to the `Glue mailing
list <https://groups.google.com/forum/#!forum/glue-viz>`_, or send us an `email
<mailto:glue.viz@gmail.com>`_ directly.
Expand Down
2 changes: 1 addition & 1 deletion doc/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ There are multiple ways to open data:
Find and open the file ``w5.fits`` which should be in the ``w5.tgz`` or
``w5.zip`` archive you downloaded above. This is a `WISE image
<http://wise.ssl.berkeley.edu/>`_ of the `W5 Star Forming Region
<http://en.wikipedia.org/wiki/Soul_Nebula>`_. While this is an astronomical
<https://en.wikipedia.org/wiki/Soul_Nebula>`_. While this is an astronomical
dataset, glue can be used for data in any discipline, and many of the concepts
shown below are applicable to many types of dataset.

Expand Down
8 changes: 4 additions & 4 deletions doc/gui_guide/3d_viewers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
3D viewers in Glue
==================

A plugin with 3D viewers for glue, powered by `VisPy <http://www.vispy.org>`_,
A plugin with 3D viewers for glue, powered by `VisPy <http://vispy.org/>`_,
is available. Provided that you installed glue with ``conda`` or with ``pip``,
you should already have the 3D viewers available. You can check this by going to
the **Canvas** menu in glue and selecting **New Data Viewer**, or alternatively
Expand All @@ -15,7 +15,7 @@ installed, you should see the 3D viewers in the list:
:width: 339

If you don't see these in the list, then if you are using
`Anaconda <https://www.continuum.io/downloads>`_ to manage your Python
`Anaconda <https://www.anaconda.com/download/>`_ to manage your Python
distribution, you can install the 3D viewers plugin using::

pip install glue-vispy-viewers
Expand Down Expand Up @@ -97,13 +97,13 @@ experimental and currently very slow for displaying isosurfaces. In addition, it
is only able to show a single isosurface level. We do not recommend using it at
this time, and have disabled it by default. If you are interested in trying it
out, see the `README.md
<https://github.com/glue-viz/glue-vispy-viewers/blob/master/README.md>`_ file in
<https://github.com/glue-viz/glue-vispy-viewers/blob/master/README.rst>`_ file in
the glue-vispy-viewers repository.

Reporting issues
----------------

Please report any issues with the 3D viewers in the following `issue tracker
<https://github.com/glue-viz/glue-3d-viewer/issues>`_. Please first check that
<https://github.com/glue-viz/glue-vispy-viewers/issues>`_. Please first check that
there is not already a similar issue open -- if there is, please feel free to
comment on that issue to let us know you ran into that problem too!
4 changes: 2 additions & 2 deletions doc/gui_guide/spectrum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ parameter names. Each value is itself a dictionary with 4 entries:
Astropy-based models
^^^^^^^^^^^^^^^^^^^^

The :class:`~glue.core.fitters.AstropyFitter1D` base class can be subclassed to plug custom `astropy models and fitters <http://astropy.readthedocs.org/en/latest/modeling/>`_ into Glue. This is very easy::
The :class:`~glue.core.fitters.AstropyFitter1D` base class can be subclassed to plug custom `astropy models and fitters <http://astropy.readthedocs.io/en/stable/modeling/>`_ into Glue. This is very easy::

from astropy.modeling import models, fitting

Expand Down Expand Up @@ -181,4 +181,4 @@ of these ideas.

.. figure:: images/emcee_screenshot.png
:align: center
:width: 400
:width: 400
2 changes: 1 addition & 1 deletion doc/installation/conda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Anaconda Python Distribution (Recommended)

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

We recommend using the `Anaconda <http://continuum.io/downloads.html>`__ Python
We recommend using the `Anaconda <https://www.anaconda.com/download/>`__ Python
distribution from Continuum Analytics (or the related Miniconda distribution).
Anaconda includes all of Glue's main dependencies. There are two ways of
installing Glue with the Anaconda Python Distribution: :ref:`graphically using the
Expand Down
10 changes: 5 additions & 5 deletions doc/installation/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ Glue has the following required dependencies:

* Python 2.7, or 3.3 and higher
* `Numpy <http://www.numpy.org>`_ 1.9 or later
* `Matplotlib <http://www.matplotlib.org>`_ 1.4 or later
* `Matplotlib <http://matplotlib.org/>`_ 1.4 or later
* `Pandas <http://pandas.pydata.org/>`_ 0.14 or later
* `Astropy <http://www.astropy.org>`_ 1.0 or higher
* `setuptools <http://setuptools.readthedocs.io/en/latest/>`_ 1.0 or later
* Either `PySide <http://pyside.org>`__ or `PyQt
* Either `PySide <https://wiki.qt.io/PySide>`__ or `PyQt
<https://riverbankcomputing.com/software/pyqt/intro>`__ (both PyQt4 and PyQt5 are supported)
* `QtPy <https://pypi.python.org/pypi/QtPy/>`__ 1.1.1 or higher - this is an
* `QtPy <https://pypi.python.org/pypi/QtPy/>`__ 1.2 or higher - this is an
abstraction layer for the Python Qt packages
* `IPython <http://ipython.org>`_ 4.0 or higher
* `ipykernel <https://pypi.python.org/pypi/ipykernel>`_
* `qtconsole <http://jupyter.org/qtconsole/>`_
* `dill <http://pythonhosted.org/dill/>`_ 0.2 or later (which improves session saving)
* `dill <https://pypi.python.org/pypi/dill>`_ 0.2 or later (which improves session saving)
* `h5py <http://www.h5py.org>`_ 2.4 or later, for reading HDF5 files
* `xlrd <https://pypi.python.org/pypi/xlrd>`_ 1.0 or later, for reading Excel files
* `glue-vispy-viewers <https://pypi.python.org/pypi/glue-vispy-viewers>`_, which provide 3D viewers

The following optional dependencies are also highly recommended and
domain-independent:

* `SciPy <http://www.scipy.org>`_
* `SciPy <https://www.scipy.org>`_
* `scikit-image <http://scikit-image.org>`_
* `plotly <https://plot.ly>`_ for exporting to plot.ly

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,10 +3,10 @@ Installing with pip

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

Installing glue with `pip <https://pip.pypa.io>`__ is possible, although you
Installing glue with `pip <https://pip.pypa.io/en/stable/>`__ is possible, although you
will need to first make sure that you install Qt and either `PyQt
<https://riverbankcomputing.com/software/pyqt/intro>`__ or `PySide
<http://pyside.org>`__, since these cannot be automatically installed with the
<https://wiki.qt.io/PySide>`__, since these cannot be automatically installed with the
``pip`` command. See the section on :ref:`installing-qt` for more details.

Assuming that you have either PyQt or PySide installed, you can install glue
Expand Down
2 changes: 1 addition & 1 deletion doc/python_guide/data_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ If you using the Glue application, you can then change the visual properties of

This method of creating subsets can be a powerful technique. For a demo of
using sending Scikit-learn-identified clusters back into Glue as subsets, see
`this notebook <http://nbviewer.ipython.org/github/ChrisBeaumont/crime/blob/master/glue_startup.ipynb>`_.
`this notebook <http://nbviewer.jupyter.org/github/ChrisBeaumont/crime/blob/master/glue_startup.ipynb>`_.

The following example demonstrates how to access subsets defined graphically in data viewers. Let's say that you have two subsets that you defined in the scatter plot and histogram data viewers:

Expand Down
2 changes: 1 addition & 1 deletion doc/videos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Glue, FBI Crime Data, and Plotly (5 minutes)
<iframe src="http://player.vimeo.com/video/97436621" width="500" height="313" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <
</center>

See also the `IPython notebook <http://nbviewer.ipython.org/github/ChrisBeaumont/crime/blob/master/glue_plotly_fbi.ipynb>`_ that accompanies this video.
See also the `IPython notebook <http://nbviewer.jupyter.org/github/ChrisBeaumont/crime/blob/master/glue_plotly_fbi.ipynb>`_ that accompanies this video.

Extracting slices from cubes
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/whatsnew/0.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Experimental WorldWide Telescope plugin
---------------------------------------

We have developed a plugin that provides a `WorldWide Telescope (WWT)
<http://worldwidetelescope.org>`_ viewer inside glue:
<http://worldwidetelescope.org/webclient/>`_ viewer inside glue:

.. image:: images/v0.11/plugin_wwt.jpg
:align: center
Expand Down
Loading

0 comments on commit 5d87e4a

Please sign in to comment.