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

Instantiate default client lazily #432

Merged
merged 4 commits into from
May 3, 2024
Merged

Instantiate default client lazily #432

merged 4 commits into from
May 3, 2024

Conversation

pjbull
Copy link
Member

@pjbull pjbull commented May 3, 2024

  • Turn CloudPath.client into a property
  • Get private ._client if set
  • If not set, get default client and set that to ._client
  • Add completeness check for dependencies to CloudPath.__init__ in addition to client (seems ok since cheap) so those happen upstream

Closes #428

Copy link
Contributor

github-actions bot commented May 3, 2024

@github-actions github-actions bot temporarily deployed to pull request May 3, 2024 16:23 Inactive
@github-actions github-actions bot temporarily deployed to pull request May 3, 2024 16:41 Inactive
Copy link

codecov bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.5%. Comparing base (fabb0e4) to head (c11d1d7).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #432     +/-   ##
========================================
- Coverage    93.8%   93.5%   -0.3%     
========================================
  Files          23      23             
  Lines        1646    1650      +4     
========================================
- Hits         1545    1544      -1     
- Misses        101     106      +5     
Files Coverage Δ
cloudpathlib/cloudpath.py 93.5% <100.0%> (-0.3%) ⬇️

... and 2 files with indirect coverage changes

@pjbull pjbull requested a review from jayqi May 3, 2024 17:16
@pjbull pjbull merged commit 71331d3 into master May 3, 2024
25 checks passed
@pjbull pjbull deleted the 428-lazy-default-client branch May 3, 2024 23:32
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.

Instantiate default client lazily
2 participants