-
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
feature: Add metadataTypes endpoint - readonly; available for everyone #1428
base: master
Are you sure you want to change the base?
Conversation
What is a metadata type? Can you give an example? I feel like this change should be discussed. |
@sbliven Thanks for asking! Here is an example: This is required for SciCatProject/frontend#1594 BTW you can try it yourself. As easy as switching a git branch and rebuilding the project. Once rebuild, open your browser and navigate to I recorded a short tutorial: Peek.2024-10-01.00-08.mp4Of course that implies you have a dev or testing environment i.e. db etc If you need any guides on how to do this in your env feel free to reach me out - I will be more than happy to help. |
734ac73
to
cd6c358
Compare
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.
If I understand this correctly, every call to this endpoint iterates over every dataset, groups all top-level scientificMetadata fields by key, and then returns the javascript type of the values (or 'mixed' if multiple types are present).
I have multiple objections to this.
- It doesn't work for hierarchical metadata
- The performance is going to be terrible on big instances. Facilities that don't enforce a single scientificMetadata schema will likely return tens of thousands of keys, most of which will be the useless 'mixed'.
- I think this could better be achieved using schemas for facilities that do have standardized metadata.
- It doesn't support the unitSI/valueSI convention already in use.
I do see that the frontend needs this info for search auto completion. Would one of these work?
|
I have not review the PR, but I agree with @sbliven that this feature needs to be discussed with the collaborators. alternative solution might be to build this list offline at set intervals. This solution will increase performances, but we would need to accept that the list might not need up-to-date |
@Ingvord can you be a little bit more specific why you need this endpoint? |
@sbliven Thanks for your comprehensive review! In general I agree with your objections. Though a few quantative metrics are required here. Your suggested solutions seem prominent. I would strongly support the Prospective one. But I agree with @nitrosx this requires an approval from the collaborators. I suggest we discuss this in more details via a zoom meeting (maybe on a smaller scale at first, say just three of us). And then propose whatever consensus we have at the regular collaborators meeting. Thanks again for your input! |
After talking to @Junjiequan, we should leverage the |
Add required endpoint for #613