ENH(UX): state original purpose in NoDatasetFound exception + detail it for get#5708
Merged
yarikoptic merged 1 commit intodatalad:maintfrom Aug 5, 2021
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## maint #5708 +/- ##
===========================================
- Coverage 90.32% 45.00% -45.33%
===========================================
Files 300 297 -3
Lines 42390 42311 -79
===========================================
- Hits 38289 19040 -19249
- Misses 4101 23271 +19170
Continue to review full report at Codecov.
|
Member
Author
travis fail seems to be a fluke -- restarted======================================================================
ERROR: datalad.interface.tests.test_download_url.test_download_url_need_datalad_remote
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/dl-miniconda-071p_u0_/lib/python3.8/site-packages/nose/case.py", line 198, in runTest
self.test(*self.arg)
File "/tmp/dl-miniconda-071p_u0_/lib/python3.8/site-packages/datalad/tests/utils.py", line 189, in _wrap_skip_if_no_network
return func(*args, **kwargs)
File "/tmp/dl-miniconda-071p_u0_/lib/python3.8/site-packages/datalad/tests/utils.py", line 764, in _wrap_with_tempfile
return t(*(arg + (filename,)), **kw)
File "/tmp/dl-miniconda-071p_u0_/lib/python3.8/site-packages/datalad/interface/tests/test_download_url.py", line 243, in test_download_url_need_datalad_remote
ds_b.get("foo")
File "/tmp/dl-miniconda-071p_u0_/lib/python3.8/site-packages/datalad/distribution/dataset.py", line 503, in apply_func
return f(**kwargs)
File "/tmp/dl-miniconda-071p_u0_/lib/python3.8/site-packages/datalad/interface/utils.py", line 481, in eval_func
return return_func(generator_func)(*args, **kwargs)
File "/tmp/dl-miniconda-071p_u0_/lib/python3.8/site-packages/datalad/interface/utils.py", line 474, in return_func
results = list(results)
File "/tmp/dl-miniconda-071p_u0_/lib/python3.8/site-packages/datalad/interface/utils.py", line 459, in generator_func
raise IncompleteResultsError(
datalad.support.exceptions.IncompleteResultsError: Command did not complete successfully. 1 failed:
[{'action': 'get',
'annexkey': 'MD5E-s4008--ef4867d3c21a0034a98cd9453f14efe3',
'message': 'not available',
'path': '/tmp/datalad_temp_test_download_url_need_datalad_remoteyb5mvyuc/b/foo',
'refds': '/tmp/datalad_temp_test_download_url_need_datalad_remoteyb5mvyuc/b',
'status': 'error',
'type': 'file'}] |
Member
Author
|
@datalad/developers - any feedback on this one? |
yarikoptic
added a commit
to yarikoptic/datalad
that referenced
this pull request
Jun 10, 2021
We had a mix, and even though "ing form was probably more prevalent, I felt that shorter
imperative form would be better, even though it would be not "for {purpose}" but
"to {purpose}" if to be displayed. (as eg in datalad#5708)
bpoldrack
reviewed
Jun 10, 2021
e35831d to
047c1cf
Compare
Member
Author
|
eh, forgot about this one. rebased for a good measure. If no objections -- will merge unless some new findings are discovered. |
Member
Author
|
FWIW: still works |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have seen those reported by users, and I must confess that some of those stem from the confusing interface of
install+ RFing which leadinstall/getto unable to operate on arbitrary paths (#3759). But I think that such error might come up in other use-cases as well. So before this PR users might get:which leaves them wondering on WTF (error message nohow points to
dest) and needing to ask/RTFM etc to figure out that they needed-s. With this change it would look likeit is still not perfect but it immediately points to the underlying culprit.