Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-7741

Missed incompatible logging changes in Python + migrate meas_astrom

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_astrom
    • Labels:
      None
    • Templates:
    • Story Points:
      1
    • Team:
      Data Facility

      Description

      Since DM-6999, Python codes using Task/CmdLineTask are converted to use lsst.log instead of lsst.pex.logging. Codes like self.log.log(self.log.WARN, "messages") should be changed to self.log.warn("messages") because that API is no longer supported. Many places need such changes but were missed. This ticket is to go through the Python codes of pipe_*, ip_*, meas_* and obs_* and correct them.

        Issue Links

          Activity

          Hide
          hchiang2 Hsin-Fang Chiang added a comment -

          I wondered how many more I missed, so I checked for the same mistakes through the Python codes in python/lsst/*/*/*py of these packages:
          ip_isr, pipe_base, pipe_tasks, pipe_drivers,
          obs_lsstSim, obs_decam, obs_sdss, obs_subaru, obs_test, obs_cfht, meas_astrom, meas_algorithms, meas_base, meas_deblender, meas_modelfit, meas_extensions_psfex, meas_extensions_photometryKron, meas_extensions_shapeHSM, meas_extensions_simpleShape, meas_mosaic, meas_extensions_convolved, meas_extensions_ngmix

          Found one in meas_algorithms; four in obs_lsstSim; two in meas_astrom. meas_algorithms is almost done in DM-7670 so I think I'll leave that one to DM-7670.

          Skipping ip_diffim: In ip_diffim dipoleFitTask.py, a few classes defines its own self.log to be a pex.logging object. That is outside the Task framework so mix-and-match there should not be a problem. So I'm deferring those to a later ticket, as it might make more sense to coordinate transition in dipoleFitTask with other parts of the code in ip_diffim. meas_astrom may be such a case too but it's less clear there.

          Show
          hchiang2 Hsin-Fang Chiang added a comment - I wondered how many more I missed, so I checked for the same mistakes through the Python codes in python/lsst/*/*/*py of these packages: ip_isr, pipe_base, pipe_tasks, pipe_drivers, obs_lsstSim, obs_decam, obs_sdss, obs_subaru, obs_test, obs_cfht, meas_astrom, meas_algorithms, meas_base, meas_deblender, meas_modelfit, meas_extensions_psfex, meas_extensions_photometryKron, meas_extensions_shapeHSM, meas_extensions_simpleShape, meas_mosaic, meas_extensions_convolved, meas_extensions_ngmix Found one in meas_algorithms; four in obs_lsstSim; two in meas_astrom. meas_algorithms is almost done in DM-7670 so I think I'll leave that one to DM-7670 . Skipping ip_diffim: In ip_diffim dipoleFitTask.py, a few classes defines its own self.log to be a pex.logging object. That is outside the Task framework so mix-and-match there should not be a problem. So I'm deferring those to a later ticket, as it might make more sense to coordinate transition in dipoleFitTask with other parts of the code in ip_diffim. meas_astrom may be such a case too but it's less clear there.
          Hide
          hchiang2 Hsin-Fang Chiang added a comment -

          meas_algorithms has been fixed in DM-7670.

          Lauren MacArthur would you mind reviewing this? I started with only searching for the old API self.log.log(self.log.WARN, "messages") but also fixed a few others if I see them. I converted all logging in meas_astrom to the new framework. Some little changes in obs_lsstSim , pipe_tasks and pipe_drivers. Should have found most of them back in DM-6999; sorry for the troubles in your large run!

          Pending Jenkins at https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py3/16550//console

          Show
          hchiang2 Hsin-Fang Chiang added a comment - meas_algorithms has been fixed in DM-7670 . Lauren MacArthur would you mind reviewing this? I started with only searching for the old API self.log.log(self.log.WARN, "messages") but also fixed a few others if I see them. I converted all logging in meas_astrom to the new framework. Some little changes in obs_lsstSim , pipe_tasks and pipe_drivers . Should have found most of them back in DM-6999 ; sorry for the troubles in your large run! Pending Jenkins at https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py3/16550//console
          Hide
          lauren Lauren MacArthur added a comment -

          While I won't claim to have gone through and done a thorough search myself for any other instances that may linger, yours sound pretty exhaustive and all these changes look good.

          Show
          lauren Lauren MacArthur added a comment - While I won't claim to have gone through and done a thorough search myself for any other instances that may linger, yours sound pretty exhaustive and all these changes look good.
          Hide
          hchiang2 Hsin-Fang Chiang added a comment -

          Thank you for your review! Changes are merged.

          I cannot claim all inconsistent instances have been fixed and am almost certain there must be some left in some dark corners. Now that I know a bit better what to check I'll do my best as the transition continues..

          To confirmed that pex_logging is out of meas_astrom:
          https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py2/16709//console

          Show
          hchiang2 Hsin-Fang Chiang added a comment - Thank you for your review! Changes are merged. I cannot claim all inconsistent instances have been fixed and am almost certain there must be some left in some dark corners. Now that I know a bit better what to check I'll do my best as the transition continues.. To confirmed that pex_logging is out of meas_astrom: https://ci.lsst.codes/job/stack-os-matrix/label=centos-7,python=py2/16709//console

            People

            • Assignee:
              hchiang2 Hsin-Fang Chiang
              Reporter:
              hchiang2 Hsin-Fang Chiang
              Reviewers:
              Lauren MacArthur
              Watchers:
              Hsin-Fang Chiang, Lauren MacArthur
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development