Skip to content

Commit

Permalink
add webbpsf and poppy to base environment
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Oct 18, 2022
1 parent babad23 commit 920968c
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.fits filter=lfs diff=lfs merge=lfs -text
*.asdf filter=lfs diff=lfs merge=lfs -text
tests/data/* filter=lfs diff=lfs merge=lfs -text
23 changes: 22 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ defaults:
run:
shell: bash -l {0}

env:
DATA_DIRECTORY: /home/runner/work/stenv/stenv/tests/data

jobs:
build:
name: build ${{ github.event.inputs.constraint }} Python ${{ matrix.python }} environment on ${{ matrix.os }}
Expand Down Expand Up @@ -69,7 +72,7 @@ jobs:
strategy:
fail-fast: false
matrix:
package: [ acstools, asdf, ccdproc, costools, jwst, reftools, synphot, wfpc2tools ]
package: [ acstools, asdf, ccdproc, costools, jwst, poppy, reftools, synphot, wfpc2tools, webbpsf ]
os: [ ubuntu-latest, macos-latest ]
python: [ '3.8', '3.9', '3.10' ]
include:
Expand All @@ -85,16 +88,27 @@ jobs:
env:
CRDS_SERVER_URL: https://jwst-crds.stsci.edu
pytest_args: '--slow'
- package: poppy
extras: [ test ]
#- package: pysynphot
# extras: [ test ]
- package: reftools
extras: [ test ]
- package: synphot
extras: [ test ]
- package: wfpc2tools
- package: webbpsf
extras: [ test ]
commands: [
'curl -L https://stsci.box.com/shared/static/ntb71b3uusf1kzgf9bss0hzbreoja5gg.gz -o webbpsf-data.gz',
'tar -xvzf webbpsf-data.gz -C $DATA_DIRECTORY',
]
data: true
steps:
- run: echo "CONSTRAINT=$(if [ -z ${{ github.event.inputs.constraint }} ]; then echo latest; else echo ${{ github.event.inputs.constraint }}; fi)" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
lfs: true
- run: echo "HOME=$(echo /home/runner)" >> $GITHUB_ENV
if: runner.os == 'Linux'
- run: echo "HOME=$(echo /Users/runner)" >> $GITHUB_ENV
Expand Down Expand Up @@ -133,11 +147,17 @@ jobs:
env:
CRDS_SERVER_URL: ${{ matrix.env.CRDS_SERVER_URL }}
CRDS_PATH: ${{ env.CRDS_PATH }}
- uses: actions/cache@v3
if: matrix.data != ''
with:
path: 'tests/data/'
key: data-${{ hashFiles('tests/data/*') }}
- run: pytest -n auto ${{ matrix.pytest_args }} --pyargs ${{ matrix.package }}
env:
CRDS_SERVER_URL: ${{ matrix.env.CRDS_SERVER_URL }}
CRDS_PATH: ${{ env.CRDS_PATH }}
PYSYN_CDBS: ${{ env.PYSYN_CDBS }}
WEBBPSF_PATH: ${{ env.DATA_DIRECTORY }}/webbpsf-data
unit_tests_from_source:
name: run `${{ matrix.package }}` unit tests from source in ${{ github.event.inputs.constraint }} Python ${{ matrix.python }} environment on ${{ matrix.os }}
needs: [ build ]
Expand Down Expand Up @@ -227,6 +247,7 @@ jobs:
CRDS_SERVER_URL: ${{ matrix.env.CRDS_SERVER_URL }}
CRDS_PATH: ${{ env.CRDS_PATH }}
PYSYN_CDBS: ${{ env.PYSYN_CDBS }}
WEBBPSF_PATH: ${{ matrix.env.WEBBPSF_PATH }}
smoke_tests:
name: run `${{ matrix.package }}` smoke tests in ${{ github.event.inputs.constraint }} Python ${{ matrix.python }} environment on ${{ matrix.os }}
needs: [ build ]
Expand Down
2 changes: 2 additions & 0 deletions stenv-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- jupyter
- git+https://github.com/spacetelescope/jwst.git
- git+https://github.com/spacetelescope/nictools.git
- git+https://github.com/spacetelescope/poppy.git
- git+https://github.com/spacetelescope/pysynphot.git
- reftools
- sphinx
Expand All @@ -33,3 +34,4 @@ dependencies:
- git+https://github.com/spacetelescope/synphot_refactor.git
- git+https://github.com/spacetelescope/wfc3tools.git
- git+https://github.com/spacetelescope/wfpc2tools.git
- git+https://github.com/spacetelescope/webbpsf.git
2 changes: 2 additions & 0 deletions stenv-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- jupyter
- jwst>=1.6.2
- nictools
- poppy
- pysynphot
- reftools
- sphinx
Expand All @@ -33,3 +34,4 @@ dependencies:
- synphot
- wfc3tools
- wfpc2tools
- webbpsf
2 changes: 2 additions & 0 deletions stenv-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- jupyter
- jwst>=1.8,<1.9
- nictools>=1.1,<1.2
- poppy>=1.0.3,<1.1
- pysynphot>=2.0,<2.1
- reftools>=2.1,<2.2
- sphinx
Expand All @@ -33,3 +34,4 @@ dependencies:
- synphot>=1.1,<1.2
- wfc3tools>=1.4,<1.5
- wfpc2tools>=1.0,<1.1
- webbpsf>=1.1.0,<1.2

0 comments on commit 920968c

Please sign in to comment.