-
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: Don't make create-sibling recursive by default #6116
Conversation
By default, create-sibling was erroneously recursing into the first level of subdatasets of a dataset, creating additional, unwanted siblings. (see datalad#5614 for a corresponding issue) This was due to a flawed logic with regard to --since: --since by definition is only operating on subdatasets, but that would require a recursive flag to be set. Yet even without a recursive flag, create-sibling evaluated subdatasets states for since, and with this, it added the first level of subdatasets of any given dataset into the list of to-be-considered datasets for sibling creation. The change in this commit catches the use of since without a correspoding recursive flag early on and raises a ValueError. It also only evaluates state of subdatasets if there is any need for recursion - if not, it simply just considers the given dataset.
…reate-sibling)
Codecov Report
@@ Coverage Diff @@
## maint #6116 +/- ##
==========================================
- Coverage 90.23% 87.97% -2.26%
==========================================
Files 312 312
Lines 42219 42235 +16
==========================================
- Hits 38095 37157 -938
- Misses 4124 5078 +954
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.
I'd say that the reasoning and approach are correct. But a test isn't happy about it. It may well be that it actually tests undesirable behavior.
Ahh, thx, I hadn't enabled those locally. Mhh, I think it is a question of defining what |
The Appveyor failure is unrelated (but it is already the second time that I saw it in currently open PRs):
I can squish the two commits in this PR if my interpretation of what |
We accumulated a good number of fixes in |
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!
I took the liberty to amend and force-push the last commit (no longer TMP, and adjusts the since
docstring to make explicit that this is about changed subdatasets).
Will merge as soon as the tests have finished.
This fixes #5614: I prevents an accidental recursion of one level by not evaluating subdataset states - which should not play any role for the sibling creation of the toplevel ds - only when the recursive flag is set.
It also adds a check for concurrent occurrence of
--since
with--recursive
- Given the description of--since
, I believe that it requires recursion and is thus useless if used without--recursive
.