-
Notifications
You must be signed in to change notification settings - Fork 14
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
enhance: add python logic to compute daily participant analytics based on question response details #4212
Conversation
…sed on question detail responses
WalkthroughWalkthroughThe recent changes introduce a new Jupyter Notebook for participant analytics, enhancing the analysis of educational responses. A SQL migration updates the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 3
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (4)
- apps/analytics/daily_participant_analytics.ipynb (1 hunks)
- apps/analytics/pyproject.toml (1 hunks)
- packages/prisma/src/prisma/migrations/20240826113537_participant_analytics_correctness_counts/migration.sql (1 hunks)
- packages/prisma/src/prisma/schema/analytics.prisma (2 hunks)
Files skipped from review due to trivial changes (1)
- apps/analytics/pyproject.toml
Additional comments not posted (13)
packages/prisma/src/prisma/migrations/20240826113537_participant_analytics_correctness_counts/migration.sql (3)
1-7
: LGTM!The warning comments appropriately indicate data loss due to dropping columns.
The code changes are approved.
9-10
: LGTM!The SQL statement correctly drops the specified columns.
The code changes are approved.
11-14
: LGTM!The SQL statement correctly adds the specified columns.
The code changes are approved.
packages/prisma/src/prisma/schema/analytics.prisma (3)
21-21
: Clarify comment forunsolvedQuestionsCount
.The comment clarifies the calculation for
unsolvedQuestionsCount
. Ensure that this calculation is correctly implemented in the code.Verify that the calculation for
unsolvedQuestionsCount
is correctly implemented in the codebase.
31-33
: Clarify comments for mean fields.The comments clarify that the mean fields are calculated over responses to the same question and summed over all questions. Ensure that this calculation is correctly implemented in the code.
Verify that the calculation for the mean fields is correctly implemented in the codebase.
37-40
: Add new fields for detailed correctness metrics.The new fields
firstCorrectCount
,lastCorrectCount
,firstWrongCount
, andlastWrongCount
provide a more detailed breakdown of correctness metrics. Ensure that these fields are correctly populated in the code.Verify that the new fields are correctly populated in the codebase.
apps/analytics/daily_participant_analytics.ipynb (7)
1-14
: LGTM!The imports are appropriate for the notebook.
The code changes are approved.
62-88
: LGTM!The conversion logic is appropriate.
The code changes are approved.
174-189
: LGTM!The aggregation logic is appropriate.
The code changes are approved.
191-217
: LGTM!The counting logic is appropriate.
The code changes are approved.
219-240
: LGTM!The mapping logic is appropriate.
The code changes are approved.
242-285
: LGTM!The logic for creating daily analytics entries is appropriate.
The code changes are approved.
287-316
: LGTM!The metadata is appropriate.
The code changes are approved.
"db = Prisma()\n", | ||
"\n", | ||
"# set the environment variable DATABASE_URL to the connection string of your database\n", | ||
"os.environ['DATABASE_URL'] = 'postgresql://klicker:klicker@localhost:5432/klicker-prod'\n", |
Check failure
Code scanning / SonarCloud
PostgreSQL database passwords should not be disclosed
klicker-uzh Run #2715
Run Properties:
|
Project |
klicker-uzh
|
Branch Review |
DailyParticipantAnalytics
|
Run status |
Passed #2715
|
Run duration | 08m 32s |
Commit |
2948359fea ℹ️: Merge b04c32d883632184ddcf2573d8e1ba395990f26c into 70c203f96dfe7fa3f52dda2bef0e...
|
Committer | Julius Schlapbach |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
1
|
Pending |
0
|
Skipped |
0
|
Passing |
38
|
View all changes introduced in this branch ↗︎ |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- apps/analytics/daily_participant_analytics.ipynb (1 hunks)
- packages/prisma/src/prisma/migrations/20240826113537_participant_analytics_correctness_counts/migration.sql (1 hunks)
- packages/prisma/src/prisma/schema/analytics.prisma (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- apps/analytics/daily_participant_analytics.ipynb
- packages/prisma/src/prisma/schema/analytics.prisma
Additional comments not posted (3)
packages/prisma/src/prisma/migrations/20240826113537_participant_analytics_correctness_counts/migration.sql (3)
1-8
: Acknowledge the importance of warnings.The warnings about data loss due to column drops are crucial. Ensure that the data is either backed up or no longer needed before proceeding with the migration.
Verify that the data in the dropped columns is either backed up or no longer needed.
10-12
: Verify intentionality of dropping columns.Dropping columns
meanFirstCorrectCount
,meanLastCorrectCount
, andcollectedAchievements
will result in data loss. Ensure that this action is intentional and that the data is either backed up or no longer needed.Verify that the data in the dropped columns is either backed up or no longer needed.
13-16
: LGTM!The addition of new columns
firstCorrectCount
,firstWrongCount
,lastCorrectCount
, andlastWrongCount
will enhance the table with more detailed correctness metrics. Ensure that the data types and column names are appropriate.The code changes are approved.
Quality Gate passedIssues Measures |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- apps/analytics/daily_participant_analytics.ipynb (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/analytics/daily_participant_analytics.ipynb
No description provided.