diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 5246b3ba5..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: @@ -24,18 +24,21 @@ 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 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 +47,7 @@ jobs: - linux: py310-test-pyside63 - linux: py310-test-pyqt63-all - linux: py310-test-pyqt64-all + - linux: py311-test-pyqt514 # Documentation build - linux: py38-docs-pyqt514 @@ -51,11 +55,12 @@ 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 + - macos: py311-test-pyqt515 # Test some configurations on Windows - windows: py38-test-pyqt514 @@ -63,6 +68,7 @@ jobs: # Test against latest developer versions of some packages - linux: py310-test-pyqt515-dev-all + - linux: py311-test-pyqt64-dev allowed_failures: needs: initial_checks @@ -70,18 +76,26 @@ jobs: with: coverage: codecov display: true - # Linux PyQt 5.15 and 6.3 installations require apt-getting xcb and EGL deps libraries: | apt: - '^libxcb.*-dev' - libxkbcommon-x11-dev - libegl1-mesa + - libopenblas-dev + - 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 + # 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-pyside64 + - windows: py311-test-pyqt515 # Windows docs build - windows: py310-docs-pyqt515 @@ -95,7 +109,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 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: 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/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 diff --git a/setup.cfg b/setup.cfg index 3daf2d728..dca3d4fef 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,7 @@ test = pytest-cov pytest-faulthandler pytest-flake8 + h5py>=2.10; platform_system=="Linux" objgraph [options.package_data] 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