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

Port ctrl_provenance to Python 3 and update unit tests for pytest

    XMLWordPrintable

    Details

      Attachments

        Issue Links

          Activity

          Hide
          tjenness Tim Jenness added a comment -

          Ok. It looks like daf_persistence::next is not actually an iterator and should not be confused as one. It's job is just to move a pointer to the next result and not to return the result so it should never be used like a Python iterator. The name is a major source of confusion when switching from C++ to Python3. It looks like I should revert DM-7226 and ctrl_provenance should go back to using the next() method and not assuming it's at all related to the Python next.

          Show
          tjenness Tim Jenness added a comment - Ok. It looks like daf_persistence::next is not actually an iterator and should not be confused as one. It's job is just to move a pointer to the next result and not to return the result so it should never be used like a Python iterator. The name is a major source of confusion when switching from C++ to Python3. It looks like I should revert DM-7226 and ctrl_provenance should go back to using the next() method and not assuming it's at all related to the Python next .
          Hide
          tjenness Tim Jenness added a comment -

          Ideally we'd deprecate next and rename it to nextResult in daf_persistence.

          Show
          tjenness Tim Jenness added a comment - Ideally we'd deprecate next and rename it to nextResult in daf_persistence .
          Hide
          rowen Russell Owen added a comment -

          As per Tim Jenness request I changed next(self._globalDb) to self._globalDb.next() in dc3.py. I also fixed flake8 warnings and errors and standardized imports. I'm ready to merge after a Jenkins run.

          Show
          rowen Russell Owen added a comment - As per Tim Jenness request I changed next(self._globalDb) to self._globalDb.next() in dc3.py . I also fixed flake8 warnings and errors and standardized imports. I'm ready to merge after a Jenkins run.
          Hide
          rowen Russell Owen added a comment -

          I also filed DM-7323 as per Tim Jenness suggestion about renaming DbStorage.next

          Show
          rowen Russell Owen added a comment - I also filed DM-7323 as per Tim Jenness suggestion about renaming DbStorage.next
          Hide
          rowen Russell Owen added a comment - - edited

          Jenkins Python 2 passed and Steve Pietrowicz enhanced the documentation for ProvenanceSetup.addWorkflowRecordCmd. Merged to master.

          Show
          rowen Russell Owen added a comment - - edited Jenkins Python 2 passed and Steve Pietrowicz enhanced the documentation for ProvenanceSetup.addWorkflowRecordCmd . Merged to master.

            People

            Assignee:
            rowen Russell Owen
            Reporter:
            rowen Russell Owen
            Reviewers:
            Steve Pietrowicz
            Watchers:
            Andy Salnikov, Nate Pease [X] (Inactive), Russell Owen, Steve Pietrowicz, Tim Jenness
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.