New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-39605: Use butler.dimensions rather than butler.registry.dimensions #850
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #850 +/- ##
==========================================
+ Coverage 87.99% 88.01% +0.01%
==========================================
Files 269 269
Lines 35465 35514 +49
Branches 7442 7442
==========================================
+ Hits 31208 31258 +50
Misses 3113 3113
+ Partials 1144 1143 -1
☔ View full report in Codecov by Sentry. |
This is the preferred interface and is part of the long-term goal of lowering the visibility of butler.registry.
* UTF-8 for encoding * "r" for open mode
This turned into a gigantic PR. The type annotations and f-string and set changes are distinct commits if that helps. mypy and flake8 are happy and all tests pass. |
e64e89c
to
baf5c50
Compare
I've also replaced |
@TallJimbo, should we split this review in two? I could look at |
@andy-slac , that works for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked butler/core
, butler/registry
, and butler/registries
, looks good, a couple of minor comments. (@TallJimbo, you can skip registries/...
)
standalone: bool = False, | ||
searchPaths: Optional[List[str]] = None, | ||
searchPaths: list[str] | None = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing many of these str
values should be ResourcePathExpression
, and for public APIs taking Sequence
(or Iterable
, if possible) is much nicer than taking list
. In fact, I think if you try to make searchPath
take a list of ResourcePathExpression
it may not work because list
is not covariant.
Co-authored-by: Jim Bosch <jbosch@astro.princeton.edu>
This is the preferred interface and is part of the long-term goal of lowering the visibility of butler.registry.
Checklist
doc/changes