Skip to content

Commit

Permalink
Merge pull request #66 from astrofrog/fix-casa
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog authored Feb 25, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents b0c598c + 1067dc0 commit 347cb41
Showing 4 changed files with 9 additions and 16 deletions.
3 changes: 1 addition & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -26,12 +26,11 @@ jobs:
libraries: {}
coverage: 'false'

- linux: py36-test-casa
- linux: py37-test
- linux: py38-test
- linux: py39-test
- linux: py310-test-dev

- macos: py36-test-casa
- windows: py37-test
- macos: py38-test
- windows: py39-test-dev
12 changes: 5 additions & 7 deletions glue_astronomy/io/spectral_cube/tests/test_spectral_cube.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
import pytest
from astropy.utils.data import get_pkg_data_filename
from astropy.utils.data import get_pkg_data_filename, get_pkg_data_path
from glue.qglue import parse_data
from spectral_cube import SpectralCube

@@ -12,8 +11,7 @@ def test_identifier_fits():


def test_identifier_casa():
pytest.importorskip('casatools')
assert is_spectral_cube(get_pkg_data_filename('data/cube_3d.image'))
assert is_spectral_cube(get_pkg_data_path('data/cube_3d.image'))


def test_reader_fits():
@@ -38,9 +36,9 @@ def test_reader_fits_4d_fullstokes():


def test_reader_casa():
pytest.importorskip('casatools')
data = read_spectral_cube(get_pkg_data_filename('data/cube_3d.image'))
assert isinstance(data['STOKES I'], np.ndarray)
from dask import array as dask_array
data = read_spectral_cube(get_pkg_data_path('data/cube_3d.image'))
assert isinstance(data['STOKES I'], dask_array.Array)
assert data.shape == (2, 3, 4)


4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -13,15 +13,15 @@ long_description_content_type = text/x-rst
[options]
zip_safe = False
packages = find:
python_requires = >=3.6
python_requires = >=3.7
setup_requires =
setuptools_scm
install_requires =
astropy>=4.0
glue-core>=1.0
regions>=0.4
specutils>=0.7
spectral-cube>=0.5.0
spectral-cube>=0.6.0

[options.extras_require]
docs =
6 changes: 1 addition & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[tox]
envlist = py{36,37,38,39,310}-{test,docs}-{casa,dev}
envlist = py{36,37,38,39,310}-{test,docs}-{,dev}
requires = pip >= 18.0
setuptools >= 30.3.0
indexserver =
NRAO = https://casa-pip.nrao.edu/repository/pypi-group/simple

[testenv]
passenv =
@@ -13,8 +11,6 @@ changedir =
deps =
dev: git+https://github.com/astropy/astropy
dev: git+https://github.com/astropy/specutils
casa: :NRAO:casatools
casa: :NRAO:casatasks
extras =
test: test
docs: docs

0 comments on commit 347cb41

Please sign in to comment.