DawnC commited on
Commit
418bc03
1 Parent(s): d776e91

Update scoring_calculation_system.py

Browse files
Files changed (1) hide show
  1. scoring_calculation_system.py +4 -13
scoring_calculation_system.py CHANGED
@@ -1699,33 +1699,24 @@ def calculate_breed_matching(breed_info: dict, user_prefs: UserPreferences) -> d
1699
 
1700
  # 計算所有基礎分數並整合到字典中
1701
  scores = {
1702
- 'space': calculate_space_score(
1703
- breed_info['Size'],
1704
- user_prefs.living_space,
1705
- user_prefs.yard_access != 'no_yard',
1706
- breed_info.get('Exercise Needs', 'Moderate')
1707
- ),
1708
  'exercise': calculate_exercise_score(
1709
  breed_info.get('Exercise Needs', 'Moderate'),
1710
  user_prefs.exercise_time,
1711
- user_prefs.exercise_type
1712
  ),
1713
  'grooming': calculate_grooming_score(
1714
  breed_info.get('Grooming Needs', 'Moderate'),
1715
  user_prefs.grooming_commitment.lower(),
1716
  breed_info['Size']
1717
  ),
1718
- 'experience': calculate_experience_score(
1719
- breed_info.get('Care Level', 'Moderate'),
1720
- user_prefs.experience_level,
1721
- breed_info.get('Temperament', '')
1722
- ),
1723
  'health': calculate_health_score(
1724
  breed_info.get('Breed', ''),
1725
  user_prefs
1726
  ),
1727
  'noise': calculate_noise_score(
1728
- breed_info.get('Breed', ''),
1729
  user_prefs
1730
  )
1731
  }
 
1699
 
1700
  # 計算所有基礎分數並整合到字典中
1701
  scores = {
1702
+ 'space': calculate_space_score(breed_info, user_prefs),
 
 
 
 
 
1703
  'exercise': calculate_exercise_score(
1704
  breed_info.get('Exercise Needs', 'Moderate'),
1705
  user_prefs.exercise_time,
1706
+ user_prefs
1707
  ),
1708
  'grooming': calculate_grooming_score(
1709
  breed_info.get('Grooming Needs', 'Moderate'),
1710
  user_prefs.grooming_commitment.lower(),
1711
  breed_info['Size']
1712
  ),
1713
+ 'experience': calculate_experience_score(breed_info, user_prefs),
 
 
 
 
1714
  'health': calculate_health_score(
1715
  breed_info.get('Breed', ''),
1716
  user_prefs
1717
  ),
1718
  'noise': calculate_noise_score(
1719
+ breed_info,
1720
  user_prefs
1721
  )
1722
  }