Skip to content

Commit

Permalink
Merge branch 'main' into scikit-image_ellipses
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett authored May 1, 2024
2 parents 9b2cba5 + fa14c81 commit 95443c5
Show file tree
Hide file tree
Showing 76 changed files with 10,385 additions and 4,009 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# automatically requests pull request reviews for files matching the given pattern; the last match takes precedence

* @spacetelescope/stcal-maintainers
50 changes: 25 additions & 25 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
documentation:
- 'docs/**/*'
- any: [ '*.rst', '!CHANGES.rst' ]
- '*.md'
- '.readthedocs.yaml'
- 'LICENSE'
- "docs/**/*"
- any: ["*.rst", "!CHANGES.rst"]
- "*.md"
- ".readthedocs.yaml"
- "LICENSE"

installation:
- 'pyproject.toml'
- 'setup.*'
- 'requirements-*.txt'
- 'MANIFEST.in'
- "pyproject.toml"
- "setup.*"
- "requirements-*.txt"
- "MANIFEST.in"

# --------------------------------------- testing ---------------------------------------

automation:
- '.github/**'
- '.bandit.yaml'
- '.codecov.yml'
- ".github/**"
- ".bandit.yaml"
- ".codecov.yml"

testing:
- '**/tests/**'
- '.github/workflows/ci*.yml'
- 'conftest.py'
- "**/tests/**"
- ".github/workflows/ci*.yml"
- "conftest.py"

# --------------------------------------- modules ---------------------------------------

dark_current:
- '**/*dark_current*'
- '**/*dark_current*/**'
- "**/*dark_current*"
- "**/*dark_current*/**"

jump:
- '**/*jump*'
- '**/*jump*/**'
- "**/*jump*"
- "**/*jump*/**"

linearity:
- '**/*linearity*'
- '**/*linearity*/**'
- "**/*linearity*"
- "**/*linearity*/**"

ramp_fitting:
- '**/*ramp_fitting*'
- '**/*ramp_fitting*/**'
- "**/*ramp_fitting*"
- "**/*ramp_fitting*/**"

saturation:
- '**/*saturation*'
- '**/*saturation*/**'
- "**/*saturation*"
- "**/*saturation*/**"
6 changes: 5 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
<!-- If this PR closes a JIRA ticket, make sure the title starts with the JIRA issue number,
<!-- If this PR closes a JIRA ticket, make sure the title starts with the JIRA issue number,
for example JP-1234: <Fix a bug> -->

Resolves [JP-nnnn](https://jira.stsci.edu/browse/JP-nnnn)
Resolves [RCAL-nnnn](https://jira.stsci.edu/browse/RCAL-nnnn)

<!-- If this PR closes a GitHub issue, reference it here by its number -->

Closes #

<!-- describe the changes comprising this PR here -->

This PR addresses ...

**Checklist**

- [ ] added entry in `CHANGES.rst` (either in `Bug Fixes` or `Changes to API`)
- [ ] updated relevant tests
- [ ] updated relevant documentation
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: build

on:
release:
types: [released]
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1
with:
upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }}
targets: |
# Linux wheels
- cp3*-manylinux_x86_64
# MacOS wheels
- cp3*-macosx_x86_64
# Until we have arm64 runners, we can't automatically test arm64 wheels
- cp3*-macosx_arm64
sdist: true
secrets:
pypi_token: ${{ secrets.PYPI_PASSWORD_STSCI_MAINTAINER }}
17 changes: 0 additions & 17 deletions .github/workflows/cancel_workflows.yml

This file was deleted.

18 changes: 13 additions & 5 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ on:
pull_request:
types: [labeled, unlabeled, opened, synchronize, reopened]

# 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
# within that PR re-triggers this CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ensure_changelog:
name: Verify that a changelog entry exists for this pull request
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: grep -P '\[[^\]]*#${{github.event.number}}[,\]]' CHANGES.rst
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog-entry-needed') }}
- uses: scientific-python/action-check-changelogfile@0.2
env:
CHANGELOG_FILENAME: CHANGES.rst
CHECK_MILESTONE: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117 changes: 33 additions & 84 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,97 +1,46 @@
name: CI
name: test

on:
push:
branches:
- main
- '*x'
- "*x"
tags:
- '*'
- "*"
pull_request:
branches:
- main
schedule:
# Weekly Monday 9AM build
- cron: "0 9 * * 1"
# * is a special character in YAML so you have to quote this string
- cron: '0 9 * * 1'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: ${{ matrix.toxenv }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toxenv: [ check-style, check-security, check-build ]
python-version: [ '3.x' ]
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: pyproject.toml
- run: pip install tox
- run: tox -e ${{ matrix.toxenv }}
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: check-style
- linux: check-build
test:
name: ${{ matrix.toxenv }} (Python ${{ matrix.python-version }}, ${{ matrix.os }})
needs: [ check ]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toxenv: [ test-xdist ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
os: [ ubuntu-latest, macos-latest ]
include:
- toxenv: test-cov
os: ubuntu-latest
python-version: '3.11'
- toxenv: test-numpy122
os: ubuntu-latest
python-version: '3.10'
- toxenv: test-numpy121
os: ubuntu-latest
python-version: '3.10'
- toxenv: test-numpy122
os: ubuntu-latest
python-version: '3.9'
- toxenv: test-numpy121
os: ubuntu-latest
python-version: '3.9'
- toxenv: test-numpy120
os: ubuntu-latest
python-version: '3.9'
- toxenv: test-numpy122
os: ubuntu-latest
python-version: '3.8'
- toxenv: test-numpy121
os: ubuntu-latest
python-version: '3.8'
- toxenv: test-numpy120
os: ubuntu-latest
python-version: '3.8'
- toxenv: test-jwst-xdist-cov
os: ubuntu-latest
python-version: '3.x'
- toxenv: test-romancal-xdist-cov
os: ubuntu-latest
python-version: '3.x'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install tox
- run: tox -e ${{ matrix.toxenv }}
- if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unit
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: py310-oldestdeps-cov-xdist
- linux: py310-xdist
- linux: py311-xdist
- linux: py312-cov-xdist
coverage: codecov
- macos: py311-xdist
test_downstream:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
setenv: |
CRDS_PATH: /tmp/data/crds_cache
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
envs: |
- linux: py311-jwst-cov-xdist
- linux: py311-romancal-cov-xdist
20 changes: 20 additions & 0 deletions .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: test on schedule

on:
schedule:
# Weekly Monday midnight build
- cron: "0 0 * * 1"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
if: (github.repository == 'spacetelescope/stcal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run scheduled tests')))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- macos: py310-xdist
- macos: py311-xdist
2 changes: 1 addition & 1 deletion .github/workflows/label_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
- uses: actions/labeler@v4
if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
repo-token: "${{ secrets.GITHUB_TOKEN }}"
16 changes: 0 additions & 16 deletions .github/workflows/publish-to-pypi.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/tests_devdeps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: test with development versions

on:
push:
branches:
- main
- '*x'
tags:
- '*'
pull_request:
schedule:
# Weekly Monday 9AM build
# * is a special character in YAML so you have to quote this string
- cron: '0 9 * * 1'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
if: (github.repository == 'spacetelescope/stcal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run devdeps tests')))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: py310-devdeps-xdist
- linux: py311-devdeps-xdist
- linux: py312-devdeps-xdist
- linux: py3-devdeps-xdist
test_downstream:
if: (github.repository == 'spacetelescope/stcal' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'run devdeps tests')))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
setenv: |
CRDS_PATH: /tmp/data/crds_cache
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
envs: |
- linux: py3-jwst-devdeps-xdist
- linux: py3-romancal-devdeps-xdist
Loading

0 comments on commit 95443c5

Please sign in to comment.