Skip to content

Commit

Permalink
Merge pull request #442 from ga4gh/update-patterns
Browse files Browse the repository at this point in the history
Good catch @korikuzma!
  • Loading branch information
ahwagner authored Dec 16, 2023
2 parents 8dd56c6 + cfd63a1 commit 1b68dfb
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 54 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ docs/build
venv
pyproject.toml
.vscode/settings.json
.python-version
.idea/
.DS_Store
26 changes: 13 additions & 13 deletions schema/merged.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -209,7 +209,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -285,7 +285,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -364,7 +364,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -446,7 +446,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -525,7 +525,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -600,7 +600,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand All @@ -609,7 +609,7 @@
"refgetAccession": {
"description": "A `GA4GH RefGet <http://samtools.github.io/hts-specs/refget.html>` identifier for the referenced sequence, using the sha512t24u digest.",
"type": "string",
"pattern": "SQ.[0-9A-Za-z_\\-]{32}"
"pattern": "^SQ.[0-9A-Za-z_\\-]{32}$"
},
"residueAlphabet": {
"type": "string",
Expand Down Expand Up @@ -673,7 +673,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -741,7 +741,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -798,7 +798,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -850,7 +850,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"count": {
"oneOf": [
Expand Down Expand Up @@ -946,7 +946,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down
26 changes: 13 additions & 13 deletions schema/merged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: Allele
Expand Down Expand Up @@ -146,7 +146,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: Haplotype
Expand Down Expand Up @@ -211,7 +211,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: CopyNumberCount
Expand Down Expand Up @@ -269,7 +269,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: CopyNumberChange
Expand Down Expand Up @@ -336,7 +336,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: Genotype
Expand Down Expand Up @@ -401,7 +401,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: SequenceLocation
Expand Down Expand Up @@ -456,15 +456,15 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: SequenceReference
refgetAccession:
description: A `GA4GH RefGet <http://samtools.github.io/hts-specs/refget.html>`
identifier for the referenced sequence, using the sha512t24u digest.
type: string
pattern: SQ.[0-9A-Za-z_\-]{32}
pattern: ^SQ.[0-9A-Za-z_\-]{32}$
residueAlphabet:
type: string
description: The interpretation of the character codes referred to by the
Expand Down Expand Up @@ -514,7 +514,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: ReferenceLengthExpression
Expand Down Expand Up @@ -566,7 +566,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: LengthExpression
Expand Down Expand Up @@ -609,7 +609,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: LiteralSequenceExpression
Expand Down Expand Up @@ -653,7 +653,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
count:
oneOf:
- $ref: '#/$defs/Range'
Expand Down Expand Up @@ -728,7 +728,7 @@ $defs:
description: A sha512t24u digest created using the VRS Computed Identifier
algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: ^[0-9A-Za-z_\-]{32}$
type:
type: string
const: Adjacency
Expand Down
4 changes: 2 additions & 2 deletions schema/vrs-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $defs:
digest:
description: A sha512t24u digest created using the VRS Computed Identifier algorithm.
type: string
pattern: '[0-9A-Za-z_\-]{32}'
pattern: '^[0-9A-Za-z_\-]{32}$'

Ga4ghIdentifiableObject:
inherits: ValueObject
Expand Down Expand Up @@ -366,7 +366,7 @@ $defs:
A `GA4GH RefGet <http://samtools.github.io/hts-specs/refget.html>` identifier for the referenced sequence,
using the sha512t24u digest.
type: string
pattern: 'SQ.[0-9A-Za-z_\-]{32}'
pattern: '^SQ.[0-9A-Za-z_\-]{32}$'
residueAlphabet:
type: string
description: >-
Expand Down
26 changes: 13 additions & 13 deletions schema/vrs.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -209,7 +209,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -285,7 +285,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -364,7 +364,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -446,7 +446,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -525,7 +525,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -600,7 +600,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand All @@ -609,7 +609,7 @@
"refgetAccession": {
"description": "A `GA4GH RefGet <http://samtools.github.io/hts-specs/refget.html>` identifier for the referenced sequence, using the sha512t24u digest.",
"type": "string",
"pattern": "SQ.[0-9A-Za-z_\\-]{32}"
"pattern": "^SQ.[0-9A-Za-z_\\-]{32}$"
},
"residueAlphabet": {
"type": "string",
Expand Down Expand Up @@ -673,7 +673,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -741,7 +741,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -798,7 +798,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down Expand Up @@ -850,7 +850,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"count": {
"oneOf": [
Expand Down Expand Up @@ -946,7 +946,7 @@
"digest": {
"description": "A sha512t24u digest created using the VRS Computed Identifier algorithm.",
"type": "string",
"pattern": "[0-9A-Za-z_\\-]{32}"
"pattern": "^[0-9A-Za-z_\\-]{32}$"
},
"type": {
"type": "string",
Expand Down
Loading

0 comments on commit 1b68dfb

Please sign in to comment.