Skip to content

Commit

Permalink
Merge pull request #1081 from pllim/debug-devdeps
Browse files Browse the repository at this point in the history
Debug devdeps
  • Loading branch information
pllim authored Sep 12, 2023
2 parents 8f22791 + 6f2b5d4 commit 1967512
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion specutils/tests/test_spectrum1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from astropy.nddata import StdDevUncertainty
from astropy.coordinates import SpectralCoord
from astropy.wcs import WCS
from numpy.testing import assert_allclose

from .conftest import remote_access
from ..spectra import Spectrum1D
Expand Down Expand Up @@ -123,7 +124,9 @@ def test_create_from_cube():

assert spec.flux.shape == (4,3,2)
assert spec.flux[3,2,1] == 23*u.Jy
assert np.all(spec.spectral_axis.value == np.exp(np.array([1,2])*w.wcs.cdelt[-1]/w.wcs.crval[-1])*w.wcs.crval[-1])
assert_allclose(
spec.spectral_axis.value,
np.exp(np.array([1, 2]) * w.wcs.cdelt[-1] / w.wcs.crval[-1]) * w.wcs.crval[-1])


def test_spectral_axis_conversions():
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ isolated_build = true
# Suppress display of matplotlib plots generated during docs build
setenv =
MPLBACKEND=agg
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple

# Pass through the following environment variables which may be needed for the CI
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI
Expand Down Expand Up @@ -53,6 +53,8 @@ deps =

devdeps: numpy>=0.0.dev0
devdeps: scipy>=0.0.dev0
devdeps: matplotlib>=0.0.dev0
devdeps: astropy>=0.0.dev0
devdeps: git+https://github.com/spacetelescope/gwcs.git
devdeps: git+https://github.com/asdf-format/asdf.git
devdeps: git+https://github.com/astropy/asdf-astropy.git
Expand All @@ -64,7 +66,6 @@ extras =
!oldestdeps: jwst

commands =
devdeps: pip install -i https://pypi.anaconda.org/astropy/simple astropy --pre --upgrade
pip freeze
!cov: pytest --pyargs specutils {toxinidir}/docs {posargs}
cov: pytest --pyargs specutils {toxinidir}/docs --cov specutils --cov-config={toxinidir}/setup.cfg {posargs}
Expand Down

0 comments on commit 1967512

Please sign in to comment.