Skip to content

✨ Extend UPath.to_url() to private paths - #1379

Open
sheetalgiri wants to merge 5 commits into
mainfrom
upath_to_url_extension
Open

✨ Extend UPath.to_url() to private paths#1379
sheetalgiri wants to merge 5 commits into
mainfrom
upath_to_url_extension

Conversation

@sheetalgiri

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

@falexwolf
falexwolf requested a review from Koncopd August 17, 2026 09:44
@github-actions
github-actions Bot temporarily deployed to pull request August 17, 2026 09:45 Inactive

@falexwolf falexwolf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great to me! But @Koncopd should also approve!

@falexwolf

Copy link
Copy Markdown
Member

Actually tests seem to still be failing, @sheetalgiri

@sheetalgiri

Copy link
Copy Markdown
Author

@falexwolf @Koncopd failing tests have been fixed

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.95%. Comparing base (a179398) to head (2abd84f).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
lamindb_setup/core/upath.py 92.31% <100.00%> (-0.43%) ⬇️

... and 20 files with indirect coverage changes

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

@falexwolf falexwolf changed the title ✨ Add a function to create a download link for artifacts that can be used by agents when referencing the artifact in markdown/html ✨ Extend UPath.to_url() to private paths Aug 17, 2026
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