Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add romanisim to downstream #530

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'CI'
name: test

on:
push:
Expand All @@ -17,9 +17,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DATA_PATH: /tmp/data

jobs:
check:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
Expand Down
34 changes: 27 additions & 7 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Downstream
name: test downstream packages

on:
workflow_dispatch:
Expand All @@ -16,9 +16,6 @@ on:
tags:
- '*'

env:
DATA_PATH: /tmp/data

# Only cancel in-progress jobs or runs for the current workflow
# This cancels the already triggered workflows for a specific PR without canceling
# other instances of this workflow (other PRs, scheduled triggers, etc) when something
Expand All @@ -32,12 +29,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: data_path
run: echo "path=${{ env.DATA_PATH }}" >> $GITHUB_OUTPUT
run: echo "path=${{ runner.temp }}/data" >> $GITHUB_OUTPUT
outputs:
data_path: ${{ steps.data_path.outputs.path }}

crds_contexts:
uses: ./.github/workflows/contexts.yml
uses: spacetelescope/crds/.github/workflows/contexts.yml@master

jwst:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
Expand Down Expand Up @@ -67,6 +64,29 @@ jobs:
envs: |
- linux: py311-test-romancal-cov-xdist

romanisim_data:
needs: [ environment ]
uses: spacetelescope/romanisim/.github/workflows/retrieve_cache.yml@main
with:
cache_path: ${{ needs.environment.outputs.data_path }}

romanisim:
needs: [ romanisim_data ]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
libraries: |
brew:
- eigen
- fftw
setenv: |
WEBBPSF_PATH: ${{ needs.romanisim_data.outputs.cache_path }}/webbpsf-data/
GALSIM_CAT_PATH: ${{ needs.romanisim_data.outputs.cache_path }}/galsim_data/real_galaxy_catalog_23.5_example.fits
FFTW_DIR: /opt/homebrew/opt/fftw/lib/
cache-path: ${{ needs.romanisim_data.outputs.cache_path }}
cache-key: ${{ needs.romanisim_data.outputs.cache_key }}
envs: |
- linux: py311-test-romanisim-cov-xdist

astropy:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
if: (github.repository == 'spacetelescope/gwcs' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Downstream CI')))
Expand All @@ -86,4 +106,4 @@ jobs:
default_python: '3.11'
envs: |
- linux: ndcube
- linux: dkist
- linux: dkist
18 changes: 18 additions & 0 deletions .github/workflows/romanisim_data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: download and cache romanisim data

on:
schedule:
- cron: "42 4 * * 3"
workflow_dispatch:
inputs:
webbpsf_minimal:
description: minimal WebbPSF dataset
type: boolean
required: false
default: true

jobs:
download_romanisim_data:
uses: spacetelescope/romanisim/.github/workflows/retrieve_cache.yml@main
with:
minimal: ${{ github.event_name != 'workflow_dispatch' && true || inputs.webbpsf_minimal }}
12 changes: 9 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,24 @@ description =
run tests
jwst: of JWST pipeline
romancal: of Romancal pipeline
romanisim: of Romanisim image simulation
dev: with the latest developer version of key dependencies
pyargs: with --pyargs on installed package
warnings: treating warnings as errors
cov: with coverage
xdist: using parallel processing
passenv =
pass_env =
HOME
GITHUB_*
TOXENV
CI
CODECOV_*
DISPLAY
jwst,romancal: CRDS_*
romanisim,romancal: WEBBPSF_PATH
romanisim: GALSIM_CAT_PATH
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

Expand All @@ -70,10 +76,9 @@ deps =
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.*
pass_env =
jwst,romancal: CRDS_*
commands_pre =
dev: pip install -r requirements-dev.txt -U --upgrade-strategy eager
pip freeze
Expand All @@ -84,6 +89,7 @@ commands =
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 Down