Skip to content

Commit

Permalink
Add default value for types + update readme for using smoketests
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma committed Apr 13, 2022
1 parent 6832824 commit c79382b
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ initiatives, and diagnostic testing laboratories.
VRS is licensed under the [Apache License 2.0](LICENSE).


> **NOTE:** VRS is under active development. See [VR
> **NOTE:** VRS is under active development. See [VR
> Project Roadmap](https://github.com/orgs/ga4gh/projects/5).

Expand Down Expand Up @@ -67,12 +67,12 @@ To watch for changes and update automatically:

The VR specification documentation is written in reStructuredText and
located in `docs/source/`. Commits to this repo are built
automatically at `vrs.ga4gh.org`.
automatically at `vrs.ga4gh.org`.

To build documentation locally, type:

make -C docs clean watch &

Then, open `docs/build/html/index.html`. The above make command
should build docs when source changes. (Some types of changes require
recleaning and building.)
Expand All @@ -95,7 +95,7 @@ The smoketests require python 3.8+. This is the recommended setup:
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -U setuptools pip
$ pip install -r requirements.txt
$ pytest
$ pip install -r .requirements.txt
$ python3 -m pytest
```
20 changes: 20 additions & 0 deletions schema/vrs-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ definitions:
type:
type: string
const: "Allele"
default: "Allele"
description: >-
MUST be "Allele"
location:
Expand Down Expand Up @@ -116,6 +117,7 @@ definitions:
type:
type: string
const: "Haplotype"
default: "Haplotype"
description: >-
MUST be "Haplotype"
members:
Expand Down Expand Up @@ -143,6 +145,7 @@ definitions:
type:
type: string
const: "Text"
default: "Text"
description: MUST be "Text"
definition:
type: string
Expand All @@ -160,6 +163,7 @@ definitions:
type:
type: string
const: "VariationSet"
default: "VariationSet"
description: MUST be "VariationSet"
members:
type: array
Expand Down Expand Up @@ -189,6 +193,7 @@ definitions:
type:
type: string
const: "AbsoluteCopyNumber"
default: "AbsoluteCopyNumber"
description: >-
MUST be "AbsoluteCopyNumber"
subject:
Expand Down Expand Up @@ -254,6 +259,7 @@ definitions:
type:
type: string
const: "RelativeCopyNumber"
default: "RelativeCopyNumber"
description: >-
MUST be "RelativeCopyNumber"
subject:
Expand Down Expand Up @@ -302,6 +308,7 @@ definitions:
type:
type: string
const: "ChromosomeLocation"
default: "ChromosomeLocation"
description: MUST be "ChromosomeLocation"
species_id:
$ref: "#/definitions/CURIE"
Expand Down Expand Up @@ -330,6 +337,7 @@ definitions:
type:
type: string
const: "SequenceLocation"
default: "SequenceLocation"
description: MUST be "SequenceLocation"
sequence_id:
$ref: "#/definitions/CURIE"
Expand Down Expand Up @@ -364,6 +372,7 @@ definitions:
type:
type: string
const: "SequenceInterval"
default: "SequenceInterval"
description: MUST be "SequenceInterval"
start:
oneOf:
Expand Down Expand Up @@ -463,6 +472,7 @@ definitions:
type:
type: string
const: "CytobandInterval"
default: "CytobandInterval"
description: MUST be "CytobandInterval"
start:
$ref: "#/definitions/HumanCytoband"
Expand Down Expand Up @@ -510,6 +520,7 @@ definitions:
type:
type: string
const: "LiteralSequenceExpression"
default: "LiteralSequenceExpression"
description: MUST be "LiteralSequenceExpression"
sequence:
$ref: "#/definitions/Sequence"
Expand All @@ -530,6 +541,7 @@ definitions:
type:
type: string
const: "DerivedSequenceExpression"
default: "DerivedSequenceExpression"
description: MUST be "DerivedSequenceExpression"
location:
$ref: "#/definitions/SequenceLocation"
Expand All @@ -551,6 +563,7 @@ definitions:
type:
type: string
const: "RepeatedSequenceExpression"
default: "RepeatedSequenceExpression"
description: MUST be "RepeatedSequenceExpression"
seq_expr:
oneOf:
Expand Down Expand Up @@ -613,6 +626,7 @@ definitions:
type:
type: string
const: "ComposedSequenceExpression"
default: "ComposedSequenceExpression"
description: MUST be "ComposedSequenceExpression"
components:
type: array
Expand Down Expand Up @@ -662,6 +676,7 @@ definitions:
type:
type: string
const: "Gene"
default: "Gene"
description: MUST be "Gene"
gene_id:
$ref: "#/definitions/CURIE"
Expand All @@ -681,6 +696,7 @@ definitions:
type:
type: string
const: "Number"
default: "Number"
description: MUST be "Number"
value:
type: integer
Expand All @@ -696,6 +712,7 @@ definitions:
type:
type: string
const: "DefiniteRange"
default: "DefiniteRange"
description: MUST be "DefiniteRange"
min:
type: number
Expand All @@ -717,6 +734,7 @@ definitions:
type:
type: string
const: "IndefiniteRange"
default: "IndefiniteRange"
description: MUST be "IndefiniteRange"
value:
type: number
Expand Down Expand Up @@ -793,6 +811,7 @@ definitions:
type:
type: string
const: "SequenceState"
default: "SequenceState"
description: MUST be "SequenceState"
sequence:
$ref: "#/definitions/Sequence"
Expand All @@ -815,6 +834,7 @@ definitions:
type:
type: string
const: "SimpleInterval"
default: "SimpleInterval"
description: MUST be "SimpleInterval"
start:
type: integer
Expand Down
20 changes: 20 additions & 0 deletions schema/vrs.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"type": {
"type": "string",
"const": "Allele",
"default": "Allele",
"description": "MUST be \"Allele\""
},
"location": {
Expand Down Expand Up @@ -122,6 +123,7 @@
"type": {
"type": "string",
"const": "Haplotype",
"default": "Haplotype",
"description": "MUST be \"Haplotype\""
},
"members": {
Expand Down Expand Up @@ -158,6 +160,7 @@
"type": {
"type": "string",
"const": "Text",
"default": "Text",
"description": "MUST be \"Text\""
},
"definition": {
Expand All @@ -182,6 +185,7 @@
"type": {
"type": "string",
"const": "VariationSet",
"default": "VariationSet",
"description": "MUST be \"VariationSet\""
},
"members": {
Expand Down Expand Up @@ -218,6 +222,7 @@
"type": {
"type": "string",
"const": "AbsoluteCopyNumber",
"default": "AbsoluteCopyNumber",
"description": "MUST be \"AbsoluteCopyNumber\""
},
"subject": {
Expand Down Expand Up @@ -336,6 +341,7 @@
"type": {
"type": "string",
"const": "RelativeCopyNumber",
"default": "RelativeCopyNumber",
"description": "MUST be \"RelativeCopyNumber\""
},
"subject": {
Expand Down Expand Up @@ -399,6 +405,7 @@
"type": {
"type": "string",
"const": "ChromosomeLocation",
"default": "ChromosomeLocation",
"description": "MUST be \"ChromosomeLocation\""
},
"species_id": {
Expand Down Expand Up @@ -434,6 +441,7 @@
"type": {
"type": "string",
"const": "SequenceLocation",
"default": "SequenceLocation",
"description": "MUST be \"SequenceLocation\""
},
"sequence_id": {
Expand Down Expand Up @@ -466,6 +474,7 @@
"type": {
"type": "string",
"const": "SequenceInterval",
"default": "SequenceInterval",
"description": "MUST be \"SequenceInterval\""
},
"start": {
Expand Down Expand Up @@ -639,6 +648,7 @@
"type": {
"type": "string",
"const": "CytobandInterval",
"default": "CytobandInterval",
"description": "MUST be \"CytobandInterval\""
},
"start": {
Expand Down Expand Up @@ -689,6 +699,7 @@
"type": {
"type": "string",
"const": "LiteralSequenceExpression",
"default": "LiteralSequenceExpression",
"description": "MUST be \"LiteralSequenceExpression\""
},
"sequence": {
Expand All @@ -709,6 +720,7 @@
"type": {
"type": "string",
"const": "DerivedSequenceExpression",
"default": "DerivedSequenceExpression",
"description": "MUST be \"DerivedSequenceExpression\""
},
"location": {
Expand All @@ -734,6 +746,7 @@
"type": {
"type": "string",
"const": "RepeatedSequenceExpression",
"default": "RepeatedSequenceExpression",
"description": "MUST be \"RepeatedSequenceExpression\""
},
"seq_expr": {
Expand Down Expand Up @@ -841,6 +854,7 @@
"type": {
"type": "string",
"const": "ComposedSequenceExpression",
"default": "ComposedSequenceExpression",
"description": "MUST be \"ComposedSequenceExpression\""
},
"components": {
Expand Down Expand Up @@ -897,6 +911,7 @@
"type": {
"type": "string",
"const": "Gene",
"default": "Gene",
"description": "MUST be \"Gene\""
},
"gene_id": {
Expand All @@ -917,6 +932,7 @@
"type": {
"type": "string",
"const": "Number",
"default": "Number",
"description": "MUST be \"Number\""
},
"value": {
Expand All @@ -937,6 +953,7 @@
"type": {
"type": "string",
"const": "DefiniteRange",
"default": "DefiniteRange",
"description": "MUST be \"DefiniteRange\""
},
"min": {
Expand All @@ -962,6 +979,7 @@
"type": {
"type": "string",
"const": "IndefiniteRange",
"default": "IndefiniteRange",
"description": "MUST be \"IndefiniteRange\""
},
"value": {
Expand Down Expand Up @@ -1018,6 +1036,7 @@
"type": {
"type": "string",
"const": "SequenceState",
"default": "SequenceState",
"description": "MUST be \"SequenceState\""
},
"sequence": {
Expand All @@ -1043,6 +1062,7 @@
"type": {
"type": "string",
"const": "SimpleInterval",
"default": "SimpleInterval",
"description": "MUST be \"SimpleInterval\""
},
"start": {
Expand Down
Loading

0 comments on commit c79382b

Please sign in to comment.