Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused code causing sonar scan violation #8471

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/tests_regression.yml
Original file line number Diff line number Diff line change
@@ -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"}}'



6 changes: 2 additions & 4 deletions jwst/wfss_contam/tests/test_observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
assert np.isclose(np.sum(counts_1), np.sum(counts_3), rtol=1/sens_waves.size)
Loading