Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add backend changes from #183 add-trafficlight-feedback #192

Open
wants to merge 58 commits into
base: main
Choose a base branch
from

Conversation

MaHaWo
Copy link
Collaborator

@MaHaWo MaHaWo commented Nov 27, 2024

Content

  • add database models:
    • milestones.py
    • MilestoneGroupAgeScore:
      • works like MilestoneAgeScore
      • contains mean, stddev for a certain age
    • MilestongroupAgeScoreCollection
    • holds an array of MilestonegroupAgeScores, one for each age
    • renamed the corresponding model for the Milestones to MilestoneAgeScoreCollection to avoid confusion between singular and plural (was MilestoneAgeScores previously.
  • implements statistics computation for milestonegroups
    • statisitcs.py
    • online computation algorithm (Welford's method) for sample mean, sample stddev
    • adds two functions for computation of statistics per month from 0 to 72 months of age: one for milestone, one for milestonegroups
  • adds the computation of the trafficlight feedback
    • scores.py
    • add two functions for score computation:
      • compute summary feedback for milestonegroups only in an answersession. This is what will be displayed when the feedback page is opened by a user
      • compute detailed feedback for each milestone in each group in an answersession. This is intended to be displayed on demand and will be hidden (and not requested from the server) by default.
      • each update the statistics when it is too old or doesn´t exist already. Since this is done online, it is not a lot of work per se, but still will slow down response times. For an MVP I hope it is enough though.
  • add routes to retrieve those
  • adds tests

things to double check

  • database queries in statistics.py
  • computation logic in scores.py wrt performance requirements.

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 93.62550% with 16 lines in your changes missing coverage. Please review.

Project coverage is 33.66%. Comparing base (016988c) to head (2248d13).

Files with missing lines Patch % Lines
...ondey_backend/src/mondey_backend/routers/scores.py 90.42% 9 Missing ⚠️
mondey_backend/src/mondey_backend/routers/users.py 86.20% 4 Missing ⚠️
...y_backend/src/mondey_backend/routers/statistics.py 96.80% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
+ Coverage   29.86%   33.66%   +3.79%     
==========================================
  Files         104      106       +2     
  Lines        3422     3642     +220     
  Branches       92       92              
==========================================
+ Hits         1022     1226     +204     
- Misses       2323     2339      +16     
  Partials       77       77              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

MaHaWo and others added 27 commits November 27, 2024 13:09
commit 4f0a845
Author: Harald Mack <[email protected]>
Date:   Fri Nov 29 14:49:33 2024 +0100

    reformat and remove unnecessary changes

commit 296a62e
Author: Harald Mack <[email protected]>
Date:   Fri Nov 29 14:39:26 2024 +0100

    add missing localiztion thing

commit ce3a806
Author: Harald Mack <[email protected]>
Date:   Fri Nov 29 14:33:40 2024 +0100

    adjust python tests to the presence of age_interval

commit 6b783ac
Author: Harald Mack <[email protected]>
Date:   Fri Nov 29 09:44:03 2024 +0100

    fix bug that would display milestonegroups for which there are no data

commit 9e78793
Author: Harald Mack <[email protected]>
Date:   Fri Nov 29 09:32:26 2024 +0100

    modify age filtering to use milestone ageintervals

commit 4e4c66b
Author: Harald Mack <[email protected]>
Date:   Thu Nov 28 13:31:02 2024 +0100

    include age interval into milestone admin page

commit a7c41d4
Author: Harald Mack <[email protected]>
Date:   Thu Nov 28 13:00:19 2024 +0100

    add better styling

commit 5ef829a
Author: Harald Mack <[email protected]>
Date:   Thu Nov 28 12:44:15 2024 +0100

    finish frontend part with respective corrections to backend

commit 002b9b9
Author: Harald Mack <[email protected]>
Date:   Thu Nov 28 07:20:53 2024 +0100

    make ageinterval editable.

commit 7ac5e05
Author: Harald Mack <[email protected]>
Date:   Wed Nov 27 15:52:55 2024 +0100

    work on ageinterval frontend

commit 7e302c2
Author: Harald Mack <[email protected]>
Date:   Wed Nov 27 15:13:12 2024 +0100

    add routes, models for age intervals and start adding frontend stuff
MaHaWo and others added 28 commits December 5, 2024 17:04
…dey-frontend-prototype into trafficlight-feedback-backend
…dey-frontend-prototype into trafficlight-feedback-backend
Copy link

sonarcloud bot commented Dec 9, 2024

@MaHaWo MaHaWo requested a review from lkeegan December 9, 2024 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants