-
Notifications
You must be signed in to change notification settings - Fork 110
BF: path from .gitmodules could not be used with source candidate template #7280
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
Conversation
template The `path` property was treated as a special case in `GitRepo.get_submodules_` presumably to not yield redundant information, because what is returned is a dict where the path is the key and the other properties from `.gitmodules` make up the value (another dict), prefixed with `gitmodule_`. However, actual usage from `get` via `subdatasets` suggests, that the easiest is to just yield this "redundant" record. Once as the reported property exactly like `url`, `datalad-id` and whatever else, and in addition let the path remain the key. Throughout that chain the latter gets possibly turned into an absolute path anyway (which is not what we want to report here - it's just for internal use). Closes datalad#7274
Codecov ReportBase: 88.72% // Head: 90.71% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## maint #7280 +/- ##
==========================================
+ Coverage 88.72% 90.71% +1.98%
==========================================
Files 326 326
Lines 44423 44431 +8
Branches 5919 5919
==========================================
+ Hits 39415 40305 +890
+ Misses 4993 4111 -882
Partials 15 15
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -0,0 +1,7 @@ | |||
### 🐛 Bug Fixes | |||
|
|||
- Fixed that the `get` command would fail, when subdataset source-candidate-templates where using the `path` property from `.gitmodules`. |
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.
since it fixes smth, could there be a unittest which would demonstrate the effect of having smth fixed?
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.
Not clear to me, @yarikoptic. Did you miss the change to test_get.py
or do you consider this somehow insufficient?
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.
Thx! I can confirm that this fixes the KeyError we saw in the office hour and that I observed when reproducing #7280
PR released in |
The
path
property was treated as a special case inGitRepo.get_submodules_
presumably to not yield redundant information, because what is returned is a dict where the path is the key and the other properties from.gitmodules
make up the value (another dict), prefixed withgitmodule_
.However, actual usage from
get
viasubdatasets
suggests, that the easiest is to just yield this "redundant" record. Once as the reported property exactly likeurl
,datalad-id
and whatever else, and in addition let the path remain the key. Throughout that chain the latter gets possibly turned into an absolute path anyway (which is not what we want to report here - it's just for internal use).Closes #7274