Switch some C++ APIs that use pex_config information from Policy to PropertySet

Description

We are trying to remove usage of pex_policy in our code so that we can retire it. There are some places that use Policy to receive configuration information (via pexConfig.makePolicy) that I would like to change to use pexConfig.makePropertySet.

The routines in question are:

  • meas_algorithms.findCosmicRays (called from pipe_tasks and meas_algorithms)

  • ip_diffim (psf matching, kernels and regularization), seemingly only calling makePolicy internally.

The proposal is:

  1. Change the C++ to use PropertySet

  2. Update the stack code to use the new interface.

  3. Provide a wrapper Python function that looks for the old API usage and warns, before converting the Policy to PropertySet and proceeding.

  4. Formally deprecate pexConfig.makePolicy and the Policy usage for these APIs.

Checklist

Lucidchart Diagrams

Issue Matrix

hide

Activity

Tim Jenness 
August 27, 2019 at 3:26 PM

I've updated the text of the RFC to reflect my current understanding on implementation.

Tim Jenness 
August 24, 2019 at 2:33 AM

Representative PR for meas_algorithms: https://github.com/lsst/meas_algorithms/pull/178

Tim Jenness 
August 23, 2019 at 10:32 PM

I want to change the code to use PropertySet. I don't want to also have to have the C++ code lying around for Policy (nothing in our code will be calling it)

Krzysztof Findeisen 
August 23, 2019 at 10:31 PM
(edited)

I think for backward compatibility you would need to support both Policy and PropertySet in both C++ and Python, so the former. It would make migration when Policy is deleted simpler, too.

Tim Jenness 
August 23, 2019 at 10:27 PM

Warning from makePolicy won't stop the command breaking though. Are we saying I need to keep the old C++ routine around and also write a new one that takes a PropertySet? Or do I write a wrapper that notices the Policy, issues the warning, and then converts the Policy to PropertySet before using the updated C++ routine?

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Planned End

Components

Checklist

Created August 23, 2019 at 10:06 PM
Updated September 9, 2019 at 5:16 PM
Resolved September 4, 2019 at 9:42 PM