Skip to content

Commit

Permalink
Update tox envs
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Nov 23, 2024
1 parent bd9ba38 commit 374d6b6
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
with:
envs: |
- linux: py310
- linux: py310-numpy125
- linux: py311
pytest-results-summary: true
- macos: py311
Expand All @@ -40,3 +39,4 @@ jobs:
pytest-results-summary: true
- linux: py312
- linux: py3-dev
- linux: py310-oldestdeps
15 changes: 7 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ authors = [
{ name = "gwcs developers", email = "[email protected]" },
]
dependencies = [
"asdf >= 2.8.1",
"astropy >= 5.3",
"numpy",
"scipy",
"asdf >= 3.3.0",
"astropy >= 6.0",
"numpy>=1.24",
"scipy>=1.14.1",
"asdf_wcs_schemas >= 0.4.0",
"asdf-astropy >= 0.2.0",
"asdf-astropy >= 0.5.0",
]
dynamic = [
"version",
Expand Down Expand Up @@ -46,15 +46,14 @@ docs = [
]
test = [
"ci-watson>=0.3.0",
"pytest>=4.6.0",
"pytest-astropy",
"pytest>=7.0.0",
"pytest-astropy>=0.11.0",
]

[build-system]
requires = [
"setuptools>=61.2",
"setuptools_scm[toml]>=3.4",
"wheel",
]
build-backend = "setuptools.build_meta"

Expand Down
8 changes: 3 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
git+https://github.com/asdf-format/asdf
git+https://github.com/asdf-format/asdf-standard

# Use weekly astropy dev build
--extra-index-url https://pypi.anaconda.org/astropy/simple astropy --pre

git+https://github.com/astropy/asdf-astropy
git+https://github.com/asdf-format/asdf-transform-schemas
git+https://github.com/asdf-format/asdf-coordinates-schemas
git+https://github.com/asdf-format/asdf-wcs-schemas

# Use Bi-weekly numpy/scipy dev builds
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
astropy>=0.0.dev0
pyerfa>=0.0.dev0

numpy>=0.0.dev0
scipy>=0.0.dev0
110 changes: 45 additions & 65 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[tox]
envlist =
check-{style,security,build}
test{,-dev}{,-pyargs,-cov}
test-numpy{123,125}
test{,-dev}{,-oldestdeps,-cov}{-jwst,-romancal,-romanisim,-specutils,-dkist,-ndcube}
build-{docs,dist}
requres =
tox-uv

# tox environments are constructed with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor:
Expand All @@ -13,6 +14,13 @@ envlist =
#
# tox -l -v
#
[main]
jwst_repo = https://github.com/spacetelescope/jwst.git
romancal_repo = https://github.com/spacetelescope/romancal.git
romanisim_repo = https://github.com/spacetelescope/romanisim.git
specutils_repo = https://github.com/astropy/specutils.git
dkist_repo = https://github.com/DKISTDC/dkist.git
ndcube_repo = https://github.com/sunpy/ndcube.git

[testenv:check-style]
description = check code style, e.g. with flake8
Expand Down Expand Up @@ -46,11 +54,15 @@ description =
jwst: of JWST pipeline
romancal: of Romancal pipeline
romanisim: of Romanisim image simulation
specutils: of Specutils
dkist: of DKIST
ndcube: of NDCube
dev: with the latest developer version of key dependencies
pyargs: with --pyargs on installed package
warnings: treating warnings as errors
oldestdeps: with the oldest supported version of key dependencies
cov: with coverage
xdist: using parallel processing
allowlist_externals =
jwst,romancal,romanisim,specutils,dkist,ndcube: git
pass_env =
HOME
GITHUB_*
Expand All @@ -64,32 +76,45 @@ pass_env =
romanisim: FFTW_DIR
romanisim: LIBRARY_PATH
set_env =
dev: 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

args_are_paths = false
change_dir = pyargs: {env:HOME}
dev: UV_INDEX = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
dev: UV_INDEX_STRATEGY = unsafe-any-match
change_dir =
jwst,romancal,romanisim,specutils,dkist,ndcube: {env_tmp_dir}
extras =
test
alldeps: all
uv_resolution =
oldestdeps: lowest-direct
deps =
xdist: pytest-xdist
cov: pytest-cov
jwst: jwst[test] @ git+https://github.com/spacetelescope/jwst.git
romancal: romancal[test] @ git+https://github.com/spacetelescope/romancal.git
romanisim: romanisim[test] @ git+https://github.com/spacetelescope/romanisim.git
numpy123: numpy==1.23.*
numpy125: numpy==1.25.*
jwst: jwst[test] @ git+{[main]jwst_repo}
romancal: romancal[test] @ git+{[main]romancal_repo}
romanisim: romanisim[test] @ git+{[main]romanisim_repo}
specutils: specutils[test] @ git+{[main]specutils_repo}
dkist: dkist[tests] @ git+{[main]dkist_repo}
ndcube: ndcube[dev] @ git+{[main]ndcube_repo}
dev: -r requirements-dev.txt
commands_pre =
dev: pip install -r requirements-dev.txt -U --upgrade-strategy eager
pip freeze
{list_dependencies_command}
jwst: git clone -n --depth=1 --filter=blob:none {[main]jwst_repo} target_repo
romancal: git clone -n --depth=1 --filter=blob:none {[main]romancal_repo} target_repo
romanisim: git clone -n --depth=1 --filter=blob:none {[main]romanisim_repo} target_repo
specutils: git clone -n --depth=1 --filter=blob:none {[main]specutils_repo} target_repo
dkist: git clone -n --depth=1 --filter=blob:none {[main]dkist_repo} target_repo
ndcube: git clone -n --depth=1 --filter=blob:none {[main]ndcube_repo} target_repo

jwst,romancal,romanisim,specutils,dkist,ndcube: git --git-dir={env_tmp_dir}/target_repo/.git checkout HEAD pyproject.toml
commands =
pytest \
warnings: -W error \
jwst,romancal,romanisim,specutils,dkist,ndcube: --config-file={env_tmp_dir}/pyproject.toml --pyargs \
jwst: jwst --ignore-glob=timeconversion --ignore-glob=associations --ignore-glob=scripts --show-capture=no \
romancal: romancal \
romanisim: romanisim \
specutils: specutils \
dkist: dkist --benchmark-skip \
ndcube: ndcube \
xdist: -n auto \
pyargs: {toxinidir}/docs --pyargs gwcs \
jwst: --pyargs jwst --ignore-glob=timeconversion --ignore-glob=associations --ignore-glob=scripts --show-capture=no \
romancal: --pyargs romancal \
romanisim: --pyargs romanisim \
cov: --cov=. --cov-config=pyproject.toml --cov-report=term-missing --cov-report=xml \
{posargs}

Expand All @@ -106,48 +131,3 @@ deps =
build
commands =
python -m build .

[testenv:specutils]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'gwcs @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/astropy/specutils.git
pip install -e specutils[test]
pip install -r {env_tmp_dir}/requirements.txt
pip list
commands =
pytest specutils

[testenv:dkist]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'gwcs @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/DKISTDC/dkist.git
pip install -e dkist[tests]
pip install -r {env_tmp_dir}/requirements.txt
pip list
commands =
pytest dkist --benchmark-skip

[testenv:ndcube]
change_dir = {env_tmp_dir}
allowlist_externals =
git
bash
extras =
commands_pre =
bash -c "pip freeze -q | grep 'gwcs @' > {env_tmp_dir}/requirements.txt"
git clone https://github.com/sunpy/ndcube.git
pip install -e ndcube[all,tests]
pip install -r {env_tmp_dir}/requirements.txt
pip freeze
commands =
pytest ndcube

0 comments on commit 374d6b6

Please sign in to comment.