Skip to content
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
7 changes: 3 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[submodule "harmony"]
path = harmony
url = https://github.com/harmonydata/harmony.git
branch = catalogue-match-instruments
[submodule "mhc_embeddings"]
path = mhc_embeddings
url = https://github.com/harmonydata/mhc_embeddings.git
branch = main
[submodule "harmony"]
path = harmony
url = https://github.com/AlexNikic/harmony.git
7 changes: 5 additions & 2 deletions harmony_api/routers/text_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def parse_instruments(
return instruments



@router.post(
path="/match", response_model=MatchResponse, status_code=status.HTTP_200_OK, response_model_exclude_none=True
)
Expand Down Expand Up @@ -299,14 +298,18 @@ def match(
else:
query_similarity = None

# Response options similarity
response_options_similarity = match_response_from_library.response_options_similarity.tolist()

return MatchResponse(
instruments=instruments,
questions=match_response_from_library.questions,
matches=matches_jsonable,
query_similarity=query_similarity,
closest_catalogue_instrument_matches=closest_catalogue_instrument_matches,
instrument_to_instrument_similarities=match_response_from_library.instrument_to_instrument_similarities,
clusters=match_response_from_library.clusters
clusters=match_response_from_library.clusters,
response_options_similarity=response_options_similarity
)


Expand Down
2 changes: 1 addition & 1 deletion tests/local_tests/test_match_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
class TestMatch(unittest.TestCase):

def test_gad_7_correct_size_dictionary_response(self):
self.assertEqual(7, len(response.json()))
self.assertEqual(8, len(response.json()))

def test_gad_7_first_question_conserved(self):
self.assertEqual("Feeling nervous, anxious, or on edge", response.json()["questions"][0]["question_text"])
Expand Down
2 changes: 1 addition & 1 deletion tests/local_tests/test_match_local_bigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@
class TestMatchBiggerPayload(unittest.TestCase):

def test_big_match_command(self):
self.assertEqual(7, len(response.json()))
self.assertEqual(8, len(response.json()))


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion tests/local_tests/test_negate_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
class TestMatch(unittest.TestCase):

def test_negation_instrument_correct_size_dictionary_response(self):
self.assertEqual(7, len(response.json()))
self.assertEqual(8, len(response.json()))

def test_negation_instrument_first_question_conserved(self):
self.assertEqual("I feel nervous", response.json()["questions"][0]["question_text"])
Expand Down