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+ENH: search --show-keys -- no incorrect "unhashable", use repr #4354
Conversation
…ashable entries" message
…which keys to show
also changes the format from just adding ... at the end to using ++??? chars++ in the middle, thus showing the trailer of original repr -- useful if it is a list or a tuple, so you could see the end of the structure annotation
Codecov Report
@@ Coverage Diff @@
## maint #4354 +/- ##
==========================================
- Coverage 89.67% 89.65% -0.02%
==========================================
Files 275 275
Lines 36894 36950 +56
==========================================
+ Hits 33084 33128 +44
- Misses 3810 3822 +12
Continue to review full report at Codecov.
|
…igure out how many to print (not 10)
since it is something I would like to use (and in general - use this functionality), and since nobody else objects and/or cares, I will merge it tomorrow. |
I'm not very familiar with this code, but the changes in addition to the bug fixes look like clear improvements and no obvious issues popped out at me on a read-through of the series.
re: maint vs master: I'd lean towards master with this, but either way is okay by me.
thank you @kyleam ! I am split between maint-vs-master, since ideally I should have just made a BF for maint, but since it is a minor enhancement to rarely used user-interfaced (not machine readable) information, I will just proceed with maint. |
+ENH: to be able to limit which keys to report
If you ran smth like
datalad search -d /// --show-keys short
you could see a long list of keys, where you would see smth likewhich would not only be uninformative but also incorrect. It is 1688 entries which were "hashable" and the rest not. But also you wouldn't see a single value. With first 2 commits (1 commit is the first attempt, superseded by 2nd commit, decided not to squash them) we would use
repr
for all the values so there is no "unhashable" results reported. With the 3rd commit I added an ENH to be able to limit which keys to report -- a really small/easy addition but quite powerful, so now I can get full result of interest without additionalgrep
or alike:As you can't see here -- output formatting changed a bit as well -- now uses ';' instead of ','.
NB (edit): I guess it might be more logical to just merge this into master since got a bit too far from a bug fix.