-
Notifications
You must be signed in to change notification settings - Fork 24
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
Scientific Metadata with / without '.value' (or ' .v') #138
Comments
@linupi : I agree with your suggestion about helper functions when retrieving, updating and query metadata.
or
I would also provide a script/function to manage the transition from current status to the one above, so we transform the v and u keys to value and unit respectively |
It looks like 'string' metadata use the second form ( value + empty unit) when creating them from the frontend. |
ping... |
Going through this issue in more detail it seems to me we do not need any generalised helper to deal with different cases as suggested by @linupi back in 2022, but rather implement value + optional unit as mentioned here by @nitrosx : property : { 'value': value, 'unit': '' } This should solve #119, ie. the issue of finding meta data by inputting only part of a string without any unit, right? |
well back in 2022 I just described the discrepancy of what existed in the old backend compared to the new one. The old one generally worked with so in conclusion I strongly tend to suggest to not enforce |
I think we should refactor the code to accept with and without the value field to make it backward compatible with alder entries. |
I propose that SciCat can correctly work and represent the following cases:
I will leave it up to each facilities if they want to enforce any of the above formats and which ones |
Scientific Metadata with / without '.value
Summary
when working on #119 we saw that for the new SciCat backend there is currently no support for metadata outside the '.value', '.unit' scheme. In #119 (comment)_ there is an example of scientific metadata from PSI that falls in this category:
Originally posted by @stephan271 in #119 (comment)
Expected Behaviour
like in the old backend the frontend search should work also on any string and integer values in the metadata without having a 'unit' / 'value'. Further in the example above 'v' and 'u' instead of 'value' and 'unit'.
I have the feeling it would make sense to provide a sort of generic helper to deal with the different options of having .value, .value+.unit or none of them. Currently '.value' is hardcoded in the new backend code e.g.
The text was updated successfully, but these errors were encountered: