Conversation
Signed-off-by: Kevin Su <pingsutw@apache.org>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2059 +/- ##
==========================================
+ Coverage 85.98% 86.03% +0.05%
==========================================
Files 308 308
Lines 23016 23051 +35
Branches 3479 3489 +10
==========================================
+ Hits 19790 19832 +42
+ Misses 2616 2611 -5
+ Partials 610 608 -2 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kevin Su <pingsutw@apache.org>
Contributor
|
you should also be able to do this using flytedirectory.crawl()... |
kumare3
reviewed
Jan 2, 2024
| return self.__fspath__() | ||
|
|
||
| @classmethod | ||
| def listdir(cls, directory: FlyteDirectory) -> typing.List[typing.Union[FlyteDirectory, FlyteFile]]: |
Contributor
There was a problem hiding this comment.
why not make this as an instance method on FlyteDirectory instead of class method?
Also i want to support async versions of all these methods
Member
Author
There was a problem hiding this comment.
I can add them to a separate PR.
kumare3
approved these changes
Jan 2, 2024
Member
Author
it won't return flytefile. |
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.
Tracking issue
NA
Why are the changes needed?
flytekit downloads the entire directory when calling
os.listdir(FlyteDirectory(...)). However, users may only want to download the specific files they will use when the task is running.What changes were proposed in this pull request?
Add a new method called listdir in
FlyteDirectorythat can list all the files and folders in the given directory.listdironly returns eitherflytefileorFlyteDirectoryHow was this patch tested?
Screenshots
Check all the applicable boxes
Related PRs
NA
Docs link
NA