ga4gh-discovery / ga4gh-case-discovery

A framework for searching genomic data sharing services
Apache License 2.0
8 stars 5 forks source link

How do we specify new components? #26

Open Relequestual opened 6 years ago

Relequestual commented 6 years ago

This question is two fold. What is our PROCESS for specifying new components? What do we USE to specify new components?

I will be working on what do we USE, as I'd like to put forward JSON Schema, as we can then have a file for each component. This allows each component to be updated in silo.

Relequestual commented 6 years ago

I intend to resolve this by writing some JSON Schema files. I should also document the expectations on how they should be updated.

colinveal commented 6 years ago

Hi not sure where to put this, but here are some potential components. They are in the nested structure, but obviously the relevant parts can be flattened for the first version. (Also no need for operators in first version)

CV_components

Relequestual commented 6 years ago

Hi @colinveal, Thanks for providing this information. Currently I'm creating the JSON Schema files in YAML, which is close to what you've done. I'm creating each component as a separate file, which keeps things easy to see and update as required.

You can see the current "variant" component here: https://github.com/Relequestual/ga4gh-discovery-search-api/blob/json-schema/json_schema/schemas_source/components/record/variant.yaml

If you want to make modifications, you can make pull requests my fork on that branch, as these schemas have not yet been merged into this repo. Updating that branch updates PR #30 which is where the majority of the work for formalising 1.0.0 is happening.

I haven't added a travis CI script yet, but you should make sure all the schema files are valid YAML and convert to the expected JSON versions. If you checkout my fork on that branch, you can run npm install followed by npm run yaml2json which will convert the yaml to json as proof. There are a few other scripts found in the package.json file.