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

Warnings being raised by test suite #150

Open
WilliamJamieson opened this issue Mar 8, 2023 · 0 comments
Open

Warnings being raised by test suite #150

WilliamJamieson opened this issue Mar 8, 2023 · 0 comments

Comments

@WilliamJamieson
Copy link
Collaborator

Several warnings are being raised by the test suite. If they are the result of intentional actions in the test suite, then they should be captured or filtered by the offending tests. Otherwise the root causes of the warnings should be resolved.

The current warnings include:

tests/test_dark_current.py::test_frame_averaging[DEEP8-3-8-12-20-20]
tests/test_dark_current.py::test_frame_averaging[DEEP2-3-2-18-20-20]
tests/test_dark_current.py::test_frame_averaging[MEDIUM8-3-8-2-20-20]
tests/test_dark_current.py::test_frame_averaging[MEDIUM2-3-2-8-20-20]
tests/test_dark_current.py::test_frame_averaging[SHALLOW4-3-4-1-20-20]
tests/test_dark_current.py::test_frame_averaging[SHALLOW2-3-2-3-20-20]
  /Users/runner/work/stcal/stcal/src/stcal/dark_current/dark_sub.py:224: RuntimeWarning: Mean of empty slice.
    avg_dark.data[group] = dark_data.data[start:end].mean(axis=0)
  
  tests/test_dark_current.py::test_frame_averaging[DEEP8-3-8-12-20-20]
  tests/test_dark_current.py::test_frame_averaging[DEEP2-3-2-18-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM8-3-8-2-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM2-3-2-8-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW4-3-4-1-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW2-3-2-3-20-20]
    /Users/runner/work/stcal/stcal/.tox/test-xdist/lib/python3.10/site-packages/numpy/core/_methods.py:184: RuntimeWarning: invalid value encountered in divide
      ret = um.true_divide(
  
  tests/test_dark_current.py::test_frame_averaging[DEEP8-3-8-12-20-20]
  tests/test_dark_current.py::test_frame_averaging[DEEP2-3-2-18-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM8-3-8-2-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM2-3-2-8-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW4-3-4-1-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW2-3-2-3-20-20]
    /Users/runner/work/stcal/stcal/.tox/test-xdist/lib/python3.10/site-packages/numpy/core/fromnumeric.py:34[64](https://github.com/spacetelescope/stcal/actions/runs/4341653456/jobs/7581529592#step:5:65): RuntimeWarning: Mean of empty slice.
      return _methods._mean(a, axis=axis, dtype=dtype,
  
  tests/test_dark_current.py::test_frame_averaging[DEEP8-3-8-12-20-20]
  tests/test_dark_current.py::test_frame_averaging[DEEP2-3-2-18-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM8-3-8-2-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM2-3-2-8-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW4-3-4-1-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW2-3-2-3-20-20]
    /Users/runner/work/stcal/stcal/.tox/test-xdist/lib/python3.10/site-packages/numpy/core/_methods.py:192: RuntimeWarning: invalid value encountered in divide
      ret = ret.dtype.type(ret / rcount)
  
  tests/test_twopoint_difference.py::test_10grps_nocr_2pixels_sigma0
  tests/test_twopoint_difference.py::test_2group
  tests/test_twopoint_difference.py::test_first_last_3group
  tests/test_twopoint_difference.py::test_first_last_4group
    /Users/runner/work/stcal/stcal/src/stcal/jump/twopoint_difference.py:154: RuntimeWarning: All-NaN slice encountered
      max_ratio = np.nanmax(ratio, axis=0)
  
  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant