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
FIX accept pathlib based path as argument for LocalTarget #2548
Conversation
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.
Looks reasonable to me
Added fixes from @dlstadther's review. |
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.
LGTM
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.
Wow, was it this easy to start supporting it?
Maybe ping @bjlange as the one that opened the ticket in the first place.
By the way, can you look if there's any documentation you can add? Maybe an example usage of the new functionality as class docs for FileSystemTarget
?
Amazing! Thanks @orsinium |
Added usage example in docstring. |
What about this PR? Does anyone have any changes requests? |
@Tarrasch @dlstadther Any reason this isn't yet merged? |
@josham The code looks good, but the tests aren't passing |
I couldn't tame the doctest, so I've just dropped usage example >.< |
Travis is ok now |
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 couldn't tame the doctest, so I've just dropped usage example >.<
Really? Why? Can't you just remove one layer of >
and it won't run doctest? It still will be super useful to have the docs!
Wow, Tarrasch, don't worry about it too much, please. I've returned it as you said. Thank you for a good idea :) |
Ok, it doesn't work: |
I think you want to remove |
In this case it will be broken in the readthedocs api reference. |
Just fyi you can test the docs locally too you know: https://github.com/spotify/luigi/blob/master/CONTRIBUTING.rst#writing-documentation |
I know. BTW, I've made a few fixes for CONTRIBUTING.rst in another PR. However, sometimes it can't help because I can check locally only "*-core" tests, without hdfs. I've pushed this code with broken doctest to show that your idea how to bypass this check doesn't work. |
now it works |
Thanks for this addition @orsinium! |
Wow. Thank you, fellows. Sorry for long review process :) |
🙌 |
Description
Accept pathlib.PosixPath, py._path.local.LocalPath and other path based objects as argument for FileSystemTarget.
Motivation and Context
Fix #2322
Have you tested this? If so, how?
I have included unit tests.