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

Rename export_files to to_storage with cloud support #922

Merged
merged 6 commits into from
Feb 17, 2025

Conversation

amritghimire
Copy link
Contributor

This renames the export files to to storage adding the support for the
cloud destinations as well.

With this change, the following code will work:

from datachain.lib.dc import DataChain

ds = DataChain.from_storage("az://amrit-test-az/image.png")
ds.save("az")

ds.to_storage("gs://amrit-datachain-test/destination", placement="filename")

Closes #859

Copy link

cloudflare-workers-and-pages bot commented Feb 12, 2025

Deploying datachain-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5cfb9b1
Status: ✅  Deploy successful!
Preview URL: https://d60f6aa5.datachain-documentation.pages.dev
Branch Preview URL: https://amrit-rename-export-files.datachain-documentation.pages.dev

View logs

@amritghimire amritghimire self-assigned this Feb 12, 2025
@amritghimire amritghimire requested review from ilongin, dreadatour and a team February 12, 2025 16:53
@amritghimire amritghimire force-pushed the amrit/rename-export-files branch 2 times, most recently from 04511f3 to f918e39 Compare February 13, 2025 12:56
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.67%. Comparing base (c2dd655) to head (5cfb9b1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #922   +/-   ##
=======================================
  Coverage   87.66%   87.67%           
=======================================
  Files         130      130           
  Lines       11700    11708    +8     
  Branches     1592     1592           
=======================================
+ Hits        10257    10265    +8     
  Misses       1043     1043           
  Partials      400      400           
Flag Coverage Δ
datachain 87.59% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amritghimire amritghimire marked this pull request as ready for review February 13, 2025 13:33
@amritghimire amritghimire force-pushed the amrit/rename-export-files branch from eac7935 to 1c81f79 Compare February 14, 2025 09:18
Copy link
Contributor

@dreadatour dreadatour 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 to me! ❤️

Just wonder if it will be a good idea to add example to the docs?

amritghimire and others added 5 commits February 17, 2025 08:17
This renames the export files to to storage adding the support for the
cloud destinations as well.

With this change, the following code will work:
```py
from datachain.lib.dc import DataChain

ds = DataChain.from_storage("az://amrit-test-az/image.png")
ds.save("az")

ds.to_storage("gs://amrit-datachain-test/destination", placement="filename")

```

Closes #859
@amritghimire amritghimire force-pushed the amrit/rename-export-files branch from 79efe68 to 415b73e Compare February 17, 2025 02:32
@amritghimire amritghimire merged commit a4274bd into main Feb 17, 2025
37 checks passed
@amritghimire amritghimire deleted the amrit/rename-export-files branch February 17, 2025 03:08
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.

Rename export_files() to to_storage()
2 participants