-
Notifications
You must be signed in to change notification settings - Fork 532
ENH: Modify Directory
and File
traits to get along with pathlib
#2962
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
ENH: Modify Directory
and File
traits to get along with pathlib
#2962
Conversation
Okay, getting green lights with my user's Travis builds. |
Cool. Will look tonight if I get a chance, otherwise first thing in the morning. Thanks for taking this one over. |
Incidentally, we should try to have a release this month... |
This doesn't address #2944, but sets the ground to tackle it. |
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.
This looks reasonable. A few small comments.
Co-Authored-By: Satrajit Ghosh <satrajit.ghosh@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #2962 +/- ##
==========================================
- Coverage 66.92% 64.23% -2.69%
==========================================
Files 344 342 -2
Lines 43747 43744 -3
Branches 5456 5468 +12
==========================================
- Hits 29277 28100 -1177
- Misses 13722 14557 +835
- Partials 748 1087 +339
Continue to review full report at Codecov.
|
local_directory = str(self.inputs.local_directory) | ||
bucket_path = str(self.inputs.bucket_path) | ||
template = str(self.inputs.template) | ||
if not os.path.split(local_directory)[1] == '': |
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.
minor refactor for added clarity
if not os.path.split(local_directory)[1] == '': | |
if not os.path.basename(local_directory) == '': |
template = str(self.inputs.template) | ||
if not os.path.split(local_directory)[1] == '': | ||
local_directory += '/' | ||
if not os.path.split(bucket_path)[1] == '': |
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.
if not os.path.split(bucket_path)[1] == '': | |
if not os.path.basename(bucket_path) == '': |
Everything seems to be checking out - I'll merge, cross your fingers this doesn't break everything. |
🤞 |
Closes #2959
Summary
Fixes # .
List of changes proposed in this PR (pull-request)
Acknowledgment