From 5a9fb7379498bbf1016d38c2a629293a50658ab3 Mon Sep 17 00:00:00 2001 From: Kevin Schaper Date: Fri, 27 Oct 2023 16:19:12 -0700 Subject: [PATCH] Revert "Add (minimal) sssom mapping class and association grouping key to schema (#435)" This reverts commit 3b7ac9524df8e8174e2a0b45a995f762cf795537. --- backend/src/monarch_py/datamodels/model.py | 14 ---------- backend/src/monarch_py/datamodels/model.yaml | 28 ------------------- .../fixtures/association_counts_response.py | 2 +- .../fixtures/association_table_response.py | 2 +- .../tests/fixtures/autocomplete_response.py | 2 +- backend/tests/fixtures/histopheno_response.py | 2 +- backend/tests/fixtures/search_response.py | 2 +- frontend/src/api/model.ts | 15 ---------- 8 files changed, 5 insertions(+), 62 deletions(-) diff --git a/backend/src/monarch_py/datamodels/model.py b/backend/src/monarch_py/datamodels/model.py index 92e3f332e..c18b4c810 100644 --- a/backend/src/monarch_py/datamodels/model.py +++ b/backend/src/monarch_py/datamodels/model.py @@ -389,19 +389,6 @@ class HistoBin(FacetValue): count: Optional[int] = Field(None, description="""count of documents""") -class Mapping(ConfiguredBaseModel): - """ - A minimal class to hold a SSSOM mapping - """ - - subject_id: str = Field(..., description="""The first of the two entities being compared""") - subject_label: Optional[str] = Field(None, description="""The name of the subject entity""") - predicate_id: str = Field(...) - object_id: Optional[str] = Field(None, description="""The second of the two entities being compared""") - object_label: Optional[str] = Field(None, description="""The name of the object entity""") - mapping_justification: Optional[str] = Field(None) - - class Node(Entity): """ UI container class extending Entity with additional information @@ -639,7 +626,6 @@ class BestMatch(ConfiguredBaseModel): FacetField.update_forward_refs() HistoPheno.update_forward_refs() HistoBin.update_forward_refs() -Mapping.update_forward_refs() Node.update_forward_refs() NodeHierarchy.update_forward_refs() Results.update_forward_refs() diff --git a/backend/src/monarch_py/datamodels/model.yaml b/backend/src/monarch_py/datamodels/model.yaml index 60902c9f9..7853f375c 100644 --- a/backend/src/monarch_py/datamodels/model.yaml +++ b/backend/src/monarch_py/datamodels/model.yaml @@ -62,11 +62,6 @@ classes: - onset_qualifier - sex_qualifier - stage_qualifier - - qualifiers_label - - qualifiers_namespace - - qualifiers_category - - qualifiers_closure - - qualifiers_closure_label - frequency_qualifier_label - frequency_qualifier_namespace - frequency_qualifier_category @@ -198,16 +193,6 @@ classes: is_a: FacetValue slots: - id - Mapping: - description: >- - A minimal class to hold a SSSOM mapping - slots: - - subject_id - - subject_label - - predicate_id - - object_id - - object_label - - mapping_justification MultiEntityAssociationResults: is_a: Results slots: @@ -332,9 +317,6 @@ slots: full_name: description: The long form name of an entity range: string - grouping_key: - description: A concatenation of fields used to group associations with the same essential/defining properties - range: string has_evidence: range: string multivalued: true @@ -556,13 +538,3 @@ slots: stage_qualifier_closure_label: multivalued: true description: Field containing stage_qualifier name and the names of all of it's ancestors -# sssom slots - # subject_id already exists in similarity.yaml - # subject label is already included in this schema - predicate_id: - range: string - required: true - # object_id already exists in similarity.yaml - # object label is already included in this schema - mapping_justification: - range: string diff --git a/backend/tests/fixtures/association_counts_response.py b/backend/tests/fixtures/association_counts_response.py index 0933a7019..97eb639cd 100644 --- a/backend/tests/fixtures/association_counts_response.py +++ b/backend/tests/fixtures/association_counts_response.py @@ -5,7 +5,7 @@ def association_counts_response(): return { "responseHeader": { - "QTime": 1, + "QTime": 2, "params": { "facet.query": [ '(category:"biolink:DiseaseToPhenotypicFeatureAssociation") AND (subject:"MONDO:0020121" OR subject_closure:"MONDO:0020121")', diff --git a/backend/tests/fixtures/association_table_response.py b/backend/tests/fixtures/association_table_response.py index 8c2cbc808..d88835001 100644 --- a/backend/tests/fixtures/association_table_response.py +++ b/backend/tests/fixtures/association_table_response.py @@ -5,7 +5,7 @@ def association_table_response(): return { "responseHeader": { - "QTime": 0, + "QTime": 1, "params": { "mm": "100%", "q": "*:*", diff --git a/backend/tests/fixtures/autocomplete_response.py b/backend/tests/fixtures/autocomplete_response.py index 97c726c11..a0b7c0a3a 100644 --- a/backend/tests/fixtures/autocomplete_response.py +++ b/backend/tests/fixtures/autocomplete_response.py @@ -5,7 +5,7 @@ def autocomplete_response(): return { "responseHeader": { - "QTime": 0, + "QTime": 1, "params": { "mm": "100%", "q": "fanc", diff --git a/backend/tests/fixtures/histopheno_response.py b/backend/tests/fixtures/histopheno_response.py index 2ebdf4537..198b22574 100644 --- a/backend/tests/fixtures/histopheno_response.py +++ b/backend/tests/fixtures/histopheno_response.py @@ -5,7 +5,7 @@ def histopheno_response(): return { "responseHeader": { - "QTime": 1, + "QTime": 3, "params": { "facet.query": [ 'object_closure:"HP:0000924"', diff --git a/backend/tests/fixtures/search_response.py b/backend/tests/fixtures/search_response.py index bed27890b..0fb3e09ee 100644 --- a/backend/tests/fixtures/search_response.py +++ b/backend/tests/fixtures/search_response.py @@ -5,7 +5,7 @@ def search_response(): return { "responseHeader": { - "QTime": 0, + "QTime": 2, "params": { "mm": "100%", "q": "fanconi", diff --git a/frontend/src/api/model.ts b/frontend/src/api/model.ts index 8a861812a..eca5afefd 100644 --- a/frontend/src/api/model.ts +++ b/frontend/src/api/model.ts @@ -337,21 +337,6 @@ export interface HistoBin extends FacetValue { /** count of documents */ count?: number, }; -/** - * A minimal class to hold a SSSOM mapping - */ -export interface Mapping { - /** The first of the two entities being compared */ - subject_id: string, - /** The name of the subject entity */ - subject_label?: string, - predicate_id: string, - /** The second of the two entities being compared */ - object_id?: string, - /** The name of the object entity */ - object_label?: string, - mapping_justification?: string, -}; export interface MultiEntityAssociationResults extends Results { id: string,