Skip to content
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

addurls: Support tsv input #4845

Merged
merged 4 commits into from Aug 29, 2020
Merged

addurls: Support tsv input #4845

merged 4 commits into from Aug 29, 2020

Conversation

kyleam
Copy link
Collaborator

@kyleam kyleam commented Aug 28, 2020

Requested in gh-4839.

This test gives "not_csv_or_json" as invalid input to extract(), but,
if we were to stick with that scheme, an upcoming commit would have to
change it to "not_csv_or_tsv_or_json".
This trims a few spots that we'd need to update when tsv support is
added.

Using the new variable in test_addurls_invalid_input means we also
test "ext", which is a good thing.
Make it easier to plug tsv input into these spots.
To read tab-separated input, the core functional change needed is
specifying tab as the delimiter to csv.reader().  The rest is a matter
of updating the documentation and the handling of the input_type
argument.

Closes datalad#4839.
@codecov
Copy link

codecov bot commented Aug 29, 2020

Codecov Report

Merging #4845 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4845      +/-   ##
==========================================
+ Coverage   89.66%   89.70%   +0.04%     
==========================================
  Files         289      289              
  Lines       40461    40473      +12     
==========================================
+ Hits        36279    36308      +29     
+ Misses       4182     4165      -17     
Impacted Files Coverage Δ
datalad/plugin/addurls.py 99.18% <100.00%> (+0.01%) ⬆️
datalad/plugin/tests/test_addurls.py 100.00% <100.00%> (ø)
datalad/support/gitrepo.py 90.40% <0.00%> (+0.07%) ⬆️
datalad/downloaders/tests/test_http.py 89.92% <0.00%> (+2.21%) ⬆️
datalad/downloaders/http.py 84.55% <0.00%> (+2.70%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a12de6...5d6e4fd. Read the comment docs.

Copy link
Member

@mih mih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mih mih merged commit 00096ee into datalad:master Aug 29, 2020
4 checks passed
@yarikoptic
Copy link
Member

Thank you!

@kyleam kyleam deleted the addurls-tsv branch August 31, 2020 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants