-
Notifications
You must be signed in to change notification settings - Fork 38
Algo-XXX proide a getDir() path for Data Directories #110
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
Conversation
getDir() path [WIP]getDir() path
getDir() pathgetDir() path for Data Directories
getDir() path for Data Directories|
|
||
| # Get file from the data api | ||
| def getFile(self): | ||
| def getFile(self, as_path=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also added a default null flag to getFile so that we can actually skip the .name weirdness and stop having dangling file handles 🎉
| local_file = file.getFile(as_path=True) | ||
| os.rename(local_file, correct_file_path) | ||
| return directory | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete extra newline
kennydaniel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kicked CI and it passed.
Re: as_path: I thought we had figured out a way to make all DataFiles a file-like object in python? Either way looks fine but not sure why that was needed here?
Multiple customers and users have complained over the lack of support regarding downloading an entire data directory at once; preserving filenames and internal files. This PR adds a method to the data directory called
getDir(); this provides a temporary file in the users scratch space that preserves the heirarchy and datafiles + correct names of all files contained within.This PR has not added this functionality to the LocalDirectory system; and has been tested to function with S3 buckets