Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_butler
-
Labels:
-
Story Points:2
-
Epic Link:
-
Team:Data Release Production
-
Urgent?:No
Description
Currently passing a pathlib.Path results in an error. Change config.py such that a path can be passed in this way.
Suggestions from Tim Jenness:
add it here:
https://github.com/lsst/daf_butler/blob/master/python/lsst/daf/butler/core/config.py#L213
and here:
https://github.com/lsst/daf_butler/blob/master/python/lsst/daf/butler/core/_butlerUri/_butlerUri.py#L133
with additional note that "although a path.PathLib should probably have its own else branch in ButlerURI because we know it’s a local file by definition"
I'm not sure I understand your suggestion about making a separate else block (probably because I don't know what is happening inside the isinstance(other, str) block, but this just does the simplest thing of casting to string if it's a Path. Let me know if you'd like me to change it.