Enhance Exercise Retrieval and Path Handling Logic
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 48s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m23s
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 48s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m23s
- Introduced new functions for handling exercise visibility and retrieval based on progression graph context, including `fetch_exercise_rows_by_ids_for_graph`. - Updated `_load_supplemental_exercise_rows` to incorporate graph visibility rules, improving the accuracy of exercise retrieval. - Enhanced `_run_path_step_retrieval` to utilize preloaded supplemental exercise rows, optimizing performance and clarity in path step processing. - Added `exercise_title_equivalent_to_stage_goal` function to improve title matching against learning goals, enhancing exercise relevance. - Updated tests to validate new retrieval logic and title equivalence functionality, ensuring robustness in exercise selection processes.
This commit is contained in:
1 parent
ad051c015f
commit
ca2adbd55e
8 files changed
+500
-81
No files matched your search
@@ -18,7 +18,7 @@ class _FakeCur:
|
||||
return []
|
||||
|
||||
|
||||
def test_supplemental_boost_uses_retrieval_boost_not_slot_pins():
|
||||
def test_supplemental_boost_includes_slot_assignments_and_retrieval_boost():
|
||||
body = ProgressionPathSuggestRequest(
|
||||
query="Mawashi Geri Progression",
|
||||
slot_assignments=[
|
||||
@@ -27,7 +27,7 @@ def test_supplemental_boost_uses_retrieval_boost_not_slot_pins():
|
||||
retrieval_boost_exercise_ids=[42, 7],
|
||||
)
|
||||
ids = _supplemental_exercise_ids_from_body(_FakeCur(), body)
|
||||
assert 99 not in ids
|
||||
assert 99 in ids
|
||||
assert 42 in ids
|
||||
assert 7 in ids
|
||||
|
||||
|
||||
Reference in new issue
Block a user