Skip to content

Commit 823b1b6

Browse files
committed
Merge branch 'main' of github.com:glue-viz/glue-qt into py_ver_update
2 parents 46b95db + 3667fbf commit 823b1b6

File tree

6 files changed

+15
-156
lines changed

6 files changed

+15
-156
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ repos:
5454
# Forbid files which have a UTF-8 Unicode replacement character.
5555

5656
- repo: https://github.com/astral-sh/ruff-pre-commit
57-
rev: "v0.11.12"
57+
rev: "v0.12.7"
5858
hooks:
5959
- id: ruff
6060
args: ["--fix", "--show-fixes"]

glue_qt/viewers/image/data_viewer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212
# Import the mouse mode to make sure it gets registered
1313
from glue_qt.viewers.image.contrast_mouse_mode import ContrastBiasMode # noqa
1414
from glue_qt.viewers.image.profile_viewer_tool import ProfileViewerTool # noqa
15-
from glue_qt.viewers.image.pixel_selection_mode import PixelSelectionTool # noqa
15+
try:
16+
from glue.viewers.image.pixel_selection_mode import PixelSelectionTool # noqa
17+
except ModuleNotFoundError:
18+
from glue_qt.viewers.image.pixel_selection_mode import PixelSelectionTool #noqa
19+
20+
1621

1722
from glue.viewers.image.viewer import MatplotlibImageMixin
1823

glue_qt/viewers/matplotlib/tests/test_data_viewer.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import sys
44

55
import pytest
6+
import numpy as np
67
from numpy.testing import assert_allclose
78

89
try:
@@ -18,7 +19,7 @@
1819
from glue.core.roi import XRangeROI
1920
from glue_qt.utils import process_events
2021
from glue.tests.helpers import requires_matplotlib_ge_22
21-
from glue_qt.tests.helpers import requires_pyqt
22+
from glue_qt.tests.helpers import requires_pyqt, PYQT5_INSTALLED
2223

2324

2425
class MatplotlibDrawCounter(object):
@@ -593,8 +594,10 @@ def limits(viewer):
593594
self.viewer.viewer_size = (400, 400)
594595
self.viewer.figure.canvas.draw()
595596
process_events(wait=0.1)
596-
with pytest.raises(AssertionError):
597-
assert_allclose(limits(self.viewer), initial_limits)
597+
598+
# Broken in Linux CI with PyQT5
599+
if not (PYQT5_INSTALLED and sys.platform == 'linux'):
600+
assert not np.allclose(limits(self.viewer), initial_limits, rtol=1e-7, atol=0)
598601

599602
# Now change the viewer size a number of times and make sure if we
600603
# return to the original size, the limits match the initial ones.

setup.cfg

Lines changed: 0 additions & 134 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ allowlist_externals =
7979
sh
8080
commands =
8181
test: pip freeze
82-
test-!skipexitcode: pytest --pyargs glue_qt --cov glue_qt --cov-config={toxinidir}/setup.cfg {posargs}
82+
test-!skipexitcode: pytest --pyargs glue_qt --cov glue_qt --cov-config={toxinidir}/pyproject.toml {posargs}
8383
# The skipexitcode mode consists of ignoring the exit code of the pytest
8484
# command and just checking whether any errors or failures were present.
85-
test-skipexitcode: sh -c 'pytest --pyargs glue_qt --cov glue_qt --cov-config={toxinidir}/setup.cfg --junit-xml={toxinidir}/{envname}.xml {posargs} || true'
85+
test-skipexitcode: sh -c 'pytest --pyargs glue_qt --cov glue_qt --cov-config={toxinidir}/pyproject.toml --junit-xml={toxinidir}/{envname}.xml {posargs} || true'
8686
test-skipexitcode: python {toxinidir}/.github/workflows/check_failures.py {toxinidir}/{envname}.xml
8787
docs: sphinx-build -W -n -b html -d _build/doctrees . _build/html
8888

0 commit comments

Comments
 (0)