Skip to content

Commit

Permalink
Merge branch 'main' into line_matching
Browse files Browse the repository at this point in the history
  • Loading branch information
tepickering committed Nov 1, 2023
2 parents 298a4fe + 648c861 commit 553d6f2
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 34 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/cron-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
python: '3.11'
tox_env: 'linkcheck'
- os: ubuntu-latest
python: '3.11'
tox_env: 'py310-test-datadeps-devdeps'
python: '3.12'
tox_env: 'py312-test-devdeps'
- os: ubuntu-latest
python: '3.11'
tox_env: 'py310-test-datadeps-predeps'
python: '3.12'
tox_env: 'py312-test-predeps'

steps:
- name: Check out repository
Expand All @@ -47,12 +47,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Print Python, pip, setuptools, and tox versions
run: |
python -c "import sys; print(f'Python {sys.version}')"
python -c "import pip; print(f'pip {pip.__version__}')"
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')"
python -c "import tox; print(f'tox {tox.__version__}')"
- name: Test with tox
run: |
tox -e ${{ matrix.tox_env }}
22 changes: 8 additions & 14 deletions .github/workflows/tox-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ jobs:
include:
- os: ubuntu-latest
python: '3.10'
tox_env: 'py310-test'
- os: ubuntu-latest
python: '3.11'
tox_env: 'py311-test-cov'
- os: macos-latest
python: '3.11'
tox_env: 'py311-test-devdeps'
tox_env: 'py310-test-cov'
- os: ubuntu-latest
python: '3.11'
tox_env: 'py311-test'
- os: ubuntu-latest
python: '3.11'
python: '3.12'
tox_env: 'py312-test'
- os: macos-latest
python: '3.12'
tox_env: 'py312-test-devdeps'
- os: ubuntu-latest
python: '3.12'
tox_env: 'codestyle'
- os: ubuntu-latest
python: '3.10'
Expand All @@ -63,12 +63,6 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Print Python, pip, setuptools, and tox versions
run: |
python -c "import sys; print(f'Python {sys.version}')"
python -c "import pip; print(f'pip {pip.__version__}')"
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')"
python -c "import tox; print(f'tox {tox.__version__}')"
- name: Test with tox
run: |
tox -e ${{ matrix.tox_env }}
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ requires = ["setuptools",
"cython"]

build-backend = 'setuptools.build_meta'

[tool.pytest.ini_options]

filterwarnings = ["ignore::DeprecationWarning:datetime",]
27 changes: 17 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
[tox]
envlist =
py{310,311}-test{,-devdeps}{,-cov}
py{310,311}-test-numpy{120,121,122,123}
py{310,311}-test-astropy{lts,rc}
py{310,311,312}-test{,-devdeps,-predeps}{,-cov}
build_docs
codestyle
requires =
setuptools >= 30.3.0
setuptools
pip >= 19.3.1
isolated_build = true

Expand All @@ -16,7 +14,8 @@ isolated_build = true
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI

setenv =
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
py312: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple

# Run the tests in a temporary directory to make sure that we don't import
# this package from the source tree
Expand All @@ -35,36 +34,44 @@ description =
devdeps: with the latest developer version of key dependencies
oldestdeps: with the oldest supported version of key dependencies
cov: enable remote data and measure test coverage
numpy122: with numpy 1.22.*
numpy123: with numpy 1.23.*
astropylts: with the latest astropy LTS

# The following provides some specific pinnings for key packages
deps =

numpy120: numpy==1.20.*
numpy121: numpy==1.21.*
numpy122: numpy==1.22.*
numpy123: numpy==1.23.*

astropy51: astropy==5.1.*
astropylts: astropy==5.1.*

devdeps: numpy>=0.0.dev0
devdeps: git+https://github.com/astropy/astropy.git#egg=astropy
devdeps: scipy>=0.0.dev0
devdeps: astropy>=0.0.dev0
devdeps: git+https://github.com/astropy/specutils.git#egg=specutils
devdeps: git+https://github.com/astropy/photutils.git#egg=photutils

oldestdeps: numpy==1.22
oldestdeps: numpy==1.22.4
oldestdeps: astropy==5.1
oldestdeps: scipy==1.9.0
oldestdeps: matplotlib==3.5
oldestdeps: photutils==1.0.0
oldestdeps: specutils==1.9.1

# Currently need dev astropy with python 3.12 as well
py312: astropy>=0.0.dev0

# The following indicates which extras_require from setup.cfg will be installed
extras =
test: test
build_docs: docs

commands =
# Force numpy-dev after matplotlib downgrades it (https://github.com/matplotlib/matplotlib/issues/26847)
devdeps: python -m pip install --pre --upgrade --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
# Maybe we also have to do this for scipy?
devdeps: python -m pip install --pre --upgrade --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy
pip freeze
!cov: pytest --pyargs specreduce {toxinidir}/docs {posargs}
cov: pytest --pyargs specreduce {toxinidir}/docs --cov specreduce --cov-config={toxinidir}/setup.cfg --remote-data {posargs}
Expand Down

0 comments on commit 553d6f2

Please sign in to comment.