Skip to content

Conversation

@mattijsdp
Copy link
Contributor

@mattijsdp mattijsdp commented Nov 20, 2025

Adds support for pydantic serialization as uri.

Closes #537


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.

Copy link
Member

@pjbull pjbull 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, pending tests + linting. Just a simplification for the docs change.


def serialize_as_http(path: S3Path) -> str:
"""Convert S3Path to HTTP URL"""
return f"https://{path.bucket}.s3.amazonaws.com/{path.key}"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh nice, updated!

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.1%. Comparing base (28f1d94) to head (7e8f458).
⚠️ Report is 1 commits behind head on 538-live-tests.

Additional details and impacted files
@@               Coverage Diff                @@
##           538-live-tests    #538     +/-   ##
================================================
- Coverage            94.0%   93.1%   -0.9%     
================================================
  Files                  28      28             
  Lines                2203    2203             
================================================
- Hits                 2071    2052     -19     
- Misses                132     151     +19     
Files with missing lines Coverage Δ
cloudpathlib/anypath.py 91.3% <ø> (ø)
cloudpathlib/cloudpath.py 94.5% <ø> (-0.4%) ⬇️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pjbull pjbull changed the base branch from master to 538-live-tests November 20, 2025 22:12
@pjbull
Copy link
Member

pjbull commented Nov 20, 2025

Thanks! Moving to repo-local branch so we can run the live tests.

@pjbull pjbull merged commit db2883d into drivendataorg:538-live-tests Nov 20, 2025
49 of 51 checks passed
pjbull added a commit that referenced this pull request Nov 20, 2025
* support pydantic serialization

* update HISTORY.md

* add PR num to HISTORY.md

* black change

* simplify doc example

Co-authored-by: Mattijs De Paepe <33912270+mattijsdp@users.noreply.github.com>
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.

Support Pydantic Serialization for CloudPath

2 participants