From f1941304efcd8fa0e0f3c796cd79267d1c8f2011 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 20 Nov 2015 11:46:20 +0000 Subject: [PATCH 1/5] Make sure we test with the latest version of ginga --- .travis.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6c777ef2d..5cd6f596d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ env: - NO_CFG_FILES=false - QT_PKG=pyqt - CONDA_DEPENDENCIES="pip scipy cython h5py pygments pyzmq scikit-image pandas sphinx=1.2.3 xlrd pillow pytest mock coverage pyyaml requests sphinx_rtd_theme" - - PIP_DEPENDENCIES="pytest-cov coveralls pyavm astrodendro awscli" + - PIP_DEPENDENCIES="pytest-cov coveralls pyavm astrodendro awscli ginga" - secure: NvQVc3XmmjXNVKrmaD31IgltsOImlnt3frAl4wU0pM223iejr7V57hz/V5Isx6sTANWEiRBMG27v2T8e5IiB7DQTxFUleZk3DWXQV1grw/GarEGUawXAgwDWpF0AE/7BRVJYqo2Elgaqf28+Jkun8ewvfPCiEROD2jWEpnZj+IQ= - secure: "SU9BYH8d9eNigypG3lC83s0NY6Mq9AHGKXyEGeXDtz1npJIC1KHdzPMP1v1K3dzCgl1p6ReMXPjZMCENyfNkad/xvzTzGk0Nu/4BjihrUPV6+ratVeLpv0JLm8ikh8q+sZURkdtzUOlds+Hfn5ku4LdpT87tcKHY9TINAGA34ZM=" - AWS_ACCESS_KEY_ID: AKIAI2ERWDHLW3W24X3A @@ -66,7 +66,6 @@ matrix: - ASTROPY_VERSION=1.0 - DOC_TRIGGER=1 - APP_TRIGGER=1 - - GINGA=1 - PYTEST_ARGS="--cov glue --no-optional-skip" - NO_CFG_FILES=true @@ -128,9 +127,6 @@ install: - LC_ALL=C - # Install latest developer version of Ginga - - if [[ $GINGA ]]; then pip install $PIP_ARGS https://github.com/glue-viz/ginga/archive/master.zip; fi - # Uninstall PyQt if we are using PySide or PyQt5 - if [ $QT_PKG == pyside ]; then conda remove pyqt sip || true; fi - if [ $QT_PKG == pyqt5 ]; then conda remove pyqt qt || true; fi From 37e6510055c410850ca4000862cf2f0c2907f871 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 20 Nov 2015 11:53:30 +0000 Subject: [PATCH 2/5] Fixed compatibility with latest stable ginga --- glue/plugins/ginga_viewer/qt_widget.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/glue/plugins/ginga_viewer/qt_widget.py b/glue/plugins/ginga_viewer/qt_widget.py index 76a3df37f..4df816248 100644 --- a/glue/plugins/ginga_viewer/qt_widget.py +++ b/glue/plugins/ginga_viewer/qt_widget.py @@ -12,7 +12,13 @@ from ...external.qt.QtCore import Qt, QSize from ginga.qtw.ImageViewCanvasQt import ImageViewCanvas -from ginga.qtw import Readout, ColorBar +from ginga.qtw import ColorBar + +try: + from ginga.gw import Readout +except ImportError: # older versions of ginga + from ginga.qtw import Readout + from ginga.misc import log from ginga import cmap as ginga_cmap # ginga_cmap.add_matplotlib_cmaps() @@ -104,7 +110,10 @@ def make_central_widget(self): layout.setSpacing(0) layout.addWidget(self.canvas.get_widget(), stretch=1) layout.addWidget(self.colorbar, stretch=0) - layout.addWidget(self.readout.get_widget(), stretch=0) + try: + layout.addWidget(self.readout.get_widget(), stretch=0) + except TypeError: # recent versions of ginga + layout.addWidget(self.readout.get_widget().get_widget(), stretch=0) topw.setLayout(layout) return topw From 480eabdd430cb5dca01ab10488639b8d75942978 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 20 Nov 2015 11:58:58 +0000 Subject: [PATCH 3/5] Added changelog entry [ci skip] --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index a499ef282..53d6df375 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,8 @@ v0.6 (unreleased) * Fix bug that caused viewers to be restored with the wrong size. [#781, #783] +* Fixed compatibility with the latest stable version of ginga. [#797] + * Prevent axes from moving around when data viewers are being resized, and instead make the absolute margins between axes and figure edge fixed. [#745] From eabeb21663b3a630d723aa36011ab63bdfc72e63 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 20 Nov 2015 12:47:08 +0000 Subject: [PATCH 4/5] =?UTF-8?q?Don=E2=80=99t=20test=20ginga=20with=20Pytho?= =?UTF-8?q?n=202.6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5cd6f596d..3fac17dea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,7 @@ matrix: - os: linux env: - PYTHON_VERSION=2.6 IPYTHON_VERSION=1 MPL_VERSION=1.4 ASTROPY_VERSION=0.4 + - PIP_DEPENDENCIES="pytest-cov coveralls pyavm astrodendro awscli" # Astropy dev - os: linux From b512ee8a991202d13712ad7d6607995ad31d8e61 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Fri, 20 Nov 2015 15:34:09 +0000 Subject: [PATCH 5/5] =?UTF-8?q?Don=E2=80=99t=20test=20ginga=20with=20PyQt5?= =?UTF-8?q?=20because=20there=20is=20currently=20a=20bug=20which=20causes?= =?UTF-8?q?=20ginga=20to=20set=20QT=5FAPI=20to=20=E2=80=98pyqt=E2=80=99=20?= =?UTF-8?q?when=20using=20PyQt5,=20which=20in=20turn=20causes=20issues=20w?= =?UTF-8?q?ith=20IPython?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3fac17dea..e034198b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,7 @@ matrix: - os: linux env: - PYTHON_VERSION=2.6 IPYTHON_VERSION=1 MPL_VERSION=1.4 ASTROPY_VERSION=0.4 + # We don't test ginga with Python 2.6 since it is not supported - PIP_DEPENDENCIES="pytest-cov coveralls pyavm astrodendro awscli" # Astropy dev @@ -46,6 +47,8 @@ matrix: - os: linux env: - PYTHON_VERSION=2.7 MPL_VERSION=1.5 NUMPY_VERSION=1.10 ASTROPY_VERSION=1.0 QT_PKG=pyqt5 + # We don't test ginga with PyQt5 due to a bug in ginga with QT_API + - PIP_DEPENDENCIES="pytest-cov coveralls pyavm astrodendro awscli" # The following configuration tests that glue functions with minimal # dependencies. The --no-deps is to prevent scipy from getting