spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
561 stars 167 forks source link

remove end in ami log messages #8568

Closed braingram closed 3 months ago

braingram commented 3 months ago

Several log calls in the ami code use an end keyword argument that is not supported. As the formatting only occurs if the log is to be displayed this only appears if the log level is changed (to force the message to be formatted).

import logging, numpy as np, jwst.ami.leastsqnrm
img = np.arange(1, 5, dtype='f4').reshape((2, 2))
model = np.arange(8, dtype='f4').reshape((2, 2, 2))
dq = np.zeros((2, 2), dtype='int32')
dq[1, 1] = 1
jwst.ami.leastsqnrm.log.setLevel(logging.DEBUG)
jwst.ami.leastsqnrm.matrix_operations(img, model, dqm=dq)

Results in an error, with this PR no errors are seen.

The error can be seen during some test runs (depending on test order): https://github.com/spacetelescope/stpipe/actions/runs/9445531594/job/26087417184#step:10:189

Checklist for PR authors (skip items if you don't have permissions or they are not applicable)

braingram commented 3 months ago

Shoot. I had an "un-pushed" commit that fixed a few more of the log messages. I just pushed it to this PR.

braingram commented 3 months ago

Regtests running at: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1538/

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 58.63%. Comparing base (dba65ae) to head (e085e6f). Report is 384 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8568 +/- ## ======================================= Coverage 58.63% 58.63% ======================================= Files 391 391 Lines 39081 39081 ======================================= Hits 22914 22914 Misses 16167 16167 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

braingram commented 3 months ago

Regression tests passed with no errors.