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

Fix deprecation warnings from PropertyList/Set.get

    XMLWordPrintable

    Details

      Description

      Fix deprecation warnings from PropertySet.get and PropertyList.get by switching to getScalar or getArray

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment - - edited

            pipe_tasks was also changed but is not showing up here. The pull request is https://github.com/lsst/pipe_tasks/pull/206

            Changes:

            • Update daf_base so that PropertySet.asArray can return a PropertySet. This proved necessary for a few of the conversions.
            • Update all other packages to use getScalar or getArray instead of the deprecated get on PropertySet and PropertyList
            • Fix pep8 errors in a few packages and enable automatic flake8 testing; this required adding a minimal unit test in a few places
            • Remove python 2 support in a few packages
            Show
            rowen Russell Owen added a comment - - edited pipe_tasks was also changed but is not showing up here. The pull request is https://github.com/lsst/pipe_tasks/pull/206 Changes: Update daf_base so that PropertySet.asArray can return a PropertySet . This proved necessary for a few of the conversions. Update all other packages to use getScalar or getArray instead of the deprecated get on PropertySet and PropertyList Fix pep8 errors in a few packages and enable automatic flake8 testing; this required adding a minimal unit test in a few places Remove python 2 support in a few packages
            Hide
            yusra Yusra AlSayyad added a comment -

            All done! You already fixed and rebased the few problems found while the review as in process. 

            • Thank you for adding the basic import unit tests! So much better than nothing!
            • Thank you for modifying the examples too
            • Not relevant to this ticket, but do you know why is the default empty list OK here? scripts.BasicSConscript.tests(pyList=[])
            • I didn’t check for completeness. How did you find instances of metadata.get?

             

            Show
            yusra Yusra AlSayyad added a comment - All done! You already fixed and rebased the few problems found while the review as in process.  Thank you for adding the basic import unit tests! So much better than nothing! Thank you for modifying the examples too Not relevant to this ticket, but do you know why is the default empty list OK here? scripts.BasicSConscript.tests(pyList=[]) I didn’t check for completeness. How did you find instances of metadata.get?  
            Hide
            tjenness Tim Jenness added a comment -

            An empty list is how you tell sconsUtils to let pytest use auto detection of test files. This was necessary because pyList=None already meant something.

            Show
            tjenness Tim Jenness added a comment - An empty list is how you tell sconsUtils to let pytest use auto detection of test files. This was necessary because pyList=None already meant something.
            Hide
            rowen Russell Owen added a comment -

            Thank you for the helpful review. Sorry that was so much work (possibly more work than fixing the issue).

            I filed DM-14876 because the github integration (Development section) has been off for this ticket. One branch (pipe_tasks) never showed up and the list of commits and pull requests is missing a few more items.

            Show
            rowen Russell Owen added a comment - Thank you for the helpful review. Sorry that was so much work (possibly more work than fixing the issue). I filed DM-14876 because the github integration (Development section) has been off for this ticket. One branch (pipe_tasks) never showed up and the list of commits and pull requests is missing a few more items.

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Yusra AlSayyad
              Watchers:
              Russell Owen, Tim Jenness, Yusra AlSayyad
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.