Skip to content

Commit

Permalink
add CI changes from spacetelescope#455
Browse files Browse the repository at this point in the history
  • Loading branch information
robelgeda committed Jul 23, 2021
1 parent f93c5fa commit fe345ea
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 76 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on: [push, pull_request]

jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:

- name: Coverage test in Python 3
os: ubuntu-latest
python: 3.8
toxenv: py38-poppydev-pysiafdev-cov

- name: Check for Sphinx doc build errors
os: ubuntu-latest
python: 3.8
toxenv: docbuild

- name: Try Astropy development version
os: ubuntu-latest
python: 3.8
toxenv: py38-astropydev-test

- name: Try latest versions of all dependencies
os: ubuntu-latest
python: 3.8
toxenv: py38-latest-test

- name: Try minimum supported versions
os: ubuntu-latest
python: 3.6
toxenv: py36-legacy36-test

- name: Try released POPPY and PySIAF
os: ubuntu-latest
python: 3.7
toxenv: py37-stable-test
continue-on-error: 'true'

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install Python dependencies
run: pip install tox tox-conda>=0.2

- name: Get WebbPSF Data
run: | # Get WebbPSF data files (just a subset of the full 250 MB!) and set up environment variable
wget https://stsci.box.com/shared/static/qcptcokkbx7fgi3c00w2732yezkxzb99.gz -O /tmp/minimal-webbpsf-data.tar.gz
tar -xzvf /tmp/minimal-webbpsf-data.tar.gz
echo "WEBBPSF_PATH=${{github.workspace}}/webbpsf-data" >> $GITHUB_ENV
- name: Check conda info
run: conda info

- name: Run tests
if: matrix.continue-on-error == null
run: tox -e ${{ matrix.toxenv }}

- name: Run tests and allow failures
if: matrix.continue-on-error
continue-on-error: true
run: tox -e ${{ matrix.toxenv }}

- name: Upload coverage to codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
26 changes: 26 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish to PyPI

on:
release:
types: [released]

jobs:
build:
name: Publish release to PyPI
env:
PYPI_USERNAME_STSCI_MAINTAINER: ${{ secrets.PYPI_USERNAME_STSCI_MAINTAINER }}
PYPI_PASSWORD_STSCI_MAINTAINER: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}
PYPI_USERNAME_OVERRIDE: ${{ secrets.PYPI_USERNAME_OVERRIDE }}
PYPI_PASSWORD_OVERRIDE: ${{ secrets.PYPI_PASSWORD_OVERRIDE }}
PYPI_TEST: ${{ secrets.PYPI_TEST }}
INDEX_URL_OVERRIDE: ${{ secrets.INDEX_URL_OVERRIDE }}
runs-on: ubuntu-latest
steps:

# Check out the commit containing this workflow file.
- name: checkout repo
uses: actions/checkout@v2

- name: custom action
uses: spacetelescope/action-publish_to_pypi@master
id: custom_action_0
71 changes: 0 additions & 71 deletions .travis.yml

This file was deleted.

14 changes: 9 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ WebbPSF: Simulated Point Spread Functions for the James Webb and Nancy Grace Rom
:target: https://pypi.python.org/pypi/webbpsf
:alt: Badge showing current released PyPI version

.. image:: https://travis-ci.org/spacetelescope/webbpsf.svg?branch=master
:target: https://travis-ci.org/spacetelescope/webbpsf
:alt: Badge showing continuous integration test status
.. image:: https://github.com/spacetelescope/webbpsf/workflows/CI/badge.svg?branch=develop
:target: https://github.com/spacetelescope/webbpsf/actions
:alt: Github Actions CI Status

.. image:: https://codecov.io/gh/spacetelescope/webbpsf/branch/master/graph/badge.svg
:target: https://codecov.io/gh/spacetelescope/webbpsf

.. |Documentation Status| image:: https://img.shields.io/readthedocs/webbpsf/latest.svg?logo=read%20the%20docs&logoColor=white&label=Docs&version=latest
:target: https://webbpsf.readthedocs.io/en/latest/
:alt: Documentation Status

.. image:: https://img.shields.io/badge/ascl-1504.007-blue.svg?colorB=262255
:target: http://ascl.net/1504.007

Expand All @@ -22,7 +26,7 @@ flagship infrared space telescope. WebbPSF can simulate images for any of the
four science instruments plus the fine guidance sensor, including both direct
imaging and coronagraphic modes.

WebbPSF also supports simulating PSFs for the upcoming Nancy Grace Roman Space Telescope (formerly WFIRST),
WebbPSF also supports simulating PSFs for the upcoming WFIRST,
including its Wide Field Instrument and a preliminary version of the Coronagraph Instrument.

Developed by Marshall Perrin, Joseph Long, Neil Zimmerman, Robel Geda, Shannon
Expand All @@ -33,4 +37,4 @@ Documentation can be found online at https://webbpsf.readthedocs.io
WebbPSF requires input data for its simulations, including optical path
difference (OPD) maps, filter transmission curves, and coronagraph Lyot mask
shapes. These data files are not included in this source distribution.
Please see the documentation to download the required data files.
Please see the documentation to download the required data files.

0 comments on commit fe345ea

Please sign in to comment.