diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index a952e2b06..2a3fc7fd6 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -32,15 +32,15 @@ jobs: toxargs: -v toxposargs: --remote-data=astropy - - name: Python 3.11 (Windows) + - name: Python 3.12 (Windows) os: windows-latest - python: 3.11 - toxenv: py311-test + python: '3.12' + toxenv: py312-test - - name: Python 3.11 (MacOS X) + - name: Python 3.12 (MacOS X) os: macos-latest - python: 3.11 - toxenv: py311-test + python: '3.12' + toxenv: py312-test - name: Python 3.10 os: ubuntu-latest @@ -59,20 +59,15 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - - name: Install language-pack-de and tzdata - if: startsWith(matrix.os, 'ubuntu') - run: | - sudo apt-get update - sudo apt-get install language-pack-de tzdata graphviz - name: Install Python dependencies - run: python -m pip install --upgrade tox codecov + run: python -m pip install --upgrade tox - name: Run tests run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }} # TODO: Do we need --gcov-glob "*cextern*" ? @@ -91,25 +86,20 @@ jobs: include: - name: (Allowed Failure) Python 3.12 with remote data and dev version of key dependencies os: ubuntu-latest - python: '3.12-dev' + python: '3.12' toxenv: py312-test-devdeps toxposargs: --remote-data=any steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - - name: Install language-pack-de and tzdata - if: startsWith(matrix.os, 'ubuntu') - run: | - sudo apt-get update - sudo apt-get install language-pack-de tzdata - name: Install Python dependencies - run: python -m pip install --upgrade tox codecov + run: python -m pip install --upgrade tox - name: Run tests run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }} diff --git a/docs/analysis.rst b/docs/analysis.rst index 6e4fcbfef..d6f4f6166 100644 --- a/docs/analysis.rst +++ b/docs/analysis.rst @@ -93,7 +93,7 @@ of a spectrum. Both are demonstrated below: >>> line_flux(noisy_gaussian, SpectralRegion(7*u.GHz, 3*u.GHz)) # doctest:+FLOAT_CMP >>> line_flux(noisy_gaussian).to(u.erg * u.cm**-2 * u.s**-1) # doctest:+FLOAT_CMP - + These line_flux measurements also include uncertainties if the spectrum itself has uncertainties: @@ -102,7 +102,7 @@ has uncertainties: >>> flux = line_flux(noisy_gaussian) >>> flux.uncertainty.to(u.erg * u.cm**-2 * u.s**-1) # doctest:+FLOAT_CMP - + >>> line_flux(noisy_gaussian, SpectralRegion(7*u.GHz, 3*u.GHz)) # doctest:+FLOAT_CMP diff --git a/docs/spectral_cube.rst b/docs/spectral_cube.rst index e7daf2f8b..42fd2bd26 100644 --- a/docs/spectral_cube.rst +++ b/docs/spectral_cube.rst @@ -59,7 +59,7 @@ Print the contents of 3 spectral axis points in a 3x3 spaxel array: [[0.5599331 , 0.554316 , 0.5618426 ], [0.5763055 , 0.5668046 , 0.5774939 ], - [0.59571505, 0.60118765, 0.59942234]]] 1e-17 erg / (Angstrom cm2 s spaxel)>, spectral_axis=, spectral_axis= [[0.65954393, 0.9084677 , 0.9965009 ], [0.6255246 , 0.84401435, 0.9930112 ], - [0.59066033, 0.762025 , 0.9361185 ]]] 1e-17 erg / (Angstrom cm2 s spaxel)>, spectral_axis=, spectral_axis==3.8 -setup_requires = setuptools_scm install_requires = numpy>=1.19 scipy>=1.3 @@ -28,11 +27,8 @@ install_requires = [options.extras_require] test = pytest-astropy - pytest-cov tox matplotlib - graphviz - coverage spectral-cube jwst = stdatamodels>=1.1.0 @@ -57,8 +53,8 @@ doctest_plus = enabled doctest_norecursedirs = */__init__.py doctest_subpackage_requires = - docs/analysis.rst = astropy<5.3 - docs/spectral_cube.rst = astropy<5.3 + docs/analysis.rst = astropy>=5.3 + docs/spectral_cube.rst = astropy>=5.3 text_file_format = rst addopts = --color=yes --doctest-rst asdf_schema_root = specutils/io/asdf/schemas diff --git a/tox.ini b/tox.ini index ac4559cf2..805fbc64e 100644 --- a/tox.ini +++ b/tox.ini @@ -3,16 +3,13 @@ envlist = py{38,39,310,311,312}-test{,-devdeps,-oldestdeps,-predeps}{,-cov,-external} linkcheck codestyle -requires = - setuptools >= 30.3.0 - pip >= 19.3.1 isolated_build = true [testenv] # Suppress display of matplotlib plots generated during docs build setenv = MPLBACKEND=agg - devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/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 @@ -38,6 +35,7 @@ description = # The following provides some specific pinnings for key packages deps = + cov: pytest-cov oldestdeps: numpy==1.19.* oldestdeps: scipy==1.3.* @@ -55,6 +53,7 @@ deps = devdeps: numpy>=0.0.dev0 devdeps: scipy>=0.0.dev0 devdeps: matplotlib>=0.0.dev0 + devdeps: pyerfa>=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