Add filenames return for ddf.to_csv and bag.to_textfiles as they both…#2655
Add filenames return for ddf.to_csv and bag.to_textfiles as they both…#2655mrocklin merged 4 commits intodask:masterfrom
Conversation
… use bytes/core.write_bytes function
|
Seems like a reasonable thing to do, although extracting the filenames isn't at all hard. |
|
@martindurant it doesn't seem easy to include names in the outputs of It looks like this fails the flake8 style check (see travis-ci tests). There is also a dangling print statement in there. |
|
I was meant only as a comment, I think this can be useful, but we have to accept the slight inconsistency. |
|
To address the issues you mention:
Actually I did not have any idea about flake8, now everything should be in order. Tests and flake8 did not report any errors. By the way, after the tests what does |
|
The closest docs we have for Similarly we should extend the developer docs here http://dask.pydata.org/en/latest/develop.html to include the warning about flake8. I'll add a note for this soon. |
A test marked with xfail is allowed to fail. This is often because we don't fully support this functionality yet. |
|
This PR looks good to me. Any further comments @martindurant ? |
|
LGTM. Note to self to check into write_bytes. |
|
This is in . Thanks @asettouf ! |
dask#2655) * Add filenames return for ddf.to_csv and bag.to_textfiles as they both use bytes/core.write_bytes function * Fix flake8 warning, wrong os.remove in test_csv * Fix flake8 no newline at end of file * Add filenames return to to_hdf
Partial commit for #1622, to enable returning filenames I modified bytes.core.write_bytes, which broke bag.to_textfiles which was "fortunate" as it also allowed to have this method returning the filenames after creation.
If my PR is fine, I will work to integrate hdf filenames return.
Thanks in advance for the review