-
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
BF/RF: Silence save result rendering in clone and download url #6446
Conversation
action summaries There is no need to evaluate whether the result renderer choice for the command class is correct in a loop - once at the start of eval_func() should suffice This reinstates result summaries for a few commands, among probably others download-url, save, and clone
Previously, a download-url would double-report: datalad download-url -O chinstrap_05.jpg https://unsplash.com/photos/8PxCm4HsPX8/download?force=true [INFO ] Downloading 'https://unsplash.com/photos/8PxCm4HsPX8/download?force=true' into '/tmp/ab/chinstrap_05.jpg' download_url(ok): /tmp/ab/chinstrap_05.jpg (file) add(ok): chinstrap_05.jpg (file) add(ok): chinstrap_05.jpg (file) save(ok): . (dataset) save(ok): . (dataset) action summary: add (ok: 1) save (ok: 1) action summary: add (ok: 1) download_url (ok: 1) save (ok: 1) Now, the result rendering of save is disabled: datalad download-url -O chinstrap_03.jpg https://unsplash.com/photos/8PxCm4HsPX8/download?force=true [INFO ] Downloading 'https://unsplash.com/photos/8PxCm4HsPX8/download?force=true' into '/tmp/ab/chinstrap_03.jpg' download_url(ok): /tmp/ab/chinstrap_03.jpg (file) add(ok): chinstrap_03.jpg (file) save(ok): . (dataset) action summary: add (ok: 1) download_url (ok: 1) save (ok: 1)
Previously, clone would overreport save results: datalad clone -d . https://gin.g-node.org/adswa/bids-data input install(ok): input (dataset) add(ok): input (file) add(ok): input (file) add(ok): .gitmodules (file) add(ok): .gitmodules (file) save(ok): . (dataset) save(ok): . (dataset) add(ok): .gitmodules (file) save(ok): . (dataset) add(ok): .gitmodules (file) save(ok): . (dataset) Now, the doubled add and save results are removed: datalad clone -d . https://gin.g-node.org/adswa/bids-data input14 install(ok): input14 (dataset) add(ok): input14 (file) add(ok): .gitmodules (file) save(ok): . (dataset) add(ok): .gitmodules (file) save(ok): . (dataset) Still, there is a duplicate .gitmodules save operation that I can't silence
Previously, an install yielded to identical results: ❱ datalad install input15 install(ok): /tmp/ab/input15 (dataset) [Installed subdataset in order to get /tmp/ab/input15] install(ok): /tmp/ab/input15 (dataset) [Installed subdataset in order to get /tmp/ab/input15] Now, it only reports one: ❱ datalad install input15 install(ok): /tmp/ab/input15 (dataset) [Installed subdataset in order to get /tmp/ab/input15]
Code Climate has analyzed commit 4e3a5b1 and detected 0 issues on this pull request. View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## master #6446 +/- ##
=======================================
Coverage 89.97% 89.97%
=======================================
Files 348 348
Lines 43859 43859
=======================================
Hits 39464 39464
Misses 4395 4395
Continue to review full report at Codecov.
|
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.
Thanks for digging through this, and the further logic simplification.
IMHO, all internal command calls that lack result_renderer='disabled'
are a bug.
A recent change has introduced double reporting for a number of commands (#6445). I haven't figured out why this change has suddenly happened, but this PR silences (
result_renderer='disabled'
) internal calls tosave
andget
that should be silenced anyway.In addition, it contains a small RF that centralizes general result renderer switches outside of a loop. Coincidentally, this RF reinstates action summaries for a few commands that had lost it (#6258)
Changelog
🐛 Bug Fixes