Skip to content
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

Fixes following 0.15.0 release #2031

Merged
merged 7 commits into from
Jun 24, 2019
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
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ v0.16.0 (unreleased)

* No changes yet.

v0.15.1 (unreleased)
--------------------

* Fixed __version__ variable. [#2031]

* Fixed tox configuration. [#2031]

* Improve error message if loading a session file that uses WCS auto-linking
but the installed version of astropy is too old. [#2031]

v0.15.0 (2019-06-23)
--------------------

Expand Down
4 changes: 0 additions & 4 deletions conftest.py

This file was deleted.

7 changes: 4 additions & 3 deletions doc/whatsnew/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ New auto-linking functionality

We have now set up an infrastructure to make it possible to define plugins that
can automatically suggest links, and have included such a plugin for linking
astronomical images and higher dimensional datasets. To write such a plugin, you
will need to define a Python function that takes a data collection and then
returns a list of links, e.g.::
astronomical images and higher dimensional datasets (note that this
functionality requires astropy 3.1 or later). To write such a plugin, you will
need to define a Python function that takes a data collection and then returns a
list of links, e.g.::

from glue.config import autolinker

Expand Down
10 changes: 8 additions & 2 deletions glue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
import os

import sys

from pkg_resources import get_distribution, DistributionNotFound

try:
__version__ = get_distribution('glue-core').version
except DistributionNotFound:
__version__ = 'undefined'

from ._mpl_backend import MatplotlibBackendSetter
sys.meta_path.append(MatplotlibBackendSetter())

Expand All @@ -16,8 +24,6 @@

from .qglue import qglue

from .version import __version__ # noqa

from .main import load_plugins # noqa


Expand Down
5 changes: 5 additions & 0 deletions glue/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ def pytest_runtest_teardown(item, nextitem):
sys.stderr = STDERR_ORIGINAL


def pytest_addoption(parser):
parser.addoption("--no-optional-skip", action="store_true", default=False,
help="don't skip any tests with optional dependencies")


def pytest_configure(config):

os.environ['GLUE_TESTING'] = 'True'
Expand Down
67 changes: 0 additions & 67 deletions glue/core/io/qt/subset_mask.py

This file was deleted.

85 changes: 0 additions & 85 deletions glue/core/io/subset_mask.py

This file was deleted.

8 changes: 5 additions & 3 deletions glue/plugins/wcs_autolinking/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

from astropy import __version__

# The autolinking functionality relies on the new WCS API present in
# Astropy 3.1 and later.
ASTROPY_GE_31 = LooseVersion(__version__) >= '3.1'


def setup():

# The autolinking functionality relies on the new WCS API present in
# Astropy 3.1 and later.
if LooseVersion(__version__) < '3.1':
if not ASTROPY_GE_31:
return

from . import wcs_autolinking # noqa
5 changes: 5 additions & 0 deletions glue/plugins/wcs_autolinking/wcs_autolinking.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from glue.plugins.wcs_autolinking import ASTROPY_GE_31

from glue.config import autolinker, link_helper
from glue.core.link_helpers import MultiLink
from glue.core.coordinates import WCSCoordinates
Expand Down Expand Up @@ -115,6 +117,9 @@ def __gluestate__(self, context):

@classmethod
def __setgluestate__(cls, rec, context):
if not ASTROPY_GE_31:
raise ValueError("Loading this session file requires Astropy 3.1 "
"or later to be installed")
self = cls(context.object(rec['data1']),
context.object(rec['data2']))
return self
Expand Down
8 changes: 0 additions & 8 deletions glue/version.py

This file was deleted.

6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ test =

[options.package_data]
* = *.png, *.ui, *.glu, *.hdf5, *.fits, *.xlsx, *.txt, *.csv, *.svg, *.vot
glue.core.data_factories.tests = data/*.jpg
glue.external.pvextractor = LICENSE
glue.viewers.histogram.qt.tests = data/*.glu
glue.viewers.image.qt.tests = data/*.glu, baseline/*.png
glue.viewers.profile.qt.tests = data/*.glu
glue.viewers.scatter.qt.tests = data/*.glu

[flake8]
ignore = E501,E731,F841,E127,E741,E402,W504,W605
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ requires = pip >= 18.0

[testenv]
passenv = DISPLAY HOME
changedir = {envtmpdir}
extras =
test: test,qt
commands =
test: pytest glue --cov glue -v
test: pytest --pyargs glue --cov glue -v