From c1e550efae3183f93f0dfc42aaacdde63d4e19b7 Mon Sep 17 00:00:00 2001 From: AlexNikic Date: Thu, 2 Oct 2025 17:43:31 +0200 Subject: [PATCH 1/3] wrapper for get_instruments_from_url --- harmony_api/routers/text_router.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/harmony_api/routers/text_router.py b/harmony_api/routers/text_router.py index bf12d60..0f502ea 100644 --- a/harmony_api/routers/text_router.py +++ b/harmony_api/routers/text_router.py @@ -47,6 +47,7 @@ CacheResponse, SearchInstrumentsResponse, ) +from harmony.util.url_loader import load_instruments_from_url from harmony.schemas.enums.clustering_algorithms import ClusteringAlgorithm from harmony_api import helpers, dependencies, constants @@ -435,3 +436,9 @@ def search_instruments( ] return SearchInstrumentsResponse(instruments=instruments) + +@router.get( + path="/get_instruments_from_url", status_code=status.HTTP_200_OK, response_model_exclude_none=True +) +def get_instruments_from_url(url: str) -> List[Instrument]: + return load_instruments_from_url(url) \ No newline at end of file From d28b1808305491165a22d058f42358919207a4cd Mon Sep 17 00:00:00 2001 From: AlexNikic Date: Thu, 2 Oct 2025 17:45:44 +0200 Subject: [PATCH 2/3] updated harmony submodule --- harmony | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harmony b/harmony index a42cce9..4e32231 160000 --- a/harmony +++ b/harmony @@ -1 +1 @@ -Subproject commit a42cce962446299b571c1a2a64d9042111794cba +Subproject commit 4e32231a4eb86408617f3cb744e4f4c878ff06f9 From ff9a4fc69b36e83949b862788d6188cd8a8685d4 Mon Sep 17 00:00:00 2001 From: AlexNikic Date: Thu, 2 Oct 2025 17:58:57 +0200 Subject: [PATCH 3/3] updated test --- tests/remote_tests/test_match_remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/remote_tests/test_match_remote.py b/tests/remote_tests/test_match_remote.py index d104d21..b716fe4 100644 --- a/tests/remote_tests/test_match_remote.py +++ b/tests/remote_tests/test_match_remote.py @@ -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"])