AthletiFi / athletifi-website

Official website for AthletiFi
https://www.athleti.fi
1 stars 5 forks source link

Update calculate_player_ratings function to calculate goalkeeping rating properly #160

Open qisforq opened 3 months ago

qisforq commented 3 months ago

Objective:

Update the calculate_player_ratings function to properly calculate the goalkeeping rating.

Sub-tasks:

  1. Review the current implementation of the calculate_player_ratings function in the PostgreSQL database.

    • [ ] Identify the section responsible for calculating the goalkeeping rating.
    • [ ] Analyze the existing logic and identify any issues or gaps in the calculation.
  2. Modify the goalkeeping rating calculation logic.

    • [ ] Determine the appropriate metrics and weights to be considered for the goalkeeping rating.
    • [ ] Update the SQL query to include the necessary columns and calculations specific to goalkeepers.
    • [ ] Ensure that the goalkeeping rating is calculated only for players with the is_goalkeeper flag set to true.
  3. Test the updated calculate_player_ratings function.

    • [ ] Create test data in the match_attributes_per_player table for goalkeepers with various performance metrics.
    • [ ] Execute the calculate_player_ratings function and verify that the goalkeeping rating is calculated correctly for the test data.
    • [ ] Validate that the goalkeeping rating is not calculated for field players (is_goalkeeper = false).
  4. Optimize and refactor the calculate_player_ratings function.

    • [ ] Review the overall function for any performance optimizations or code refactoring opportunities.
    • [ ] Ensure that the function follows best practices and is maintainable.
  5. Document the changes made to the calculate_player_ratings function.

    • [ ] Update any relevant documentation or comments within the function to reflect the changes made.
    • [ ] Communicate the updates to the team and stakeholders, explaining the impact on the goalkeeping rating calculation.
HectorAgudelo commented 3 months ago

let me know when we meet to tackle this one

HectorAgudelo commented 3 months ago

hey quentin, any updates on this task?