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

Check that all the columns used by PhotoCalTask are actually present

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_photocal
    • Labels:
      None
    • Team:
      Data Release Production

      Description

      When you create a PhotoCalTask it sometimes adds a column to the schema, which it then blithely uses in its run method even if it is not actually present in the input tables.

      Please add a check that the column is really there.

        Attachments

          Activity

          Hide
          rowen Russell Owen added a comment -

          I find the code very confusing. Existing issues:

          • The name self.output is too vague to give the user any idea what it – it would be clearer if it was called self.outputField.
          • I have very little idea what a Match is, even after trying to figure it out from C++ source code.

          As a result I don't really know what Match.second is, and what the test you added actually does:

          matches[0].second.getSchema().find(self.output)

          The code undoubtedly does what you say it does, but some code comments would be a big help.

          Show
          rowen Russell Owen added a comment - I find the code very confusing. Existing issues: The name self.output is too vague to give the user any idea what it – it would be clearer if it was called self.outputField. I have very little idea what a Match is, even after trying to figure it out from C++ source code. As a result I don't really know what Match.second is, and what the test you added actually does: matches[0].second.getSchema().find(self.output) The code undoubtedly does what you say it does, but some code comments would be a big help.
          Hide
          rhl Robert Lupton added a comment -
          The name self.output is too vague to give the user any idea what it – it would be clearer if it was called self.outputField.

          That's internal so yes, I'll change that.

          I have very little idea what a Match is, even after trying to figure it out from C++ source code.
          As a result I don't really know what Match.second is, and what the test you added actually does:

          Already improved as part of the task docs cleanup on master (see http://lsst-web.ncsa.illinois.edu/~buildbot/doxygen/x_masterDoxyDoc/classlsst_1_1meas_1_1photocal_1_1_photo_cal_1_1_photo_cal_task.html#meas_photocal_photocal_IO)

          matches[0].second.getSchema().find(self.output)
          The code undoubtedly does what you say it does, but some code comments would be a big help.

          Added a comment.

          Merged to master

          Show
          rhl Robert Lupton added a comment - The name self.output is too vague to give the user any idea what it – it would be clearer if it was called self.outputField. That's internal so yes, I'll change that. I have very little idea what a Match is, even after trying to figure it out from C++ source code. As a result I don't really know what Match.second is, and what the test you added actually does: Already improved as part of the task docs cleanup on master (see http://lsst-web.ncsa.illinois.edu/~buildbot/doxygen/x_masterDoxyDoc/classlsst_1_1meas_1_1photocal_1_1_photo_cal_1_1_photo_cal_task.html#meas_photocal_photocal_IO ) matches[0].second.getSchema().find(self.output) The code undoubtedly does what you say it does, but some code comments would be a big help. Added a comment. Merged to master

            People

            Assignee:
            rhl Robert Lupton
            Reporter:
            rhl Robert Lupton
            Reviewers:
            Russell Owen
            Watchers:
            Robert Lupton, Russell Owen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.