Skip to content
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-43746: Clean up RemoteButler #992

Merged
merged 3 commits into from Apr 9, 2024
Merged

DM-43746: Clean up RemoteButler #992

merged 3 commits into from Apr 9, 2024

Conversation

dhirving
Copy link
Contributor

@dhirving dhirving commented Apr 8, 2024

RemoteButler is getting too large, cut down clutter in the main file by factoring out a RemoteButlerHttpConnection class and moving some standalone functions to their own file.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes
  • (if changing dimensions.yaml) make a copy of dimensions.yaml in configs/old_dimensions

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 98.42520% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 88.94%. Comparing base (5ecbf73) to head (7fd008f).

Files Patch % Lines
python/lsst/daf/butler/remote_butler/_ref_utils.py 94.28% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #992   +/-   ##
=======================================
  Coverage   88.94%   88.94%           
=======================================
  Files         339      341    +2     
  Lines       44016    44036   +20     
  Branches     9071     9072    +1     
=======================================
+ Hits        39151    39169   +18     
- Misses       3551     3552    +1     
- Partials     1314     1315    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

RemoteButler is getting too large, so pull out some HTTP-related methods that can be grouped together in their own class.
Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup. Thanks.

python/lsst/daf/butler/remote_butler/_http_connection.py Outdated Show resolved Hide resolved
content: bytes | None = None,
params: Mapping[str, str | bool] | None = None,
headers: Mapping[str, str] | None = None,
) -> httpx.Response:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some sense, this is the most complicated method in the file and the one that might want a couple of sentences to explain it.

python/lsst/daf/butler/remote_butler/_http_connection.py Outdated Show resolved Hide resolved
Pull out some standalone functions from RemoteButler to a new file to cut down clutter.
Co-authored-by: Tim Jenness <tjenness@lsst.org>
@dhirving dhirving merged commit bc16c34 into main Apr 9, 2024
18 checks passed
@dhirving dhirving deleted the tickets/DM-43746 branch April 9, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants