diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fde2ce6e..806b19b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: 'CI' +name: test on: push: @@ -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 diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index f15f1ec1..66a7d1ae 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -1,4 +1,4 @@ -name: Downstream +name: test downstream packages on: workflow_dispatch: @@ -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 @@ -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 @@ -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'))) @@ -86,4 +106,4 @@ jobs: default_python: '3.11' envs: | - linux: ndcube - - linux: dkist \ No newline at end of file + - linux: dkist diff --git a/.github/workflows/romanisim_data.yml b/.github/workflows/romanisim_data.yml new file mode 100644 index 00000000..aba64646 --- /dev/null +++ b/.github/workflows/romanisim_data.yml @@ -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 }} diff --git a/tox.ini b/tox.ini index f5e2ae74..902b40f1 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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 @@ -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}