-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: make versions infos endoint consistent with mehari
- Loading branch information
Showing
14 changed files
with
305 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,3 +105,38 @@ jobs: | |
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: lcov.info | ||
|
||
Schema: | ||
needs: Formatting | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y librocksdb-dev libsnappy-dev libsqlite3-dev | ||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Setup protoc | ||
uses: arduino/[email protected] | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Write schema | ||
run: cargo run -- server schema --output-file /tmp/openapi.schema.yaml-gen | ||
|
||
- name: Copy repo schema and strip versions | ||
run: | | ||
cp openapi.schema.yaml /tmp/openapi.schema.yaml-repo | ||
perl -p -i -e 's/^ version: .*/ version: 0.0.0/' /tmp/*.yaml-* | ||
- name: Compare YAML in git to the one just generated | ||
run: diff /tmp/openapi.schema.yaml-repo /tmp/openapi.schema.yaml-gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name = "annonars" | |
version = "0.41.3" | ||
edition = "2021" | ||
authors = ["Manuel Holtgrewe <[email protected]>"] | ||
description = "Rust template repository" | ||
description = "Genome annotation based on Rust and RocksDB" | ||
license = "Apache-2.0" | ||
repository = "https://github.com/varfish-org/annonars" | ||
readme = "README.md" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: annonars | ||
description: Genome annotation based on Rust and RocksDB | ||
contact: | ||
name: Manuel Holtgrewe | ||
email: [email protected] | ||
license: | ||
name: Apache-2.0 | ||
version: 0.41.3 | ||
paths: | ||
/api/v1/versionsInfo: | ||
get: | ||
tags: | ||
- versions | ||
summary: Query for annotations for one variant. | ||
operationId: versionsInfo | ||
parameters: [] | ||
responses: | ||
'200': | ||
description: Version information. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/VersionsResponse' | ||
'500': | ||
description: Internal server error. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/CustomError' | ||
components: | ||
schemas: | ||
AnnoDb: | ||
type: string | ||
description: Encode annotation database. | ||
enum: | ||
- other | ||
- cadd | ||
- dbsnp | ||
- dbnsfp | ||
- dbscsnv | ||
- gnomad_mtdna | ||
- gnomad_exomes | ||
- gnomad_genomes | ||
- helixmtdb | ||
- ucsc_conservation | ||
- clinvar | ||
CustomError: | ||
type: object | ||
description: Custom error type for the Actix server. | ||
required: | ||
- err | ||
properties: | ||
err: | ||
type: string | ||
GenomeRelease: | ||
type: string | ||
description: Local genome release for command line arguments. | ||
enum: | ||
- Grch37 | ||
- Grch38 | ||
VersionsAnnotationInfo: | ||
type: object | ||
description: Version information for one database. | ||
required: | ||
- database | ||
properties: | ||
database: | ||
$ref: '#/components/schemas/AnnoDb' | ||
version_spec: | ||
allOf: | ||
- $ref: '#/components/schemas/VersionsVersionSpec' | ||
nullable: true | ||
VersionsCreatedFrom: | ||
type: object | ||
description: Source name and version. | ||
required: | ||
- name | ||
- version | ||
properties: | ||
name: | ||
type: string | ||
description: The name of the data source. | ||
version: | ||
type: string | ||
description: The version of the data source. | ||
VersionsInfoQuery: | ||
type: object | ||
description: Query parameters for `handle()`. | ||
VersionsInfoResponse: | ||
type: object | ||
description: Response for `handle()`. | ||
properties: | ||
genes: | ||
allOf: | ||
- $ref: '#/components/schemas/VersionsVersionSpec' | ||
nullable: true | ||
seqvars: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/VersionsPerRelease' | ||
description: Version information of annotation databases per release. | ||
VersionsPerRelease: | ||
type: object | ||
description: Version information for databases in a given release. | ||
required: | ||
- release | ||
properties: | ||
release: | ||
$ref: '#/components/schemas/GenomeRelease' | ||
version_infos: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/VersionsAnnotationInfo' | ||
description: Version information of annotation databases. | ||
VersionsVersionSpec: | ||
type: object | ||
description: Version specification. | ||
required: | ||
- identifier | ||
- title | ||
- creator | ||
- contributor | ||
- format | ||
- date | ||
- version | ||
- description | ||
- source | ||
- created_from | ||
properties: | ||
identifier: | ||
type: string | ||
description: Identifier of the data. | ||
title: | ||
type: string | ||
description: Title of the data. | ||
creator: | ||
type: string | ||
description: Creator of the data. | ||
contributor: | ||
type: array | ||
items: | ||
type: string | ||
description: Contributors of the data. | ||
format: | ||
type: string | ||
description: Format of the data. | ||
date: | ||
type: string | ||
description: Date of the data. | ||
version: | ||
type: string | ||
description: Version of the data. | ||
genome_release: | ||
type: string | ||
description: Optional genome release. | ||
nullable: true | ||
description: | ||
type: string | ||
description: Data description. | ||
source: | ||
type: array | ||
items: | ||
type: string | ||
description: Data source. | ||
created_from: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/VersionsCreatedFrom' | ||
description: Created from information. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.