diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 15081d3f..19afea6b 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -38,8 +38,6 @@ jobs: # Standard tests # Linux builds - test on all supported PyQt5/6 and PySide2/6 versions, # and include all dependencies in some builds - - linux: py38-test-pyqt514-all - - linux: py39-test-pyqt515 - linux: py310-test-pyqt63-all - linux: py311-test-pyqt64 - linux: py312-test-pyqt65 @@ -47,10 +45,10 @@ jobs: - linux: py313-test-pyqt67 - linux: py311-test-pyqt66-all - linux: py311-test-pyqt514 - - linux: py311-test-pyqt515-lts-all + - linux: py314-test-pyqt68-dev # Documentation build - - linux: py38-docs-pyqt514 + - linux: py313-docs-pyqt514 coverage: false - macos: py311-docs-pyqt64 coverage: false @@ -59,17 +57,16 @@ jobs: - enchant # Test a few configurations on macOS 13 (Intel, default for py<310) and 14 (Arm) - - macos: py38-test-pyqt514-all + - macos: py310-test-pyqt514-all - macos: py311-test-pyqt65 - macos: py312-test-pyqt66 - runs-on: macos-13 - macos: py313-test-pyqt68 # Test some configurations on Windows - - windows: py38-test-pyqt514 - windows: py310-test-pyqt63 - windows: py311-test-pyqt65 - windows: py312-test-pyqt67 + - windows: py313-test-pyqt67 # Test against latest developer versions of some packages - linux: py311-test-pyqt64-dev @@ -96,8 +93,6 @@ jobs: envs: | # Non-deterministic QThread exceptions - - linux: py38-test-pyside514-skipexitcode - - linux: py39-test-pyside515-skipexitcode - linux: py310-test-pyside63-skipexitcode # PySide6 6.4 failures due to https://github.com/spyder-ide/qtpy/issues/373 diff --git a/glue_qt/viewers/image/data_viewer.py b/glue_qt/viewers/image/data_viewer.py index 1ba4850c..f1895648 100644 --- a/glue_qt/viewers/image/data_viewer.py +++ b/glue_qt/viewers/image/data_viewer.py @@ -12,10 +12,7 @@ # Import the mouse mode to make sure it gets registered from glue_qt.viewers.image.contrast_mouse_mode import ContrastBiasMode # noqa from glue_qt.viewers.image.profile_viewer_tool import ProfileViewerTool # noqa -try: - from glue.viewers.image.pixel_selection_mode import PixelSelectionTool # noqa -except ModuleNotFoundError: - from glue_qt.viewers.image.pixel_selection_mode import PixelSelectionTool #noqa +from glue.viewers.image.pixel_selection_mode import PixelSelectionTool # noqa diff --git a/glue_qt/viewers/image/pixel_selection_mode.py b/glue_qt/viewers/image/pixel_selection_mode.py deleted file mode 100644 index 004d6ecb..00000000 --- a/glue_qt/viewers/image/pixel_selection_mode.py +++ /dev/null @@ -1,65 +0,0 @@ -from glue.config import viewer_tool - -from glue.core.command import ApplySubsetState -from glue.core.edit_subset_mode import ReplaceMode - -from glue.viewers.matplotlib.toolbar_mode import ToolbarModeBase -from glue.viewers.image.pixel_selection_subset_state import PixelSubsetState - -__all__ = ['PixelSelectionTool'] - - -@viewer_tool -class PixelSelectionTool(ToolbarModeBase): - """ - Selects pixel under mouse cursor. - """ - - icon = "glue_crosshair" - tool_id = 'image:point_selection' - action_text = 'Pixel' - tool_tip = 'Select a single pixel based on mouse location' - status_tip = 'CLICK to select a point, CLICK and DRAG to update the selection in real time' - - _pressed = False - - def __init__(self, *args, **kwargs): - super(PixelSelectionTool, self).__init__(*args, **kwargs) - self._move_callback = self._select_pixel - self._press_callback = self._on_press - self._release_callback = self._on_release - - def _on_press(self, mode): - self._pressed = True - self.viewer.session.edit_subset_mode.mode = ReplaceMode - self._select_pixel(mode) - - def _on_release(self, mode): - self._pressed = False - - def _select_pixel(self, mode): - """ - Select a pixel - """ - - if not self._pressed: - return - - x, y = self._event_xdata, self._event_ydata - - if x is None or y is None: - return None - - x = int(round(x)) - y = int(round(y)) - - slices = [slice(None)] * self.viewer.state.reference_data.ndim - slices[self.viewer.state.x_att.axis] = slice(x, x + 1) - slices[self.viewer.state.y_att.axis] = slice(y, y + 1) - - subset_state = PixelSubsetState(self.viewer.state.reference_data, slices) - - cmd = ApplySubsetState(data_collection=self.viewer._data, - subset_state=subset_state, - override_mode=None) - self.viewer._session.command_stack.do(cmd) diff --git a/pyproject.toml b/pyproject.toml index 7193968e..02ad45c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,12 +5,11 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: Visualization", "License :: OSI Approved :: BSD License", ] @@ -21,7 +20,7 @@ requires-python = ">=3.8" dynamic = [ "version",] dependencies = [ - "glue-core>=1.15.0", + "glue-core>=1.23.0", "numpy>=1.17", "matplotlib>=3.2", "scipy>=1.1", @@ -33,8 +32,6 @@ dependencies = [ "ipykernel>=4.0,!=5.0.0,!=5.1.0", "qtconsole>=4.3,!=5.4.2", "pvextractor>=0.2", - "importlib_resources>=1.3; python_version<'3.9'", - "importlib_metadata>=3.6; python_version<'3.10'", ] [[project.authors]] diff --git a/tox.ini b/tox.ini index 52da80d3..8923772f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{38,39,310,311,312,313}-{codestyle,test,docs}-{pyqt514,pyqt515,pyside514,pyside515,pyqt63,pyqt64,pyqt65,pyqt66,pyqt67,pyqt68,pyside66,pyside67,pyside68}-all-{dev,legacy} + py{310,311,312,313,314}-{codestyle,test,docs}-{pyqt514,pyqt515,pyside514,pyside515,pyqt63,pyqt64,pyqt65,pyqt66,pyqt67,pyqt68,pyside66,pyside67,pyside68}-all-{dev,legacy} requires = pip >= 18.0 setuptools >= 30.3.0