Skip to content

Implement content type propagation#226

Merged
pjbull merged 12 commits intomasterfrom
222-guess-mimetype
May 19, 2022
Merged

Implement content type propagation#226
pjbull merged 12 commits intomasterfrom
222-guess-mimetype

Conversation

@pjbull
Copy link
Copy Markdown
Member

@pjbull pjbull commented May 16, 2022

Implements propagating content types to all of the cloud providers. Does so by adding a kwarg to all clients content_type_method that by default is set to the built-in mimetypes.guess_type.

Includes tests and documentation.

Changes looks bigger than it is because all of our Local testing resources and Mocks had to be updated to track content types that were set so that we could test them.

Closes #222

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2022

@pjbull pjbull force-pushed the 222-guess-mimetype branch from 72277c3 to 6083928 Compare May 16, 2022 05:35
@pjbull pjbull requested a review from jayqi May 16, 2022 05:36
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 16, 2022

Codecov Report

Merging #226 (4fac4a0) into master (85268c8) will decrease coverage by 0.1%.
The diff coverage is 93.1%.

@@           Coverage Diff            @@
##           master    #226     +/-   ##
========================================
- Coverage    94.8%   94.7%   -0.2%     
========================================
  Files          21      21             
  Lines        1256    1287     +31     
========================================
+ Hits         1191    1219     +28     
- Misses         65      68      +3     
Impacted Files Coverage Δ
cloudpathlib/local/localclient.py 96.4% <87.5%> (-1.1%) ⬇️
cloudpathlib/s3/s3client.py 95.4% <90.9%> (-0.7%) ⬇️
cloudpathlib/azure/azblobclient.py 94.2% <92.8%> (-0.5%) ⬇️
cloudpathlib/client.py 87.9% <100.0%> (+0.4%) ⬆️
cloudpathlib/gs/gsclient.py 94.4% <100.0%> (+0.2%) ⬆️

@pjbull pjbull force-pushed the 222-guess-mimetype branch from d254348 to 6fb75b1 Compare May 16, 2022 16:06
Comment thread cloudpathlib/azure/azblobclient.py Outdated
Comment thread cloudpathlib/azure/azblobclient.py
Comment thread docs/docs/authentication.md Outdated
Comment thread HISTORY.md Outdated
@pjbull
Copy link
Copy Markdown
Member Author

pjbull commented May 19, 2022

Thanks @jayqi for review! Integrated all your comments.

Copy link
Copy Markdown
Member

@jayqi jayqi left a comment

Choose a reason for hiding this comment

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

Looks good, aside from small typo. I think you can bump the version in setup.py and then release after merging.

Comment thread HISTORY.md Outdated
Comment thread HISTORY.md Outdated
pjbull and others added 2 commits May 19, 2022 08:13
Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>
Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>
@pjbull pjbull merged commit da86719 into master May 19, 2022
@pjbull pjbull deleted the 222-guess-mimetype branch May 19, 2022 15:42
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.

S3Path does not set object mime-type when uploading a file on S3

3 participants