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

"Sync" Synapse fileview model with schematic model #10

Open
anngvu opened this issue Mar 3, 2022 · 0 comments
Open

"Sync" Synapse fileview model with schematic model #10

anngvu opened this issue Mar 3, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@anngvu
Copy link
Contributor

anngvu commented Mar 3, 2022

Originating from nf-osi/nfportalutils#35 (comment). Basically, sometimes the initial fileview needs to be updated according to changes in the source data model.

However, the schematic model currently does not contain enough info to specify a fileview. For example, if a string column, what is the size allowed? (Though the job should be able to calculate string sizes based if based on enums). If a list column, what is the list length limit?

Since our (nf.jsonld) schema is dynamic, I wonder if we could have a, say, weekly job that does the following:

  • check for changes to jsonld schema since last run, if no changes, stop
  • if changes, iterate over each project view schema:
  • for each view, first run syn._get_annotation_view_columns() to get all annotations on files within scope of view
  • then, for all annotation keys that are defined parents in the jsonld schema:
  • Set as STRINGLIST if lists are permitted in jsonld schema.
  • Set as other column types as necessary (maybe we need to define these in the jsonld?)
  • modify the maximumSize to the max length valid value if a string/stringlist.
  • set as max length, say, 50, if string type but valid values are not restricted.
  • for all columns not in the jsonld schema, include them in the view unchanged (ie use the schema that syn._get_annotation_view_columns() returns)
  • if total number columns >152, skip (and send log via email?)
  • repeat on all NF Portal study views
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant