There is a new Butler Policy class, it is stored as yaml

as described in https://jira.lsstcorp.org/browse/DM-4171
The butler now has its own Policy class (in daf_persistence). It can be initialized by pex policy instances and can read paf files (via pex policy). It is persisted as a yaml file, and can of course read the yaml files it writes.

The butler policy is a python dict with an extended API. It has methods that mirrors the pex policy api that was used with butler. Let me know if you find missing API. However, most of this API is deprecated and users should prefer the dict API. Deprecated methods are marked in the butler policy class.

Butler policy does allow the hierarchical dot-delimited naming scheme that was available in the pex policy API. e.g. it is true that: myPolicy['a']['b']['c'] is myPolicy['a.b.c']
We plan to keep this.

More details are in the docstrings of policy.py.

1 Like