✨ Extend UPath.to_url() to private paths - #1379
Open
sheetalgiri wants to merge 5 commits into
Open
Conversation
…ivately hosted S3 objects, and supports publicly hosted GCS path and HTTP
Member
|
Actually tests seem to still be failing, @sheetalgiri |
Author
|
@falexwolf @Koncopd failing tests have been fixed |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1379 +/- ##
==========================================
- Coverage 85.39% 84.95% -0.44%
==========================================
Files 46 47 +1
Lines 4846 5037 +191
==========================================
+ Hits 4138 4279 +141
- Misses 708 758 +50
🚀 New features to boost your workflow:
|
UPath.to_url() to private paths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Agents trying to create markdown with images that are artifacts but this doesn't work well because it refers to local paths of the image https://lamin.ai/laminlabs/lamindata/artifact/6bWK22v0wFFOc5gF0000
Solution
Add functionality to create such a link using artifact.path.to_url(). Closest thing that existed before was ln.Artifact.path but this does not create a proper link. The implementation closely follows the implementation in LaminHub for the same :https://github.com/laminlabs/laminhub/blob/6f213282d58707ecbd86ba896b4ebab78851c03b/frontend/src/lib/utils/utils.ts#L44-L69, except that the /storage/s3 endpoint can only be used if the instance is on LaminHub, so this is being checked for.
Original PR was on lamindb