From 8b7017c37f0a2e2f9c9cb9bbdeae9c716d805a8d Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Wed, 14 Sep 2022 16:32:41 +0200 Subject: [PATCH 1/7] MNT: Add Python 3.11 CI env --- .github/workflows/ci_workflows.yml | 5 ++++- tox.ini | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 5246b3ba5..04be7c0c2 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -76,10 +76,13 @@ jobs: - '^libxcb.*-dev' - libxkbcommon-x11-dev - libegl1-mesa + - libopenblas-dev + - libhdf5-dev brew: - enchant envs: | # PySide6 6.4 failures due to https://github.com/spyder-ide/qtpy/issues/373 + # and https://github.com/matplotlib/matplotlib/issues/24155 - linux: py310-test-pyside64 - windows: py310-test-pyside64 @@ -95,7 +98,7 @@ jobs: uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: # Setup PyQt5 deps and headless X server as per pyvista/setup-headless-display-action@v1 - libraries: '^libxcb.*-dev libxkbcommon-x11-dev libgl1-mesa-glx xvfb' + libraries: '^libxcb.*-dev libxkbcommon-x11-dev libgl1-mesa-glx libopenblas-dev xvfb' test_extras: 'test,qt' test_command: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & sleep 3; DISPLAY=:99.0 pytest --pyargs glue secrets: diff --git a/tox.ini b/tox.ini index 1ccf9b4cb..76b7b1a02 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{38,39,310}-{codestyle,test,docs}-{pyqt514,pyqt515,pyside514,pyside515,pyqt63,pyside63}-all-{dev,legacy} + py{38,39,310,311}-{codestyle,test,docs}-{pyqt514,pyqt515,pyside514,pyside515,pyqt63,pyside63}-all-{dev,legacy} requires = pip >= 18.0 setuptools >= 30.3.0 From de246be00e1009789edbff096cecc58913906c39 Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Thu, 15 Sep 2022 23:25:13 +0200 Subject: [PATCH 2/7] TST: add py311 env with standard deps --- .github/workflows/ci_workflows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 04be7c0c2..472fd09ae 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -71,6 +71,7 @@ jobs: coverage: codecov display: true # Linux PyQt 5.15 and 6.3 installations require apt-getting xcb and EGL deps + # and headless X11 display; as of Python 3.11 Scipy and h5py also need their own deps. libraries: | apt: - '^libxcb.*-dev' From e236982195a7869543c74ccea9f7eaef2c2c65e6 Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Sat, 15 Oct 2022 18:45:48 +0200 Subject: [PATCH 3/7] Fix FITS file read as ascii, rebased and added PyQt6/PySide6 envs + deps --- .github/workflows/ci_workflows.yml | 28 +++++++++++++++++++---- glue/core/data_factories/astropy_table.py | 5 +++- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 472fd09ae..810c3e997 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -24,18 +24,22 @@ jobs: with: coverage: codecov display: true - # The Linux PyQt 5.15 installation requires apt-getting its xcb deps and headless X11 display + # Linux PyQt 5.15 and 6.x installations require apt-getting xcb and EGL deps + # and headless X11 display; as of Python 3.11 Scipy and h5py also need their own deps. libraries: | apt: - '^libxcb.*-dev' - libxkbcommon-x11-dev - libegl1-mesa + - libopenblas-dev + - libhdf5-dev brew: - enchant + - hdf5 envs: | # Standard tests - # Linux builds - test on all supported PyQt5 and PySide2 versions, + # 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: py38-test-pyside514 @@ -44,6 +48,9 @@ jobs: - linux: py310-test-pyside63 - linux: py310-test-pyqt63-all - linux: py310-test-pyqt64-all + - name: Python 3.11 rc with PySide6 (Linux) + linux: py311-test-pyside63 + python-version: '3.11.0-rc.2' # Documentation build - linux: py38-docs-pyqt514 @@ -51,18 +58,27 @@ jobs: - macos: py39-docs-pyqt515 coverage: false - # Test a few configurations on MacOS X + # Test a few configurations on macOS - macos: py38-test-pyqt514-all - macos: py310-test-pyqt515 - macos: py310-test-pyside63 - macos: py310-test-pyqt64 + - name: Python 3.11 rc with Qt5.15 (macOS) + macos: py311-test-pyqt515 + python-version: '3.11.0-rc.2' # Test some configurations on Windows - windows: py38-test-pyqt514 - windows: py310-test-pyqt63 + - name: Python 3.11 rc with Qt5.14 (Windows) + windows: py311-test-pyqt514 + python-version: '3.11.0-rc.2' # Test against latest developer versions of some packages - linux: py310-test-pyqt515-dev-all + - name: Python 3.11 rc with Qt6.4 (Linux) + linux: py311-test-pyqt64-dev + python-version: '3.11.0-rc.2' allowed_failures: needs: initial_checks @@ -70,8 +86,6 @@ jobs: with: coverage: codecov display: true - # Linux PyQt 5.15 and 6.3 installations require apt-getting xcb and EGL deps - # and headless X11 display; as of Python 3.11 Scipy and h5py also need their own deps. libraries: | apt: - '^libxcb.*-dev' @@ -81,11 +95,15 @@ jobs: - libhdf5-dev brew: - enchant + - hdf5 envs: | # PySide6 6.4 failures due to https://github.com/spyder-ide/qtpy/issues/373 # and https://github.com/matplotlib/matplotlib/issues/24155 - linux: py310-test-pyside64 - windows: py310-test-pyside64 + - name: Python 3.11 rc with PySide6 6.4 (macOS) + macos: py311-test-pyside64 + python-version: '3.11.0-rc.2' # Windows docs build - windows: py310-docs-pyqt515 diff --git a/glue/core/data_factories/astropy_table.py b/glue/core/data_factories/astropy_table.py index b55876dab..59a17cbd8 100644 --- a/glue/core/data_factories/astropy_table.py +++ b/glue/core/data_factories/astropy_table.py @@ -40,7 +40,10 @@ def astropy_table_read(*args, **kwargs): # also more generally, we should first try the ASCII readers. if 'format' not in kwargs: try: - return Table.read(*args, format='ascii', **kwargs) + t = Table.read(*args, format='ascii', **kwargs) + # Double-check for certain FITS files that may be read in as ASCII in Python 3.11 + if not (len(t) == 1 and [c.value[0] for c in t.itercols()][:3] == ['SIMPLE', '=', 'T']): + return t except Exception: pass From 1dfbd839cedc84898927a35b429bddd06f141398 Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Tue, 25 Oct 2022 14:14:57 +0200 Subject: [PATCH 4/7] TST: introduce 3.11.0 (disabling h5py on macOS and Windows) --- .github/workflows/ci_workflows.yml | 22 +++++++++------------- setup.cfg | 5 ++++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 810c3e997..68ddca024 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -35,7 +35,6 @@ jobs: - libhdf5-dev brew: - enchant - - hdf5 envs: | # Standard tests @@ -48,9 +47,8 @@ jobs: - linux: py310-test-pyside63 - linux: py310-test-pyqt63-all - linux: py310-test-pyqt64-all - - name: Python 3.11 rc with PySide6 (Linux) - linux: py311-test-pyside63 - python-version: '3.11.0-rc.2' + - name: Python 3.11 with PyQt5.14 (Linux) + linux: py311-test-pyqt514 # Documentation build - linux: py38-docs-pyqt514 @@ -63,22 +61,19 @@ jobs: - macos: py310-test-pyqt515 - macos: py310-test-pyside63 - macos: py310-test-pyqt64 - - name: Python 3.11 rc with Qt5.15 (macOS) + - name: Python 3.11 with PyQt5.15 (macOS) macos: py311-test-pyqt515 - python-version: '3.11.0-rc.2' # Test some configurations on Windows - windows: py38-test-pyqt514 - windows: py310-test-pyqt63 - - name: Python 3.11 rc with Qt5.14 (Windows) - windows: py311-test-pyqt514 - python-version: '3.11.0-rc.2' + - name: Python 3.11 with PyQt5.15 (Windows) + windows: py311-test-pyqt515 # Test against latest developer versions of some packages - linux: py310-test-pyqt515-dev-all - - name: Python 3.11 rc with Qt6.4 (Linux) + - name: Python 3.11 with PyQt6.4 (Linux) linux: py311-test-pyqt64-dev - python-version: '3.11.0-rc.2' allowed_failures: needs: initial_checks @@ -101,9 +96,10 @@ jobs: # and https://github.com/matplotlib/matplotlib/issues/24155 - linux: py310-test-pyside64 - windows: py310-test-pyside64 - - name: Python 3.11 rc with PySide6 6.4 (macOS) + - name: Python 3.11 with PySide6 (Linux) + linux: py311-test-pyside64 + - name: Python 3.11 with PySide6 6.4 (macOS) macos: py311-test-pyside64 - python-version: '3.11.0-rc.2' # Windows docs build - windows: py310-docs-pyqt515 diff --git a/setup.cfg b/setup.cfg index 3daf2d728..9713fb0bb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,9 +39,9 @@ install_requires = ipykernel>=4.0,!=5.0.0,!=5.1.0 qtconsole>=4.3 dill>=0.2 + h5py>=2.10; python_version<'3.11' xlrd>=1.2 openpyxl>=3.0 - h5py>=2.10 mpl-scatter-density>=0.7 pvextractor>=0.2 @@ -74,6 +74,7 @@ all = scikit-image PyAVM astrodendro + h5py>=2.10 spectral-cube # See https://github.com/python-pillow/Pillow/issues/4509 # for why we exclude pillow 7.1.0 @@ -97,6 +98,8 @@ test = pytest-cov pytest-faulthandler pytest-flake8 + h5py>=2.10; platform_system=="Linux" + h5py>=2.10; python_version<'3.11' objgraph [options.package_data] From 425c176dd71a44b11755cf7ae3b72e2ec39e28bc Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Tue, 25 Oct 2022 14:16:06 +0200 Subject: [PATCH 5/7] TST: use default py311 labels --- .github/workflows/ci_workflows.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 68ddca024..ab8c90f69 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -47,8 +47,7 @@ jobs: - linux: py310-test-pyside63 - linux: py310-test-pyqt63-all - linux: py310-test-pyqt64-all - - name: Python 3.11 with PyQt5.14 (Linux) - linux: py311-test-pyqt514 + - linux: py311-test-pyqt514 # Documentation build - linux: py38-docs-pyqt514 @@ -61,19 +60,16 @@ jobs: - macos: py310-test-pyqt515 - macos: py310-test-pyside63 - macos: py310-test-pyqt64 - - name: Python 3.11 with PyQt5.15 (macOS) - macos: py311-test-pyqt515 + - macos: py311-test-pyqt515 # Test some configurations on Windows - windows: py38-test-pyqt514 - windows: py310-test-pyqt63 - - name: Python 3.11 with PyQt5.15 (Windows) - windows: py311-test-pyqt515 + - windows: py311-test-pyqt515 # Test against latest developer versions of some packages - linux: py310-test-pyqt515-dev-all - - name: Python 3.11 with PyQt6.4 (Linux) - linux: py311-test-pyqt64-dev + - linux: py311-test-pyqt64-dev allowed_failures: needs: initial_checks @@ -96,10 +92,8 @@ jobs: # and https://github.com/matplotlib/matplotlib/issues/24155 - linux: py310-test-pyside64 - windows: py310-test-pyside64 - - name: Python 3.11 with PySide6 (Linux) - linux: py311-test-pyside64 - - name: Python 3.11 with PySide6 6.4 (macOS) - macos: py311-test-pyside64 + - linux: py311-test-pyside64 + - macos: py311-test-pyside64 # Windows docs build - windows: py310-docs-pyqt515 From be59661c1bb3d5f5a3a2a1770af3668a6fe1c50d Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Tue, 25 Oct 2022 19:30:12 +0200 Subject: [PATCH 6/7] TST: move macOS, Windows to allowed failures --- .github/workflows/ci_workflows.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index ab8c90f69..9d63c29ee 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -60,12 +60,10 @@ jobs: - macos: py310-test-pyqt515 - macos: py310-test-pyside63 - macos: py310-test-pyqt64 - - macos: py311-test-pyqt515 # Test some configurations on Windows - windows: py38-test-pyqt514 - windows: py310-test-pyqt63 - - windows: py311-test-pyqt515 # Test against latest developer versions of some packages - linux: py310-test-pyqt515-dev-all @@ -90,10 +88,13 @@ jobs: envs: | # PySide6 6.4 failures due to https://github.com/spyder-ide/qtpy/issues/373 # and https://github.com/matplotlib/matplotlib/issues/24155 + # Python 3.11.0 not yet available on all platforms. - linux: py310-test-pyside64 - windows: py310-test-pyside64 - linux: py311-test-pyside64 + - macos: py311-test-pyqt515 - macos: py311-test-pyside64 + - windows: py311-test-pyqt515 # Windows docs build - windows: py310-docs-pyqt515 @@ -107,7 +108,7 @@ jobs: uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1 with: # Setup PyQt5 deps and headless X server as per pyvista/setup-headless-display-action@v1 - libraries: '^libxcb.*-dev libxkbcommon-x11-dev libgl1-mesa-glx libopenblas-dev xvfb' + libraries: '^libxcb.*-dev libxkbcommon-x11-dev libgl1-mesa-glx libopenblas-dev libhdf5-dev xvfb' test_extras: 'test,qt' test_command: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & sleep 3; DISPLAY=:99.0 pytest --pyargs glue secrets: From 8708479cf87c972b5c083df096bd0f1f19b46635 Mon Sep 17 00:00:00 2001 From: Derek Homeier Date: Fri, 28 Oct 2022 16:40:29 +0200 Subject: [PATCH 7/7] TST: move macos py311 to tests, cleanup deps --- .github/workflows/ci_workflows.yml | 7 ++++--- README.rst | 2 +- setup.cfg | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 9d63c29ee..f7b918876 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -1,4 +1,4 @@ -name: CI Workflows +name: CI Tests on: push: @@ -60,6 +60,7 @@ jobs: - macos: py310-test-pyqt515 - macos: py310-test-pyside63 - macos: py310-test-pyqt64 + - macos: py311-test-pyqt515 # Test some configurations on Windows - windows: py38-test-pyqt514 @@ -88,11 +89,11 @@ jobs: envs: | # PySide6 6.4 failures due to https://github.com/spyder-ide/qtpy/issues/373 # and https://github.com/matplotlib/matplotlib/issues/24155 - # Python 3.11.0 not yet available on all platforms. + # Python 3.11.0 failing on Windows in test_image.py on + # > assert df.find_factory(fname) is df.img_data - linux: py310-test-pyside64 - windows: py310-test-pyside64 - linux: py311-test-pyside64 - - macos: py311-test-pyqt515 - macos: py311-test-pyside64 - windows: py311-test-pyqt515 diff --git a/README.rst b/README.rst index f11e45231..bfad80bbf 100644 --- a/README.rst +++ b/README.rst @@ -46,7 +46,7 @@ License Glue is licensed under the `BSD License `__. -.. |Actions Status| image:: https://github.com/glue-viz/glue/workflows/CI%20Workflows/badge.svg +.. |Actions Status| image:: https://github.com/glue-viz/glue/actions/workflows/ci_workflows.yml/badge.svg :target: https://github.com/glue-viz/glue/actions :alt: Glue's GitHub Actions CI Status .. |Coverage Status| image:: https://codecov.io/gh/glue-viz/glue/branch/master/graph/badge.svg diff --git a/setup.cfg b/setup.cfg index 9713fb0bb..dca3d4fef 100644 --- a/setup.cfg +++ b/setup.cfg @@ -99,7 +99,6 @@ test = pytest-faulthandler pytest-flake8 h5py>=2.10; platform_system=="Linux" - h5py>=2.10; python_version<'3.11' objgraph [options.package_data]