Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update models to fix FE type test
Browse files Browse the repository at this point in the history
glass-ships committed Nov 8, 2023
1 parent 59d7183 commit 8daf601
Showing 4 changed files with 142 additions and 380 deletions.
505 changes: 135 additions & 370 deletions backend/src/monarch_py/datamodels/model.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion backend/tests/api/test_mapping_endpoint.py
Original file line number Diff line number Diff line change
@@ -15,4 +15,3 @@ def test_mappings(search):
assert response.status_code == 200
assert response.headers["content-type"] == "application/json"
assert response.json() == search

4 changes: 1 addition & 3 deletions backend/tests/unit/test_solr_parsers.py
Original file line number Diff line number Diff line change
@@ -72,6 +72,4 @@ def test_parse_mappings(mapping_response, mappings):
mapping_response["response"]["numFound"] = mapping_response["response"].pop("num_found")
solr_response = SolrQueryResult(**mapping_response)
parsed = parse_mappings(solr_response)
assert (
parsed == mappings
), f"Parsed result is not as expected. Difference: {dict_diff(parsed.dict(), mappings)}"
assert parsed == mappings, f"Parsed result is not as expected. Difference: {dict_diff(parsed.dict(), mappings)}"
12 changes: 6 additions & 6 deletions frontend/src/api/model.ts
Original file line number Diff line number Diff line change
@@ -511,18 +511,18 @@ export interface TermPairwiseSimilarity extends PairwiseSimilarity {
ancestor_label?: string,
ancestor_source?: string,
/** The IC of the object */
object_information_content?: string,
object_information_content?: number,
/** The IC of the subject */
subject_information_content?: string,
subject_information_content?: number,
/** The IC of the object */
ancestor_information_content?: string,
ancestor_information_content?: number,
/** The number of concepts in the intersection divided by the number in the union */
jaccard_similarity?: string,
jaccard_similarity?: number,
/** the dot product of two node embeddings divided by the product of their lengths */
cosine_similarity?: number,
dice_similarity?: string,
dice_similarity?: number,
/** the geometric mean of the jaccard similarity and the information content */
phenodigm_score?: string,
phenodigm_score?: number,
};
/**
* A simple pairwise similarity between two sets of concepts/terms

0 comments on commit 8daf601

Please sign in to comment.