-
Notifications
You must be signed in to change notification settings - Fork 110
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 AnnexRepo.whereis key=True mode operation, and add batch mode support #6379
Conversation
…ually" apparently no test was excercising it and no code was using where is on multiple keys at once. Detected this defect while working out the "batch" mode for whereis also adjusted the test for "conflicting" invocation of --all with --key option. Because we loop explicitly now, we would not even invoke git-annex and thus not trigger the error if test is invoked without any file. So I just decided to adjust the test since IMHO it would better reflect needed testing of us still bubbling up the exception. FWIW, filed an issue on --all not erroring out with --batch-keys: https://git-annex.branchable.com/bugs/should_error_on_whereis_--batch-keys_--all/?updated
…nex) Recently (in 8.20210903) git-annex introduced --batch-keys option to a number of commands which otherwise had --batch mode, but not for whenever specification was on keys instead of paths. I thought to make use of whereis(..., key=True, batch=True) mode of operation to only then discover that we do not have that supported.
Codecov Report
@@ Coverage Diff @@
## maint #6379 +/- ##
==========================================
- Coverage 90.17% 90.17% -0.01%
==========================================
Files 312 312
Lines 42270 42267 -3
==========================================
- Hits 38116 38113 -3
Misses 4154 4154
Continue to review full report at Codecov.
|
eh, codecov report of
|
@datalad/developers this PR is ready for review and potentially a merge. Your feedback is always welcome! |
Can we get a changelog @yarikoptic ? |
this PR is against Moreover we are at 0.15.4-22-g967ff5da7 in |
Attn @mih: FWIW added Changelog entries to the main description. |
Thx! |
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!
First commit is truly a BF and destined to
maint
. The 2nd addresses the limitation (we were just raising a ValueError, not even NotImplementedError) if asked to perform in batch mode on keys. Support for that functionality was added only recently to git-annex, and since change is small, I have decided to bundle it within the same PR againstmaint
. But I would be ok to split it intomaster
. Motivation -- a need for datalad-fuse development.attn @jwodder (I will provide more context in datalad-fuse later)
Changelog
🐛 Bug Fixes
AnnexRepo.whereis
operation inkey=True
mode whenever multiple keys are provided.💫 Enhancements and new features
AnnexRepo.whereis
inkey=True
mode (requires git-annex 8.20210903 or later)