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

BF: AnnexRepo to deal with INFO response from annex special remotes #3546

Merged
merged 2 commits into from Jul 24, 2019

Conversation

@bpoldrack
Copy link
Member

@bpoldrack bpoldrack commented Jul 19, 2019

AnnexRepo, in particular _run_annex_command_json didn't handle an INFO response from a special remote (see https://git-annex.branchable.com/design/external_special_remote_protocol/#index5h2).
Fixed that.

FTR: I won't implement an entire special remote just to fake some test herein. However, it will at least be implicitly tested by https://github.com/datalad/git-annex-ria-remote.
Meaning: I think it's fine if I didn't break anything ;-)

@codecov
Copy link

@codecov codecov bot commented Jul 19, 2019

Codecov Report

Merging #3546 into master will increase coverage by 0.03%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3546      +/-   ##
==========================================
+ Coverage   83.01%   83.04%   +0.03%     
==========================================
  Files         272      272              
  Lines       35140    35147       +7     
==========================================
+ Hits        29171    29189      +18     
+ Misses       5969     5958      -11
Impacted Files Coverage Δ
datalad/support/annexrepo.py 63.31% <57.14%> (-0.04%) ⬇️
datalad/downloaders/tests/test_http.py 92.32% <0%> (+3.46%) ⬆️

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 ae2c259...72291f2. Read the comment docs.

to_remove.append(obj)

for obj in to_remove:
json_objects.remove(obj)
Copy link
Member

@yarikoptic yarikoptic Jul 19, 2019

Code will be shorter if you just compose that list to return in the loop... Not sure even if remove would work correctly here eh in case of multiple identical info messages

@yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Jul 22, 2019

looks LGTM. Re tests, if interested to dig a bit -- datalad/customremotes/tests/test_base.py is the one which could code generic logic tests for special remotes

mih
mih approved these changes Jul 24, 2019
@mih mih merged commit 86e21e1 into datalad:master Jul 24, 2019
3 checks passed
@mih mih deleted the bf-special-remote-protocol branch Jul 24, 2019
@yarikoptic yarikoptic added this to the Release 0.12.0 milestone Aug 1, 2019
@bpoldrack bpoldrack restored the bf-special-remote-protocol branch Jan 24, 2020
@bpoldrack bpoldrack deleted the bf-special-remote-protocol branch Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants