-
Notifications
You must be signed in to change notification settings - Fork 1
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 child questions backend code #146
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
==========================================
+ Coverage 26.83% 29.07% +2.24%
==========================================
Files 93 93
Lines 3455 3529 +74
Branches 122 122
==========================================
+ Hits 927 1026 +99
+ Misses 2461 2436 -25
Partials 67 67 ☔ View full report in Codecov by Sentry. |
…ey into add-childrenquestion-backend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! some minor comments
}, | ||
) | ||
) | ||
session.add( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding default questions to the database is a good idea - not sure about including the date of birth though as:
- it's already part of the child model (since we need it to determine which milestones a child gets)
- also I think it was only year/month in the initial requirements (opened an issue for this full date of birth for children? #147)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem is here that the data of the child gets sourced through the same interface, i.e., ChildDataInput.svelte
. For the user, we don´t have this because the user needs credentials upon registration and the questions then are a whole separate thing. So, unless we want to do something similar for the child (which from a user perspective would be a bit weird imho, but tolerable), we have to put entries for name and birth month/year/whatever into the questions table, and they need to be default questions because any new child MUST have them. The full date comes in b/c I think it's a more usable component in the frontend to have the usual calender selection widget rather than having to type out month and year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, so after our discussion, I removed the default questions. I believe that we would need some input to know what would be reasonable defaults, and the 'remark' question that was left after removing the ones that populate Child
objects didn't seem useful enough to put in as a fixed thing.
…ey into add-childrenquestion-backend
Quality Gate failedFailed conditions |
@lkeegan you want to have another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
merge #146 (add-childquestion-backend) into main
ChildQuestion
andChildAnswer
database modelsThese are intended to fill the
Child
model upon registration of a new child. They have fixed question-ids of 1 to 4 in theChildQuestion
table in the above order.a substantial chunk of the changed LoC is autogenerated openapi code, so this PR isn´t quite as big as it seems.