cidgoh / DataHarmonizer

A standardized browser-based spreadsheet editor and validator that can be run offline and locally, and which includes templates for SARS-CoV-2 and Monkeypox sampling data. This project, created by the Centre for Infectious Disease Genomics and One Health (CIDGOH), at Simon Fraser University, is now an open-source collaboration with contributions from the National Microbiome Data Collaborative (NMDC), the LinkML development team, and others.
MIT License
97 stars 27 forks source link

Importing data and schema configuration from standard JSON file #435

Closed kennethbruskiewicz closed 1 week ago

kennethbruskiewicz commented 7 months ago

Riffing off of this: https://github.com/cidgoh/DataHarmonizer/issues/431#issuecomment-2071096888

given a data structure like:

{
    "schema": "https://www.example.com/GRDI",
    "version": "10.0.0",
    "GRDI_Sample": [ /* list items*/ ],
    "AMR_Test": [ /* list items*/ ]
}

we can imagine using the "in_language" property like

{
    "schema": "https://www.example.com/GRDI",
    "version": "10.0.0",
    "in_language": "fr",
    "GRDI_Sample": [ /* list items*/ ],
    "AMR_Test": [ /* list items*/ ]
}

This closes the import-export loop for the application, allowing users to save where they left off and have the application state restored to normal. It also means that when the file is passed around, it can self-document what the language content is.

This seems good-enough, with the only possible extension being a self-referential or error-checkable hash that can ensure file integrity.

ddooley commented 7 months ago

Good, but as noted in other thread the top-level objects of this should match directly the Container spec in the schema I think, so plural GRDI_Samples, etc...

ddooley commented 1 week ago

Resolved in upcoming DH2-i18n-rc1 branch.