-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #915 from spacetelescope/develop
Release V1.4.0 to stable
- Loading branch information
Showing
36 changed files
with
3,527 additions
and
1,049 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# downloads WebbPSF dataset and caches it to GitHub cache, | ||
# making a new cache for a new data version | ||
# the cache key is in the form `webbpsf-data-mini-1.3.0`, | ||
# `webbpsf-data-full-1.2.6`, etc. | ||
# | ||
# To provide your own test workflow with the WebbPSF dataset, | ||
# you should use this workflow to set up a cache in your repository, | ||
# and then use `retrieve_cache.yml` to retrieve that cache so you | ||
# don't have to download the entire dataset every time. | ||
# | ||
# to set up a cache of WebbPSF data in your own repository, | ||
# create a workflow like the following: | ||
# | ||
# # .github/workflows/download_webbpsf.yml | ||
# name: download and cache WebbPSF data | ||
# on: | ||
# schedule: | ||
# - cron: "0 0 * * 0" | ||
# jobs: | ||
# download_webbpsf: | ||
# uses: spacetelescope/webbpsf/.github/workflows/download_data.yml@develop | ||
# with: | ||
# minimal: true | ||
|
||
name: download and cache data | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
minimal: | ||
description: minimal dataset | ||
type: boolean | ||
required: false | ||
default: true | ||
outputs: | ||
version: | ||
value: ${{ jobs.download.outputs.version }} | ||
cache_path: | ||
value: ${{ jobs.download.outputs.cache_path }} | ||
cache_key: | ||
value: ${{ jobs.download.outputs.cache_key }} | ||
workflow_dispatch: | ||
inputs: | ||
minimal: | ||
description: minimal dataset | ||
type: boolean | ||
required: false | ||
default: true | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
release: | ||
|
||
env: | ||
DATA_URL: https://stsci.box.com/shared/static/qxpiaxsjwo15ml6m4pkhtk36c9jgj70k.gz | ||
MINIMAL_DATA_URL: https://stsci.box.com/shared/static/0dt9z6b927iqgtify2a4cvls9hvapi6k.gz | ||
|
||
jobs: | ||
download: | ||
name: download and cache WebbPSF data | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: wget ${{ (github.event_name == 'schedule' || github.event_name == 'release') && env.MINIMAL_DATA_URL || inputs.minimal && env.MINIMAL_DATA_URL || env.DATA_URL }} -O ${{ runner.temp }}/webbpsf-data.tar.gz | ||
- run: mkdir ${{ runner.temp }}/data/ | ||
- run: tar -xzvf ${{ runner.temp }}/webbpsf-data.tar.gz -C ${{ runner.temp }}/data/ | ||
- id: cache_path | ||
run: echo cache_path=${{ runner.temp }}/data/ >> $GITHUB_OUTPUT | ||
- id: version | ||
run: echo "version=$(cat ${{ steps.cache_path.outputs.cache_path }}/webbpsf-data/version.txt)" >> $GITHUB_OUTPUT | ||
- id: cache_key | ||
run: echo "cache_key=webbpsf-data-${{ (github.event_name == 'schedule' || github.event_name == 'release') && 'mini' || inputs.minimal && 'mini' || 'full' }}-${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT | ||
- uses: actions/cache/save@v4 | ||
with: | ||
path: ${{ runner.temp }}/data/ | ||
key: ${{ steps.cache_key.outputs.cache_key }} | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
cache_path: ${{ steps.cache_path.outputs.cache_path }} | ||
cache_key: ${{ steps.cache_key.outputs.cache_key }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# retrieves the latest cache key for WebbPSF data; | ||
# the cache key is in the form `webbpsf-data-mini-1.3.0`, | ||
# `webbpsf-data-full-1.2.6`, etc. | ||
# | ||
# to retrieve the WebbPSF data cache in your test workflow, | ||
# first create a cache of the dataset in your repository | ||
# (see `download_data.yml` for instructions), then | ||
# call this workflow as a needed job and use `actions/cache/restore` | ||
# to place the data in your test job: | ||
# | ||
# # .github/workflows/tests.yml | ||
# name: run tests | ||
# ... | ||
# jobs: | ||
# webbpsf_data_cache_key: | ||
# uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@develop | ||
# with: | ||
# minimal: true | ||
# tests: | ||
# needs: [ webbpsf_data_cache_key ] | ||
# steps: | ||
# ... | ||
# - name: retrieve WebbPSF data cache | ||
# uses: actions/cache/restore@v4 | ||
# with: | ||
# path: ${{ runner.temp }}/webbpsf-data | ||
# key: ${{ needs.webbpsf_data_cache_key.outputs.cache_key }} | ||
# ... | ||
|
||
name: retrieve latest data cache key | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
minimal: | ||
description: minimal dataset | ||
type: boolean | ||
required: false | ||
default: true | ||
outputs: | ||
version: | ||
value: ${{ jobs.retrieve_latest_cache_key.outputs.version }} | ||
cache_path: | ||
value: ${{ jobs.retrieve_latest_cache_key.outputs.cache_path }} | ||
cache_key: | ||
value: ${{ jobs.retrieve_latest_cache_key.outputs.cache_key }} | ||
|
||
jobs: | ||
retrieve_latest_cache_key: | ||
name: retrieve latest WebbPSF data cache key | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: retrieve latest data cache key | ||
id: latest_cache_key | ||
run: | | ||
# use actions/gh-actions-cache to allow filtering by key | ||
gh extension install actions/gh-actions-cache | ||
CACHE_KEY=$(gh actions-cache list -R ${{ github.repository }} --key webbpsf-data-${{ inputs.minimal && 'mini' || 'full' }}- --sort created-at | cut -f 1 | head -n 1) | ||
if [ "$CACHE_KEY" == '' ]; then exit 1; fi | ||
echo cache_key=$CACHE_KEY >> $GITHUB_OUTPUT | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- run: echo ${{ steps.latest_cache_key.outputs.cache_key }} | ||
- id: version | ||
run: echo "version=$(echo ${{ steps.latest_cache_key.outputs.cache_key }} | awk -F '-' '{print $4}')" >> $GITHUB_OUTPUT | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
cache_path: ${{ runner.temp }}/data/ | ||
cache_key: ${{ steps.latest_cache_key.outputs.cache_key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This CITATION.cff file was generated with cffinit. | ||
# Visit https://bit.ly/cffinit to generate yours today! | ||
|
||
cff-version: 1.2.0 | ||
title: WebbPSF | ||
message: >- | ||
If you use this software, please cite it using the | ||
metadata from this file. | ||
type: software | ||
authors: | ||
- given-names: Marshall | ||
family-names: Perrin | ||
affiliation: Space Telescope Science Institute | ||
orcid: 'https://orcid.org/0000-0002-3191-8151' | ||
- given-names: Marcio | ||
family-names: Melendez | ||
email: [email protected] | ||
affiliation: Space Telescope Science Institute | ||
orcid: 'https://orcid.org/0000-0001-8485-0325' | ||
- given-names: Shannon | ||
family-names: Osborne | ||
affiliation: Fred Hutchinson Cancer Center | ||
orcid: https://orcid.org/0009-0001-8609-1518' | ||
- given-names: Robel | ||
family-names: Geda | ||
affiliation: Princeton University | ||
orcid: 'https://orcid.org/0000-0003-1509-9966' | ||
- given-names: Bradley | ||
family-names: Sappington | ||
email: [email protected] | ||
affiliation: Space Telescope Science Institute | ||
orcid: 'https://orcid.org/0009-0008-2911-2555' | ||
- given-names: Charles-Philippe | ||
family-names: Lajoie | ||
affiliation: Space Telescope Science Institute | ||
orcid: 'https://orcid.org/0009-0003-3993-8338' | ||
- given-names: Joseph | ||
family-names: Long | ||
affiliation: Flatiron Institute | ||
orcid: 'https://orcid.org/0000-0003-1905-9443' | ||
- given-names: "O. Justin" | ||
family-names: "Otor" | ||
affiliation: "Otor" | ||
orcid: 'https://orcid.org/0000-0002-4679-5692' | ||
repository-code: 'https://github.com/spacetelescope/webbpsf' | ||
abstract: >- | ||
WebbPSF produces simulated PSFs for the James Webb Space | ||
Telescope, NASA's flagship infrared space telescope. | ||
WebbPSF can simulate images for any of the four science | ||
instruments plus the fine guidance sensor, including both | ||
direct imaging, coronagraphic, and spectroscopic modes. | ||
WebbPSF also supports simulating PSFs for the upcoming | ||
Nancy Grace Roman Space Telescope (formerly WFIRST), | ||
including its Wide Field Instrument and a preliminary | ||
version of the Coronagraph Instrument. | ||
license: BSD-3-Clause | ||
version: 1.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.