Update Skill Scoring Specification and Implementation to v1.1
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 38s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m21s
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 38s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m21s
- Enhanced the skill scoring formula to incorporate intensity and level range factors, improving the accuracy of skill contributions. - Removed the use of `is_primary` and `development_contribution` from calculations, streamlining the scoring process. - Updated documentation to reflect changes in the scoring logic and versioning. - Adjusted frontend components to align with the new scoring criteria, ensuring consistent user experience across the application.
This commit is contained in:
1 parent
f67bf280c3
commit
8f8bdf6d8b
6 files changed
+119
-43
No files matched your search
@@ -3,13 +3,30 @@ from skill_scoring import (
|
||||
ExerciseOccurrence,
|
||||
compute_skill_profile,
|
||||
match_score_for_skill_ids,
|
||||
_level_range_multiplier,
|
||||
_skill_link_multiplier,
|
||||
)
|
||||
|
||||
|
||||
def test_skill_link_multiplier_primary_and_intensity():
|
||||
assert _skill_link_multiplier(is_primary=True, intensity="hoch") == 1.5 * 1.2
|
||||
assert _skill_link_multiplier(is_primary=False, intensity="niedrig") == 0.85
|
||||
def test_skill_link_multiplier_intensity_and_levels():
|
||||
assert _skill_link_multiplier(intensity="hoch") == 1.2
|
||||
assert _skill_link_multiplier(intensity="niedrig") == 0.85
|
||||
wide = _skill_link_multiplier(
|
||||
intensity="mittel",
|
||||
required_level="basis",
|
||||
target_level="optimierung",
|
||||
)
|
||||
narrow = _skill_link_multiplier(
|
||||
intensity="mittel",
|
||||
required_level="grundlagen",
|
||||
target_level="grundlagen",
|
||||
)
|
||||
assert wide > narrow
|
||||
|
||||
|
||||
def test_level_range_multiplier_span():
|
||||
assert _level_range_multiplier(None, None) == 1.0
|
||||
assert _level_range_multiplier("aufbau", "fortgeschritten") > _level_range_multiplier("basis", "basis")
|
||||
|
||||
|
||||
def test_compute_skill_profile_aggregates_weights():
|
||||
@@ -23,21 +40,24 @@ def test_compute_skill_profile_aggregates_weights():
|
||||
"skill_id": 10,
|
||||
"skill_name": "Distanz",
|
||||
"category": "kihon",
|
||||
"is_primary": True,
|
||||
"intensity": "hoch",
|
||||
"required_level": "grundlagen",
|
||||
"target_level": "aufbau",
|
||||
"exercise_title": "Übung A",
|
||||
},
|
||||
{
|
||||
"skill_id": 11,
|
||||
"skill_name": "Balance",
|
||||
"category": "kihon",
|
||||
"is_primary": False,
|
||||
"intensity": "mittel",
|
||||
"intensity": "niedrig",
|
||||
"required_level": "basis",
|
||||
"target_level": "basis",
|
||||
"exercise_title": "Übung A",
|
||||
},
|
||||
],
|
||||
}
|
||||
profile = compute_skill_profile(occurrences, skills_map)
|
||||
assert profile["scoring_version"] == "1.1"
|
||||
assert profile["exercise_occurrence_count"] == 2
|
||||
assert profile["distinct_exercise_count"] == 1
|
||||
assert len(profile["skills"]) == 2
|
||||
|
||||
Reference in new issue
Block a user