Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/configure response #62

Merged
merged 24 commits into from
Oct 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean up new config code
gsfk committed Oct 30, 2023
commit 3a8489746b5f62972b86ec893adbbf7f4fb6855a
40 changes: 30 additions & 10 deletions bento_beacon/config_files/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import json
import os

GA4GH_BEACON_REPO_URL = "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2"


class Config:
BEACON_SPEC_VERSION = "v2.0.0"
@@ -42,7 +44,7 @@ class Config:
"defaultSchema": {
"id": "ga4gh-beacon-biosample-v2.0.0",
"name": "Default schema for biosamples",
"referenceToSchemaDefinition": "https://github.com/ga4gh-beacon/beacon-v2/blob/main/models/json/beacon-v2-default-model/biosamples/defaultSchema.json",
"referenceToSchemaDefinition": f"{GA4GH_BEACON_REPO_URL}/main/models/json/beacon-v2-default-model/biosamples/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"partOfSpecification": "Beacon v2.0.0"
@@ -54,7 +56,7 @@ class Config:
"defaultSchema": {
"id": "ga4gh-beacon-cohort-v2.0.0",
"name": "Default schema for cohorts",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/cohorts/defaultSchema.json",
"referenceToSchemaDefinition": f"{GA4GH_BEACON_REPO_URL}/main/models/json/beacon-v2-default-model/cohorts/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"partOfSpecification": "Beacon v2.0.0"
@@ -67,7 +69,7 @@ class Config:
"defaultSchema": {
"id": "ga4gh-beacon-dataset-v2.0.0",
"name": "Default schema for datasets",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/datasets/defaultSchema.json",
"referenceToSchemaDefinition": f"{GA4GH_BEACON_REPO_URL}/main/models/json/beacon-v2-default-model/datasets/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"partOfSpecification": "Beacon v2.0.0"
@@ -92,7 +94,7 @@ class Config:
"defaultSchema": {
"id": "ga4gh-beacon-variant-v2.0.0",
"name": "Default schema for a genomic variation",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/genomicVariations/defaultSchema.json",
"referenceToSchemaDefinition": f"{GA4GH_BEACON_REPO_URL}/main/models/json/beacon-v2-default-model/genomicVariations/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"partOfSpecification": "Beacon v2.0.0"
@@ -101,12 +103,30 @@ class Config:
}

INFO_ENDPOINTS_SCHEMAS = {
"/": {"entityType": "info", "schema": "https://github.com/ga4gh-beacon/beacon-v2/blob/main/framework/json/responses/beaconInfoResponse.json"},
"/configuration": {"entityType": "configuration", "schema": "https://github.com/ga4gh-beacon/beacon-v2/blob/main/framework/json/responses/beaconConfigurationResponse.json"},
"/entry_types": {"entityType": "entryType", "schema": "https://github.com/ga4gh-beacon/beacon-v2/blob/main/framework/json/responses/beaconEntryTypesResponse.json"},
"/filtering_terms": {"entityType": "filteringTerm", "schema": "https://github.com/ga4gh-beacon/beacon-v2/blob/main/framework/json/responses/beaconFilteringTermsResponse.json"},
"/info": {"entityType": "info", "schema": "https://github.com/ga4gh-beacon/beacon-v2/blob/main/framework/json/responses/beaconInfoResponse.json"},
"/map": {"entityType": "map", "schema": "https://github.com/ga4gh-beacon/beacon-v2/blob/main/framework/json/responses/beaconMapResponse.json"},
"/": {
"entityType": "info",
"schema": f"{GA4GH_BEACON_REPO_URL}/main/framework/json/responses/beaconInfoResponse.json"
},
"/configuration": {
"entityType": "configuration",
"schema": f"{GA4GH_BEACON_REPO_URL}/main/framework/json/responses/beaconConfigurationResponse.json"
},
"/entry_types": {
"entityType": "entryType",
"schema": f"{GA4GH_BEACON_REPO_URL}/main/framework/json/responses/beaconEntryTypesResponse.json"
},
"/filtering_terms": {
"entityType": "filteringTerm",
"schema": f"{GA4GH_BEACON_REPO_URL}/main/framework/json/responses/beaconFilteringTermsResponse.json"
},
"/info": {
"entityType": "info",
"schema": f"{GA4GH_BEACON_REPO_URL}/main/framework/json/responses/beaconInfoResponse.json"
},
"/map": {
"entityType": "map",
"schema": f"{GA4GH_BEACON_REPO_URL}/main/framework/json/responses/beaconMapResponse.json"
},
"/overview": {}
}
# -------------------