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

Cleanup error reporting and docstrings in cameraGeom.utils

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Story Points:
      0.5
    • Sprint:
      AP S18-2, AP S18-3, AP S18-4, AP S18-5
    • Team:
      Alert Production

      Description

      The docstring for cameraGeom.utils.makeImageFromCamera could be cleaned up (return type specified, binSize and other parameters clarified), and the "Unable to fit image for detector" warning message should include the exact exception message that was raised (figuring out the nature of the problem is difficult otherwise). That print() should probably also be turned into a log message.

        Attachments

          Activity

          Hide
          Parejkoj John Parejko added a comment -

          Paul Price giving you another review here: I think you originally wrote most of this, so you should be able to tell me if my guesses at types, etc. are correct or not. While I was cleaning it up, I decided I might as well just numpydoc-ify the whole thing...

          The commits are split up pretty well, so you can look at the numpydoc conversion stuff separately from the other changes.

          Jenkins run, though that probably doesn't exercise most of the changes: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/27725/pipeline

          Show
          Parejkoj John Parejko added a comment - Paul Price giving you another review here: I think you originally wrote most of this, so you should be able to tell me if my guesses at types, etc. are correct or not. While I was cleaning it up, I decided I might as well just numpydoc-ify the whole thing... The commits are split up pretty well, so you can look at the numpydoc conversion stuff separately from the other changes. Jenkins run, though that probably doesn't exercise most of the changes: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/27725/pipeline
          Hide
          price Paul Price added a comment -

          I didn't write most of this; it's Robert Lupton.

          Commit messages need a LOT more info.
          Some numpydoc types need to be fixed.
          Numpydoc "Returns" format is wrong.

          Show
          price Paul Price added a comment - I didn't write most of this; it's Robert Lupton . Commit messages need a LOT more info. Some numpydoc types need to be fixed. Numpydoc "Returns" format is wrong.
          Hide
          Parejkoj John Parejko added a comment -

          Ok, I cleaned up as much as I could. Several of your comments I didn't know how to deal with, because I didn't know what the original docstrings meant or they didn't specify something. Please take a look at my responses.

          I'll tidy up the commit messages after I rebase everything.

          Show
          Parejkoj John Parejko added a comment - Ok, I cleaned up as much as I could. Several of your comments I didn't know how to deal with, because I didn't know what the original docstrings meant or they didn't specify something. Please take a look at my responses. I'll tidy up the commit messages after I rebase everything.
          Hide
          Parejkoj John Parejko added a comment -

          Post-review jenkins run, though I don't think this has any tests, nor does any jenkins-live code actually exercise it:

          https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/27826/pipeline

          Show
          Parejkoj John Parejko added a comment - Post-review jenkins run, though I don't think this has any tests, nor does any jenkins-live code actually exercise it: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/27826/pipeline
          Hide
          Parejkoj John Parejko added a comment -

          I believe I've fixed and/or responded to all of your comments. In the cases where I couldn't figure out the correct thing, I made a best guess from context. I've rebased and squashed everything and cleaned up the commit messages.

          We should probably officially decide how to manage docstring conversions in the future, because sometimes it's relatively trivial to guess, and sometimes it's very much not.

          Show
          Parejkoj John Parejko added a comment - I believe I've fixed and/or responded to all of your comments. In the cases where I couldn't figure out the correct thing, I made a best guess from context. I've rebased and squashed everything and cleaned up the commit messages. We should probably officially decide how to manage docstring conversions in the future, because sometimes it's relatively trivial to guess, and sometimes it's very much not.
          Hide
          Parejkoj John Parejko added a comment -

          Thank you for the review, Paul Price.

          Merged and done.

          Show
          Parejkoj John Parejko added a comment - Thank you for the review, Paul Price . Merged and done.

            People

            Assignee:
            Parejkoj John Parejko
            Reporter:
            Parejkoj John Parejko
            Reviewers:
            Paul Price
            Watchers:
            John Parejko, John Swinbank, Paul Price, Simon Krughoff
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.