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

Automatically calculate milestone expected ages #157

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

lkeegan
Copy link
Member

@lkeegan lkeegan commented Nov 12, 2024

  • uses placeholder algorithm for now
  • add view data button below expected age slider in admin edit milestone dialog
    • displays a plot of average scores vs age for this milestone
    • includes a dotted line showing the calculated expected age based on the data
  • add admin tab for this
    • displays expected age for each milestone & button to plot data
    • button to calculate new expected age for each
    • button to save changes
  • add @unovis/ts chart/plotting library
    • using @unovis/ts for now due to lack of svelte 5 support in @unovis/svelte
    • can switch to the svelte version once this issue is resolved
    • svelte-vega looked more promising but gave an error at build time
    • resolves Visualisation plots/charts #153
  • add numpy to backend dependencies
  • remove default constructors from some models to improve generated typescript types
    • e.g. milestones: list[MilestoneAdmin] = {} used to give typescript type MilestoneAdmin[] | undefined
    • replace with milestones: list[MilestoneAdmin] to give MilestoneAdmin[]

lkeegan and others added 2 commits November 12, 2024 14:41
- uses placeholder algorithm for now
  - calculates average score for a milestone from each age (1 month bins)
  - expected age is the first age with an average score >= 3
  - the details of this algorithm can be refined later
  - resolves #133
- add view data button below expected age slider in admin edit milestone dialog
  - displays a plot of average scores vs age for this milestone
  - includes a dotted line showing the calculated expected age based on the data
- add admin tab for this
  - displays expected age for each milestone & button to plot data
  - button to calculate new expected age for each
  - button to save changes
- add @unovis/ts chart/plotting library
  - using @unovis/ts for now due to lack of svelte 5 support in @unovis/svelte
  - can switch to the svelte version once this issue is resolved
  - svelte-vega looked more promising but gave an error at build time
  - resolves #153
- add numpy to backend dependencies
- remove default constructors from some models to improve generated typescript types
  - e.g. `milestones: list[MilestoneAdmin] = {}` used to give typescript type `MilestoneAdmin[] | undefined`
  - replace with `milestones: list[MilestoneAdmin]` to give `MilestoneAdmin[]`
@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 27.91878% with 142 lines in your changes missing coverage. Please review.

Project coverage is 27.85%. Comparing base (43bf1b3) to head (606a49c).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../lib/components/Admin/MilestoneExpectedAges.svelte 0.00% 63 Missing and 1 partial ⚠️
...src/lib/components/DataDisplay/PlotScoreAge.svelte 0.00% 27 Missing and 1 partial ⚠️
...src/lib/components/Admin/EditMilestoneModal.svelte 0.00% 22 Missing and 1 partial ⚠️
.../components/Admin/MilestoneExpectedAgeModal.svelte 0.00% 14 Missing and 1 partial ⚠️
frontend/src/lib/components/AdminPage.svelte 0.00% 10 Missing and 1 partial ⚠️
...rontend/src/lib/components/Admin/SaveButton.svelte 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
- Coverage   27.88%   27.85%   -0.04%     
==========================================
  Files          93       96       +3     
  Lines        3306     3461     +155     
  Branches       90       93       +3     
==========================================
+ Hits          922      964      +42     
- Misses       2316     2426     +110     
- Partials       68       71       +3     

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

@lkeegan lkeegan requested a review from MaHaWo November 12, 2024 13:46
Copy link
Collaborator

@MaHaWo MaHaWo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some frontend changes confused me a little bit. otherwise looks good.

Copy link

sonarcloud bot commented Nov 13, 2024

@lkeegan lkeegan merged commit 1496a3a into main Nov 13, 2024
5 of 6 checks passed
@lkeegan lkeegan deleted the fix_133_automatically_calculate_milestone_expected_ages branch November 13, 2024 14: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.

Visualisation plots/charts Automatically calculate Milestone.expected_age_months
3 participants