Skip to content

Commit

Permalink
2.0.9
Browse files Browse the repository at this point in the history
Mostly work on schemas and generated documentation:

* removing examples etc. from the schemas since they're not tracked and don't represent anything bycon specific
* adjusting $ref pointers to use progenetix instead of the beacon-v2 Github files (which is an odd design anyway)
* starting to improve top-level "description"s in schemas, which are then parsed using `markdowner.py`
  • Loading branch information
mbaudis committed Nov 10, 2024
1 parent 717906d commit e905b1d
Show file tree
Hide file tree
Showing 122 changed files with 621 additions and 2,591 deletions.
239 changes: 124 additions & 115 deletions bycon/config/entity_defaults.yaml
Original file line number Diff line number Diff line change
@@ -1,76 +1,59 @@
info:
description: >-
The `info` endpoint provides information about the Beacon, such as its name,
the organization responsible for the Beacon, a contact email,
and the API version. It is based on the GA4GH `service-info` standard.
request_entity_path_id: info
request_entity_path_aliases:
- "/"
- "service-info"
- "service_info"
response_entity_id: info
response_schema: beaconInfoResponse
bycon_response_class: BeaconInfoResponse
beacon_schema:
entity_type: configuration
schema: https://progenetix.org/services/schemas/beaconInfoResults/
is_beacon_entity: true
content: {}

################################################################################

beaconMap:
description: >-
The `beaconMap` object provides a map of the Beacon's REST endpoints.
request_entity_path_id: map
response_entity_id: beaconMap
collection: Null
response_schema: beaconMapResponse
bycon_response_class: BeaconInfoResponse
beacon_schema:
entity_type: map
schema: https://progenetix.org/services/schemas/beaconMapSchema/
is_beacon_entity: true

################################################################################

configuration:
request_entity_path_id: configuration
response_entity_id: configuration
dataset:
request_entity_path_id: datasets
response_entity_id: dataset
collection: Null
response_schema: beaconConfigurationResponse
bycon_response_class: BeaconInfoResponse
response_schema: beaconCollectionsResponse
bycon_response_class: BeaconDataResponse
beacon_schema:
entity_type: configuration
schema: https://progenetix.org/services/schemas/beaconConfigurationSchema/
entity_type: dataset
schema: https://progenetix.org/services/schemas/dataset/
pagination:
skip: 0
limit: 10
is_beacon_entity: true
path_id_value_bycon_parameter: dataset_ids
examples:
- /progenetix

################################################################################
##############################################################################

entryType:
request_entity_path_id: entry_types
response_entity_id: entryType
collection: Null
response_schema: beaconEntryTypesResponse
bycon_response_class: BeaconInfoResponse
cohort:
request_entity_path_id: cohorts
response_entity_id: cohort
collection: collations
response_schema: beaconCollectionsResponse
bycon_response_class: BeaconDataResponse
beacon_schema:
entity_type: entryType
schema: https://progenetix.org/services/schemas/entryTypesSchema/
entity_type: cohort
schema: https://progenetix.org/services/schemas/cohort/
pagination:
skip: 0
limit: 10
is_beacon_entity: true
path_id_value_bycon_parameter: filters

################################################################################

filteringTerm:
request_entity_path_id: filtering_terms
response_entity_id: filteringTerm
collection: collations
response_schema: beaconFilteringTermsResponse
genomicVariant:
request_entity_path_id: g_variants
request_entity_path_aliases:
- genomicVariations
- variants
response_entity_id: genomicVariant
collection: variants
response_schema: beaconResultsetsResponse
bycon_response_class: BeaconDataResponse
beacon_schema:
entity_type: filteringTerm
schema: https://progenetix.org/services/schemas/filteringTermsSchema/
entity_type: genomicVariant
schema: https://progenetix.org/services/schemas/genomicVariant/
h->o_access_key: variants.id
is_beacon_entity: true
path_id_value_bycon_parameter: filters
path_id_value_bycon_parameter: variant_ids
examples:
- /pgxvar-5bab576a727983b2e00b8d32
- /pgxvar-5bab576a727983b2e00b8d32/individuals
- ?geneId=CDKN2A&variantMaxSize=100000&limit=5
- ?referenceName=NC_000017.11&start=7577120&referenceBases=G&alternateBases=A

################################################################################

Expand All @@ -87,6 +70,21 @@ analysis:
is_beacon_entity: true
path_id_value_bycon_parameter: analysis_ids

##############################################################################

run:
request_entity_path_id: runs
response_entity_id: run
collection: analyses
response_schema: beaconResultsetsResponse
bycon_response_class: BeaconDataResponse
beacon_schema:
entity_type: run
schema: https://progenetix.org/services/schemas/run/
h->o_access_key: analyses.id
is_beacon_entity: true
path_id_value_bycon_parameter: run_ids

################################################################################

biosample:
Expand All @@ -103,28 +101,10 @@ biosample:
h->o_access_key: biosamples.id
is_beacon_entity: true
path_id_value_bycon_parameter: biosample_ids
tests:
examples:
- ?filters=NCIT:C4017&limit=3
- ?referenceName=refseq:NC_000009.12&variantType=EFO:0030067&start=21000000,21975098&end=21967753,23000000&filters=NCIT:C3058&limit=10

##############################################################################

genomicVariant:
request_entity_path_id: g_variants
request_entity_path_aliases:
- genomicVariations
- variants
response_entity_id: genomicVariant
collection: variants
response_schema: beaconResultsetsResponse
bycon_response_class: BeaconDataResponse
beacon_schema:
entity_type: genomicVariant
schema: https://progenetix.org/services/schemas/genomicVariant/
h->o_access_key: variants.id
is_beacon_entity: true
path_id_value_bycon_parameter: variant_ids
tests:
- ?geneId=CDKN2A&variantMaxSize=100000&limit=5

##############################################################################

Expand All @@ -140,55 +120,84 @@ individual:
h->o_access_key: individuals.id
is_beacon_entity: true
path_id_value_bycon_parameter: individual_ids
tests:
examples:
- ?filters=EFO:0030049&limit=5

##############################################################################

run:
request_entity_path_id: runs
response_entity_id: run
collection: analyses
response_schema: beaconResultsetsResponse
################################################################################

filteringTerm:
request_entity_path_id: filtering_terms
response_entity_id: filteringTerm
collection: collations
response_schema: beaconFilteringTermsResponse
bycon_response_class: BeaconDataResponse
beacon_schema:
entity_type: run
schema: https://progenetix.org/services/schemas/run/
h->o_access_key: analyses.id
entity_type: filteringTerm
schema: https://progenetix.org/services/schemas/filteringTermsSchema/
is_beacon_entity: true
path_id_value_bycon_parameter: run_ids
path_id_value_bycon_parameter: filters


################################################################################

cohort:
request_entity_path_id: cohorts
response_entity_id: cohort
collection: collations
response_schema: beaconCollectionsResponse
bycon_response_class: BeaconDataResponse
info:
description: >-
The `info` endpoint provides information about the Beacon, such as its name,
the organization responsible for the Beacon, a contact email,
and the API version. It is based on the GA4GH `service-info` standard.
request_entity_path_id: info
request_entity_path_aliases:
- "/"
- "service-info"
- "service_info"
response_entity_id: info
response_schema: beaconInfoResponse
bycon_response_class: BeaconInfoResponse
beacon_schema:
entity_type: cohort
schema: https://progenetix.org/services/schemas/cohort/
pagination:
skip: 0
limit: 10
entity_type: configuration
schema: https://progenetix.org/services/schemas/beaconInfoResults/
is_beacon_entity: true
path_id_value_bycon_parameter: filters
content: {}

##############################################################################
################################################################################

dataset:
request_entity_path_id: datasets
response_entity_id: dataset
beaconMap:
description: >-
The `beaconMap` object provides a map of the Beacon's REST endpoints.
request_entity_path_id: map
response_entity_id: beaconMap
collection: Null
response_schema: beaconCollectionsResponse
bycon_response_class: BeaconDataResponse
response_schema: beaconMapResponse
bycon_response_class: BeaconInfoResponse
beacon_schema:
entity_type: dataset
schema: https://progenetix.org/services/schemas/dataset/
pagination:
skip: 0
limit: 10
entity_type: map
schema: https://progenetix.org/services/schemas/beaconMapSchema/
is_beacon_entity: true

################################################################################

configuration:
request_entity_path_id: configuration
response_entity_id: configuration
collection: Null
response_schema: beaconConfigurationResponse
bycon_response_class: BeaconInfoResponse
beacon_schema:
entity_type: configuration
schema: https://progenetix.org/services/schemas/beaconConfigurationSchema/
is_beacon_entity: true

################################################################################

entryType:
request_entity_path_id: entry_types
response_entity_id: entryType
collection: Null
response_schema: beaconEntryTypesResponse
bycon_response_class: BeaconInfoResponse
beacon_schema:
entity_type: entryType
schema: https://progenetix.org/services/schemas/entryTypesSchema/
is_beacon_entity: true
path_id_value_bycon_parameter: dataset_ids

1 change: 1 addition & 0 deletions bycon/lib/schema_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def read_schema_file(schema_name, item, ext="json"):
schema_name = r_p_id

s_f_p = get_default_schema_file_path(schema_name, "defaultSchema", ext)
# prdbug(f'...read_schema_file {schema_name}: {s_f_p}')
if s_f_p is False: # in case the name had been used as request_entity_path_id
s_f_p = get_schema_file_path(schema_name, ext)

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit e905b1d

Please sign in to comment.