Skip to content

Commit

Permalink
Merge branch 'main' into ci/separate_devdeps
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett authored Nov 1, 2023
2 parents be55937 + e404ec8 commit 7757e9e
Show file tree
Hide file tree
Showing 18 changed files with 2,123 additions and 641 deletions.
47 changes: 5 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,53 +32,16 @@ jobs:
- linux: py39-oldestdeps-cov-xdist
- linux: py39-xdist
- linux: py310-xdist
- linux: py311-xdist
- macos: py311-xdist
- linux: py3-xdist-cov
- linux: py311-cov-xdist
coverage: codecov
data:
name: retrieve WebbPSF data
runs-on: ubuntu-latest
outputs:
data_path: ${{ steps.data.outputs.path }}
webbpsf_path: ${{ steps.webbpsf_path.outputs.path }}
data_hash: ${{ steps.data_hash.outputs.hash }}
steps:
# webbpsf:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: data
run: |
echo "path=/tmp/data" >> $GITHUB_OUTPUT
echo "webbpsf_url=https://stsci.box.com/shared/static/n1fealx9q0m6sdnass6wnyfikvxtc0zz.gz" >> $GITHUB_OUTPUT
- run: |
mkdir -p tmp/data/
mkdir -p ${{ steps.data.outputs.path }}
- run: wget ${{ steps.data.outputs.webbpsf_url }} -O tmp/minimal-webbpsf-data.tar.gz
- run: tar -xzvf tmp/minimal-webbpsf-data.tar.gz -C tmp/data/
- id: data_hash
run: echo "hash=${{ hashFiles( 'tmp/data' ) }}" >> $GITHUB_OUTPUT
- run: mv tmp/data/* ${{ steps.data.outputs.path }}
- uses: actions/cache@v3
with:
path: ${{ steps.data.outputs.path }}
key: data-${{ steps.data_hash.outputs.hash }}
- id: webbpsf_path
run: echo "path=${{ steps.data.outputs.path }}/webbpsf-data" >> $GITHUB_OUTPUT
- macos: py311-xdist
test_downstream:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
needs: [ data ]
with:
setenv: |
WEBBPSF_PATH: ${{ needs.data.outputs.webbpsf_path }}
CRDS_PATH: /tmp/crds_cache
CRDS_PATH: /tmp/data/crds_cache
CRDS_CLIENT_RETRY_COUNT: 3
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20
WEBBPSF_PATH: ${{ needs.data.outputs.data_path }}/webbpsf-data
cache-path: ${{ needs.data.outputs.data_path }}
cache-key: data-${{ needs.data.outputs.data_hash }}
envs: |
- linux: py3-jwst-cov-xdist
- linux: py3-romancal-cov-xdist
- linux: py311-jwst-cov-xdist
- linux: py311-romancal-cov-xdist
1 change: 0 additions & 1 deletion .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ jobs:
- windows: py310-xdist
- windows: py311-xdist
- windows: py3-xdist
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ dmypy.json

# Cython debug symbols
cython_debug/
src/stcal/ramp_fitting/ols_cas22/*.c
src/stcal/ramp_fitting/ols_cas22/*.cpp
src/stcal/ramp_fitting/ols_cas22/*.html

# setuptools-scm generated module
src/stcal/_version.py
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

- Added ``alignment`` sub-package. [#179]

ramp_fitting
------------

- Refactor Casertano, et.al, 2022 uneven ramp fitting and incorporate the matching
jump detection algorithm into it. [#215]

Changes to API
--------------

Expand Down
30 changes: 26 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,31 @@
Options.docstrings = True
Options.annotate = False

extensions = [Extension('stcal.ramp_fitting.ols_cas22',
['src/stcal/ramp_fitting/ols_cas22.pyx'],
include_dirs=[np.get_include()],
extra_compile_args=['-std=c99'])]
extensions = [
Extension(
'stcal.ramp_fitting.ols_cas22._core',
['src/stcal/ramp_fitting/ols_cas22/_core.pyx'],
include_dirs=[np.get_include()],
language='c++'
),
Extension(
'stcal.ramp_fitting.ols_cas22._fixed',
['src/stcal/ramp_fitting/ols_cas22/_fixed.pyx'],
include_dirs=[np.get_include()],
language='c++'
),
Extension(
'stcal.ramp_fitting.ols_cas22._pixel',
['src/stcal/ramp_fitting/ols_cas22/_pixel.pyx'],
include_dirs=[np.get_include()],
language='c++'
),
Extension(
'stcal.ramp_fitting.ols_cas22._fit_ramps',
['src/stcal/ramp_fitting/ols_cas22/_fit_ramps.pyx'],
include_dirs=[np.get_include()],
language='c++'
),
]

setup(ext_modules=cythonize(extensions))
220 changes: 0 additions & 220 deletions src/stcal/ramp_fitting/ols_cas22.pyx

This file was deleted.

4 changes: 4 additions & 0 deletions src/stcal/ramp_fitting/ols_cas22/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from ._fit_ramps import fit_ramps, RampFitOutputs
from ._core import Parameter, Variance, Diff, RampJumpDQ

__all__ = ['fit_ramps', 'RampFitOutputs', 'Parameter', 'Variance', 'Diff', 'RampJumpDQ']
Loading

0 comments on commit 7757e9e

Please sign in to comment.