Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-525

Remove pex_policy usage from daf_persistence, afw, and obs_base

    XMLWordPrintable

    Details

    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:
      None

      Description

      In what I'd hoped to be a prelude to implementing DM-15749, I recently took a shot at removing pex_policy from the stack (because its extensive usage of PropertySet is making it hard to make changes to PropertySet).

      That didn't work out as well as I'd hoped, but I did make a lot of progress that I'd like to merge, which you can see directly on DM-15767.  The changes include:

      • Making PropertySet not inherit from Persistable.
      • Removing nearly all C++ from daf_persistence (which was most of the usage of pex_policy).
      • Removing support for pex_policy in obs mapper policy files; in addition to obs_base, this required changing obs_ctio0m9.  All other active obs packages already use YAML.
      • Removing usage of pex_policy to initialize afw.image.Filter objects.  This was only used in rather stale test code (in afw, coadd_utils, coadd_chisquared), which has now been updated to use afw.image.utils.defineFilter.

      For the curious (or ambitious), the reason this effort stalled there is that ctrl_orca and ctrl_execute still use pex_policy extensively, and I know next to nothing about those packages.  There are also still some instances of pex_policy usage in (at least) meas_algorithms and ip_diffim; I believe those are fairly straightforward cases where PropertySet or a C++ "Control struct" could be used instead.

       

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            It now uses YAML: DM-15082 and DM-15653

            Show
            tjenness Tim Jenness added a comment - It now uses YAML: DM-15082 and DM-15653
            Hide
            jbosch Jim Bosch added a comment -

            Persistable (the base class) is only used today for persistence via Boost.Serialization, which we're now trying to drop.  In particular, the new YAML readers and writers do not rely on their targets having it.

            FWIW, after these changes, Persistable will only be used in pex_policy, not to indicate something actually persistable, but rather as an opaque type-erasure base class that can be used to stuff arbitrary things in a PropertySet (hence my desire to get rid of pex_policy more fully).

            Show
            jbosch Jim Bosch added a comment - Persistable (the base class) is only used today for persistence via Boost.Serialization, which we're now trying to drop.  In particular, the new YAML readers and writers do not rely on their targets having it. FWIW, after these changes, Persistable will only be used in pex_policy , not to indicate something actually persistable, but rather as an opaque type-erasure base class that can be used to stuff arbitrary things in a PropertySet  (hence my desire to get rid of pex_policy more fully).
            Hide
            krzys Krzysztof Findeisen added a comment - - edited

            Ah, I didn't realize Persistable was only for the Boost format (which seems like nasty mixing of interface and implementation, but that's outside the scope of the RFC). EDIT: never mind, saw Jim's explanation of how that came about.

            Show
            krzys Krzysztof Findeisen added a comment - - edited Ah, I didn't realize Persistable was only for the Boost format (which seems like nasty mixing of interface and implementation, but that's outside the scope of the RFC) . EDIT: never mind, saw Jim's explanation of how that came about.
            Hide
            jbosch Jim Bosch added a comment -

            It wasn't always only for the Boost format - until a week or two ago it was also used for some FITS I/O as well - we've just been slowly retiring it, one storage format at a time.

            Show
            jbosch Jim Bosch added a comment - It wasn't always only for the Boost format - until a week or two ago it was also used for some FITS I/O as well - we've just been slowly retiring it, one storage format at a time.
            Hide
            jbosch Jim Bosch added a comment -

            The actual implementation does not fully remove pex_policy usage from daf_persistence - it is still being used in DbAuth, which may still be in use (albeit not in CI) in places I don't have time to track down right now.  Given that this RFC did not propose removing all pex_policy usage originally anyway, I think that's best left for a future RFC rather than adding a new triggering ticket and keeping this one open.

            Show
            jbosch Jim Bosch added a comment - The actual implementation does not fully remove pex_policy usage from daf_persistence - it is still being used in DbAuth, which may still be in use (albeit not in CI) in places I don't have time to track down right now.  Given that this RFC did not propose removing all pex_policy usage originally anyway, I think that's best left for a future RFC rather than adding a new triggering ticket and keeping this one open.

              People

              Assignee:
              jbosch Jim Bosch
              Reporter:
              jbosch Jim Bosch
              Watchers:
              Jim Bosch, John Parejko, John Swinbank, Kian-Tat Lim, Krzysztof Findeisen, Steve Pietrowicz, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Planned End:

                  Jenkins

                  No builds found.