Skip to content
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

294 add arbitrary metadata #295

Merged
merged 4 commits into from
Oct 19, 2021
Merged

294 add arbitrary metadata #295

merged 4 commits into from
Oct 19, 2021

Conversation

jLebioda
Copy link
Collaborator

@jLebioda jLebioda commented Oct 1, 2021

For now added an importable/exportable textual field "scientific_metadata" to Project/Cohort/Dataset/Partner (in CoreTrackedModel); it defaults to {}.

No validation is currently in place - we could either already merge it and add it in the (close) future for the sake of unblocking the development, or I could add some validators (thinking of RegexValidator on the field - AFAIK there's no out-of-the-box JSON validators)

@jLebioda
Copy link
Collaborator Author

jLebioda commented Oct 1, 2021

@neoflex @vildead it should be ready to be merged if you wanted to commence the works on the Datacatalog's side.

Figuring out a good way of dealing with validation might take me some time...

Currently thinking about implementing clean() for CoreTrackedModel as it's toggled automatically, but trying to parse JSON data in that method would actually mean that the JSON will be parsed every single time the model changes

@jLebioda
Copy link
Collaborator Author

jLebioda commented Oct 5, 2021

@vildead @neoflex Validation and tests for it were added, if the tests do pass, it can be already merged

@jLebioda jLebioda added this to the 2021-10 milestone Oct 5, 2021
@jLebioda
Copy link
Collaborator Author

jLebioda commented Oct 5, 2021

Note from the meeting: Maybe a JSON schema validation for the metadata could be helpful as well?

@jLebioda jLebioda added the waiting-for-merge Issue has been implemented, waiting to be merged label Oct 5, 2021
@vildead
Copy link
Member

vildead commented Oct 18, 2021

To discuss: I think we should allow independent import of a scientific metadata. Now it is included in the entity import JSON under "metadata" key. This can get tricky for example for dataset which has some required fields.
So another importer + command will be required.

@vildead vildead merged commit d6dddbc into develop Oct 19, 2021
@vildead vildead linked an issue Oct 19, 2021 that may be closed by this pull request
@jLebioda jLebioda deleted the 294-add-arbitrary-metadata branch October 29, 2021 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-merge Issue has been implemented, waiting to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for addition of arbitrary metadata to DAISY entities
2 participants