diff --git a/.github/workflows/tests_regression.yml b/.github/workflows/tests_regression.yml new file mode 100644 index 0000000000..b4f9061ec0 --- /dev/null +++ b/.github/workflows/tests_regression.yml @@ -0,0 +1,27 @@ +name: run regression tests + +on: + pull_request: + # types: + # - review_requested + branches: + - master + schedule: + # Nightly runs at 12am Midnight + - cron: "0 0 * * *" + +jobs: + test: + runs-on: ubuntu-latest + steps: + - run: | + curl --request POST https://api.github.com/repos/spacetelescope/RegressionTests/actions/workflows/jwst.yml/dispatches \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + -H "Content-Type:application/json" \ + -H "User-Agent: SpaceTelescopeGithubBot" \ + -H "Authorization: Bearer ${{ secrets.REGTEST_API_TOKEN }}" \ + --data '{ "ref": "main", "inputs": { "git_repository": "${{ github.event.pull_request.head.repo }}", "git_ref": "${{ github.event.pull_request.head.ref }}", "package": "romancal"}}' + + + diff --git a/jwst/wfss_contam/tests/test_observations.py b/jwst/wfss_contam/tests/test_observations.py index 71228f6479..82d3cdbfac 100644 --- a/jwst/wfss_contam/tests/test_observations.py +++ b/jwst/wfss_contam/tests/test_observations.py @@ -92,21 +92,19 @@ def test_disperse_oversample_same_result(grism_wcs, segmentation_map): wmin, wmax = np.min(sens_waves), np.max(sens_waves) sens_resp = np.ones(100) seg_wcs = segmentation_map.meta.wcs - 0, (300, 500), 2, False, xoffset = 2200 yoffset = 1000 - xs, ys, areas, lams_out, counts_1, ID = dispersed_pixel( x0, y0, width, height, lams, flxs, order, wmin, wmax, sens_waves, sens_resp, seg_wcs, grism_wcs, ID, naxis, oversample_factor=1, extrapolate_sed=False, xoffset=xoffset, yoffset=yoffset) - + xs, ys, areas, lams_out, counts_3, ID = dispersed_pixel( x0, y0, width, height, lams, flxs, order, wmin, wmax, sens_waves, sens_resp, seg_wcs, grism_wcs, ID, naxis, oversample_factor=3, extrapolate_sed=False, xoffset=xoffset, yoffset=yoffset) - assert np.isclose(np.sum(counts_1), np.sum(counts_3), rtol=1/sens_waves.size) \ No newline at end of file + assert np.isclose(np.sum(counts_1), np.sum(counts_3), rtol=1/sens_waves.size)