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

Revert "Add (minimal) sssom mapping class and association grouping key to schema" #454

Merged
merged 1 commit into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 0 additions & 14 deletions backend/src/monarch_py/datamodels/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
28 changes: 0 additions & 28 deletions backend/src/monarch_py/datamodels/model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion backend/tests/fixtures/association_counts_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")',
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/association_table_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def association_table_response():
return {
"responseHeader": {
"QTime": 0,
"QTime": 1,
"params": {
"mm": "100%",
"q": "*:*",
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/autocomplete_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def autocomplete_response():
return {
"responseHeader": {
"QTime": 0,
"QTime": 1,
"params": {
"mm": "100%",
"q": "fanc",
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/histopheno_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def histopheno_response():
return {
"responseHeader": {
"QTime": 1,
"QTime": 3,
"params": {
"facet.query": [
'object_closure:"HP:0000924"',
Expand Down
2 changes: 1 addition & 1 deletion backend/tests/fixtures/search_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def search_response():
return {
"responseHeader": {
"QTime": 0,
"QTime": 2,
"params": {
"mm": "100%",
"q": "fanconi",
Expand Down
15 changes: 0 additions & 15 deletions frontend/src/api/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down