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

Live tests: use variable for client schemes, allowing override (#467) #471

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

pjbull
Copy link
Member

@pjbull pjbull commented Sep 9, 2024

Live tests for #467


  • use variable for client schemes, allowing override

This change is intended to make the default client implementations more flexible so that their scheme can be customized. This can be useful in scenarios where a subclass wants to implement a custom scheme on e.g. a S3 compatible API [1] but with a custom scheme so that the default S3 access is still also available.

[1] https://cloudpathlib.drivendata.org/stable/authentication/#accessing-custom-s3-compatible-object-stores

The tests have been updated to include a new s3-like rig which uses the new scheme override functionality.

  • use single cloud_prefix

  • tests: switch to lighter-weight custom scheme tests

  • update HISTORY file for custom scheme support

  • update custom scheme tests to utilize pytest fixture

This isolates the implementation in response to PR feedback: #467 (comment)

DESCRIPTION_HERE

Closes #ISSUE


Contributor checklist:

  • I have read and understood CONTRIBUTING.md
  • Confirmed an issue exists for the PR, and the text Closes #issue appears in the PR summary (e.g., Closes #123).
  • Confirmed PR is rebased onto the latest base
  • Confirmed failure before change and success after change
  • Any generic new functionality is replicated across cloud providers if necessary
  • Tested manually against live server backend for at least one provider
  • Added tests for any new functionality
  • Linting passes locally
  • Tests pass locally
  • Updated HISTORY.md with the issue that is addressed and the PR you are submitting. If the top section is not `## UNRELEASED``, then you need to add a new section to the top of the document for your change.

* use variable for client schemes, allowing override

This change is intended to make the default client implementations
more flexible so that their scheme can be customized. This can be
useful in scenarios where a subclass wants to implement a custom
scheme on e.g. a S3 compatible API [1] but with a custom scheme
so that the default S3 access is still also available.

[1] https://cloudpathlib.drivendata.org/stable/authentication/#accessing-custom-s3-compatible-object-stores

The tests have been updated to include a new s3-like rig which uses the
new scheme override functionality.

* use single cloud_prefix

* tests: switch to lighter-weight custom scheme tests

* update HISTORY file for custom scheme support

* update custom scheme tests to utilize pytest fixture

This isolates the implementation in response to PR feedback:
#467 (comment)
@pjbull pjbull marked this pull request as ready for review September 9, 2024 14:48
Copy link
Contributor

github-actions bot commented Sep 9, 2024

@github-actions github-actions bot temporarily deployed to pull request September 9, 2024 14:50 Inactive
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.2%. Comparing base (b776bee) to head (16038bb).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cloudpathlib/azure/azblobclient.py 75.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #471     +/-   ##
========================================
- Coverage    94.2%   94.2%   -0.1%     
========================================
  Files          23      23             
  Lines        1745    1745             
========================================
- Hits         1645    1644      -1     
- Misses        100     101      +1     
Files with missing lines Coverage Δ
cloudpathlib/gs/gsclient.py 91.4% <100.0%> (ø)
cloudpathlib/s3/s3client.py 93.6% <ø> (-0.8%) ⬇️
cloudpathlib/azure/azblobclient.py 96.8% <75.0%> (ø)

@pjbull pjbull merged commit 8207b3d into master Sep 9, 2024
25 checks passed
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.

2 participants