BF: Don't suppress datalad subdatasets output#6035
Conversation
Codecov Report
@@ Coverage Diff @@
## maint #6035 +/- ##
==========================================
- Coverage 90.17% 88.17% -2.01%
==========================================
Files 312 312
Lines 42134 42139 +5
==========================================
- Hits 37995 37155 -840
- Misses 4139 4984 +845
Continue to review full report at Codecov.
|
|
Thanks much for this PR! I would say this PR can go against the I have presently no idea re the cause of this failure: https://app.travis-ci.com/github/datalad/datalad/jobs/541349553 |
|
@DisasterMo You will need to (cherry-)pick the commit with the actual change, and base that off of |
|
Oh, now I understand. I won't need help with that, but why merge it into |
|
The reason is that we will release from |
8702574 to
0c038cf
Compare
|
FTR: The test failure posted above is real. I can replicate it locally. |
|
I found the cause for the test failure. I cannot push directly to this branch, hence I am attaching the patch. From 1d5081d06aea747c6f02748d0c87eb2ff773c026 Mon Sep 17 00:00:00 2001
From: Michael Hanke <michael.hanke@gmail.com>
Date: Wed, 6 Oct 2021 08:03:18 +0200
Subject: [PATCH] Disable result rendering for internal `subdatasets()` call in
`get()`
The yielded results are inspected by `get` and evaluated in the context
of a get operation. A premature rendering by `subdatasets()` itself
is undesireable.
---
datalad/distribution/get.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/datalad/distribution/get.py b/datalad/distribution/get.py
index b550595d9..161ee258e 100644
--- a/datalad/distribution/get.py
+++ b/datalad/distribution/get.py
@@ -859,7 +859,8 @@ class Get(Interface):
recursive=True if path else recursive,
recursion_limit=None if path else recursion_limit,
return_type='generator',
- on_failure='ignore'):
+ on_failure='ignore',
+ result_renderer='disabled'):
if sdsres.get('type', None) != 'dataset':
# if it is not about a 'dataset' it is likely content in
# the root dataset
--
2.33.0
|
The yielded results are inspected by `get` and evaluated in the context of a get operation. A premature rendering by `subdatasets()` itself is undesireable.
0c038cf to
64d6cbd
Compare
|
@mih Thanks! Should I squash the commits, or how is the policy here? |
|
No need to squash, we prefer the full history. thx! |
|
All green. Let's go. Thx much @DisasterMo |
Changes
Add
custom_result_renderer()toSubdatasetscommand class as a wrapper fordefault_result_renderer().Now
datalad subdatasetswill actually do what it's supposed to: list all present subdatasets without suppressing the output.Related Issues
Fixes #4770