Skip to content

Commit

Permalink
Merge pull request #199 from karllark/update_astropy6
Browse files Browse the repository at this point in the history
Update tox and init
  • Loading branch information
karllark authored Nov 28, 2023
2 parents 3d878d5 + c39d341 commit f023231
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 25 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/tox-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
# For example -- os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]

# Test python 3.6, 3.7, and 3.8 by default.
python-ver: [7, 8, 9, 10]
# Test python version 3.x
python-ver: [9, 10, 11]

# Specify which tox environments to test in this list.
# tox-env: [cov, alldeps, devdeps, astropylts]
Expand Down Expand Up @@ -74,14 +74,14 @@ jobs:
- name: Set up python for astropy lts test
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.9
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: |
tox -e py38-astropylts
tox -e py39-astropylts
# Coverage test
cov_test:
Expand All @@ -92,14 +92,14 @@ jobs:
- name: Set up python for coverage test
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Test with tox
run: |
tox -e py38-cov
tox -e py311-cov
- name: Upload coverage to codecov
uses: codecov/codecov-action@v1
with:
Expand All @@ -122,7 +122,7 @@ jobs:
- name: Set up Python to build docs with sphinx
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -142,7 +142,7 @@ jobs:
- name: Python codestyle check
uses: actions/setup-python@v1
with:
python-version: 3.8
python-version: 3.11
- name: Install base dependencies
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 6 additions & 2 deletions dust_extinction/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# needed for tests
from .version import version as __version__ # noqa: F401
from importlib.metadata import version as _version, PackageNotFoundError

try:
__version__ = _version(__name__)
except PackageNotFoundError:
pass
16 changes: 1 addition & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
[tox]
envlist =
py{38,39,310}-test{,-alldeps,-devdeps}{,-cov}
py{38,39,310}-test-numpy{120,121,122,123}
py{38,39,310}-test-astropy{40,50}
py{39,310,311}-test{,-alldeps}{,-cov}
build_docs
linkcheck
codestyle
requires =
setuptools >= 30.3.0
pip >= 19.3.1
isolated_build = true
indexserver =
NIGHTLY = https://pypi.anaconda.org/scipy-wheels-nightly/simple

[testenv]
# Suppress display of matplotlib plots generated during docs build
Expand All @@ -38,20 +34,10 @@ description =
devdeps: with the latest developer version of key dependencies
oldestdeps: with the oldest supported version of key dependencies
cov: and test coverage
numpy120: with numpy 1.20.*
numpy121: with numpy 1.21.*
numpy122: with numpy 1.22.*
numpy123: with numpy 1.23.*
astropylts: with the latest astropy LTS (currently v5.0)

# 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.*

astropylts: astropy==5.0.*

devdeps: PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scipy-wheels-nightly/simple
Expand Down

0 comments on commit f023231

Please sign in to comment.