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

NF: addurls: Support passing list of records #5285

Merged
merged 1 commit into from Jan 9, 2021

Conversation

kyleam
Copy link
Collaborator

@kyleam kyleam commented Jan 6, 2021

The urlfile argument takes records via a file, but when addurls is
called from the python interface, specifying an iterable of records
can be more convenient. Add support for that.

Using urlfile as the name for the positional argument doesn't fit for
this particular use case, but leave it as is to avoiding breaking
existing python callers that use it as a keyword argument.

Closes #4906.


@kyleam kyleam marked this pull request as draft January 6, 2021 19:17
The urlfile argument takes records via a file, but when addurls is
called from the python interface, specifying an iterable of records
can be more convenient.  Add support for that.

Using urlfile as the name for the positional argument doesn't fit for
this particular use case, but leave it as is to avoiding breaking
existing python callers that use it as a keyword argument.

Closes datalad#4906.
@kyleam kyleam marked this pull request as ready for review January 6, 2021 20:10
@codecov
Copy link

codecov bot commented Jan 6, 2021

Codecov Report

Merging #5285 (c85c368) into master (d996ec3) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5285      +/-   ##
==========================================
+ Coverage   90.26%   90.31%   +0.04%     
==========================================
  Files         297      298       +1     
  Lines       41632    41737     +105     
==========================================
+ Hits        37580    37695     +115     
+ Misses       4052     4042      -10     
Impacted Files Coverage Δ
datalad/plugin/addurls.py 97.05% <100.00%> (+0.07%) ⬆️
datalad/plugin/tests/test_addurls.py 99.53% <100.00%> (+<0.01%) ⬆️
datalad/downloaders/http.py 85.29% <0.00%> (-0.25%) ⬇️
datalad/config.py 96.53% <0.00%> (-0.20%) ⬇️
datalad/support/gitrepo.py 91.95% <0.00%> (ø)
datalad/support/repodates.py 95.87% <0.00%> (ø)
datalad/tests/test_config.py 100.00% <0.00%> (ø)
datalad/distribution/update.py 98.80% <0.00%> (ø)
datalad/distribution/install.py 98.87% <0.00%> (ø)
datalad/support/tests/test_gitrepo.py 99.89% <0.00%> (ø)
... and 12 more

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 d996ec3...c85c368. 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! Thx!

@mih mih merged commit 2f8ec83 into datalad:master Jan 9, 2021
1 check passed
@kyleam kyleam deleted the addurls-no-file branch January 11, 2021 14:30
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.

addurls: add ability to just pass a list of records
2 participants