Spaces:
Running
on
Zero
Running
on
Zero
Update scoring_calculation_system.py
Browse files
scoring_calculation_system.py
CHANGED
|
@@ -444,6 +444,19 @@ def calculate_compatibility_score(breed_info: dict, user_prefs: UserPreferences)
|
|
| 444 |
print("Missing Size information")
|
| 445 |
raise KeyError("Size information missing")
|
| 446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 447 |
def calculate_space_score(size: str, living_space: str, has_yard: bool, exercise_needs: str) -> float:
|
| 448 |
"""
|
| 449 |
1. ๅๆ
็ๅบ็คๅๆธ็ฉ้ฃ
|
|
|
|
| 444 |
print("Missing Size information")
|
| 445 |
raise KeyError("Size information missing")
|
| 446 |
|
| 447 |
+
if user_prefs.size_preference != "no_preference":
|
| 448 |
+
if breed_info['Size'].lower() != user_prefs.size_preference.lower():
|
| 449 |
+
return {
|
| 450 |
+
'space': 0,
|
| 451 |
+
'exercise': 0,
|
| 452 |
+
'grooming': 0,
|
| 453 |
+
'experience': 0,
|
| 454 |
+
'health': 0,
|
| 455 |
+
'noise': 0,
|
| 456 |
+
'overall': 0,
|
| 457 |
+
'adaptability_bonus': 0
|
| 458 |
+
}
|
| 459 |
+
|
| 460 |
def calculate_space_score(size: str, living_space: str, has_yard: bool, exercise_needs: str) -> float:
|
| 461 |
"""
|
| 462 |
1. ๅๆ
็ๅบ็คๅๆธ็ฉ้ฃ
|