Skip to content

Commit

Permalink
Fix FITS file read as ascii, rebased and added PyQt6/PySide6 envs + deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dhomeier committed Oct 17, 2022
1 parent 635c77f commit 1a42691
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -44,34 +48,44 @@ 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
coverage: false
- 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
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
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'
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion glue/core/data_factories/astropy_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1a42691

Please sign in to comment.