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

Add way to create FlyteFile/Directory from remote location #2312

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

wild-endeavor
Copy link
Contributor

@wild-endeavor wild-endeavor commented Mar 29, 2024

Why are the changes needed?

Add a couple of class methods

def from_source(cls, source: str | os.PathLike) -> FlyteFile
def from_source(cls, source: str | os.PathLike) -> FlyteDirectory

meant to be used with remote paths. This is because if you create a file with an s3/gs link as the path using the normal constructor, it doesn't come with a download function, forcing users to manually call into the data persistence layer manually.

What changes were proposed in this pull request?

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Signed-off-by: Yee Hing Tong <[email protected]>
Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.47%. Comparing base (d074786) to head (cd14049).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2312      +/-   ##
==========================================
+ Coverage   83.40%   83.47%   +0.07%     
==========================================
  Files         316      324       +8     
  Lines       24457    24741     +284     
  Branches     3517     3521       +4     
==========================================
+ Hits        20398    20653     +255     
- Misses       3427     3454      +27     
- Partials      632      634       +2     

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

@wild-endeavor wild-endeavor changed the title Add explicit source Add way to create FlyteFile from remote Mar 29, 2024
ggydush
ggydush previously approved these changes Mar 29, 2024
Copy link
Collaborator

@ggydush ggydush left a comment

Choose a reason for hiding this comment

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

Thank you!!

@dosubot dosubot bot added the lgtm This PR has been approved by maintainer label Mar 29, 2024
Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor wild-endeavor marked this pull request as ready for review March 29, 2024 23:35
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 29, 2024
@wild-endeavor wild-endeavor changed the title Add way to create FlyteFile from remote Add way to create FlyteFile/Directory from remote Mar 29, 2024
@wild-endeavor wild-endeavor changed the title Add way to create FlyteFile/Directory from remote Add way to create FlyteFile/Directory from remote location Mar 29, 2024
@wild-endeavor wild-endeavor merged commit afea2fa into master Mar 29, 2024
48 checks passed
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
Add a couple of class methods
```
def from_source(cls, source: str | os.PathLike) -> FlyteFile
def from_source(cls, source: str | os.PathLike) -> FlyteDirectory
```
meant to be used with remote paths.  This is because if you create a file with an s3/gs link as the path using the normal constructor, it doesn't come with a download function, forcing users to manually call into the data persistence layer manually.

Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants