-
Notifications
You must be signed in to change notification settings - Fork 110
Do not use gen4
-metadata methods in datalad metadata
-command
#7001
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
Do not use gen4
-metadata methods in datalad metadata
-command
#7001
Conversation
This commit ensures that legacy metadata code in datalad core use the legacy functions to query aggregated metadata, i.e. `legacy_query_aggregated_metadata()`. This fixes an error described in issue datalad#7000.
This commit fixes the "impossible" result records that are returned if no gen4-metadata is available, but a gen4-metadata is querried. Before this commit, all queried types would be included in a tuple in a single result record. Now a result record is created for every requested type, i.e. "file" or "dataset".
This commit unifies the behavior of query_aggregated_metadata in legacy and gen4 cases. It adds a warning that is emitted, if no gen4 metadata can be found in a dataset
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.
Sorry for the delay with review
Left minor recommendations, trusting that it would just do the right thing (since no test demonstrating prior error was added). Also I think semver-path
would be more appropriate since it addresses an issue which was "user-triggered", so I will change that label.
Codecov ReportBase: 90.14% // Head: 76.06% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## maint #7001 +/- ##
===========================================
- Coverage 90.14% 76.06% -14.08%
===========================================
Files 354 355 +1
Lines 46338 59019 +12681
Branches 6613 6315 -298
===========================================
+ Hits 41771 44894 +3123
- Misses 4551 14111 +9560
+ Partials 16 14 -2
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. |
eh, I wish you have finished this PR @christian-monch ... Trying to make datalad-neuroimaging sane again I spent time solving this issue , and differently and IMHO suboptimally (I just was disabling |
FTR: checked -- actually it is not solving it for neuroimaging . Since it is done here at the level of |
@yarikoptic sorry for the delay. Will finish it now |
…le querying metadata .... eh -- might not be needed/suboptimal since there is WiP datalad#7001
Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
@yarikoptic I added a test. looking into moving it into |
Also, since Having said that, the default for the This change should therefore work with neuroimaging as well. |
This commit changes the default of `metadata_source` to be 'legacy' in the metadata code in datalad core. This restores the original semantics of search-calls as well as of `query_aggregated_metadata`.
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.
In this PR you are suggesting to revert back query_aggregated_metadata
to
- replace
None
with"all"
- make "legacy" to be default for that function and
search
As a result,query_aggregated_metadata
,metadata
andsearch
would now not error out while encountering datasets only with legacy metadata. Since it "fits my use-case" of immediate need to test datalad-neuroimaging, which I checked would pass now, I marked it as "approve".
But ideally I think it should have been more of a "any" instead of "all" which was added, and then sensing for any (legacy or gen4) was done or if indeed all are impossible, yield an impossible rec?
PS I will accept my suggestion on fixing warping of changelog entry to expedite
Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
PR released in |
Fixes #7000
This PR fixes issue #7000. It restricts legacy metadata code that implents
datalad metadata
to only use legacy metadata query methods.Changelog
🐛 Bug Fixes
datalad metadata
command ... Fixesdatalad metadata
fails withmetadata(impossible): <path> (('dataset', 'file')) [Dataset at <path> does not contain gen4 metadata]
#7000