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

          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.

          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 .
          tjenness Tim Jenness added a comment -

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

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

          As per tjenness 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.

          rowen Russell Owen added a comment - As per tjenness 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.

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

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

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

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

          People

            rowen Russell Owen
            rowen Russell Owen
            Steve Pietrowicz
            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.