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

Update JSON schema validations of Daily Round fields #2386

Merged
merged 29 commits into from
Sep 21, 2024

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Aug 22, 2024

Note

PR contains 2 custom migrations to sanitize daily rounds JSON fields

Proposed Changes

Associated Issue

Custom Migrations 1: Sanitize I/O Balance Fields

Migration to sanitize daily rounds I/O balance JSON fields.

Before Migration

image

After Migration

image

Reverse Migration

image

Custom Migrations 2: Sanitize bp field

Migration to set bp field to None for {} (empty objects)

Before Migration

image

After Migration

image

Reverse Migration

image

Merge Checklist

  • Tests added/fixed
  • Linting Complete
  • Any other necessary step

@rithviknishad rithviknishad force-pushed the rithviknishad/fix/daily-rounds-json-validations branch from 3598c9a to 43ac3b1 Compare August 22, 2024 11:18
@rithviknishad rithviknishad changed the title Update JSON Schema validations for I/O Balance fields Update Daily Rounds fields JSON schema validations Aug 22, 2024
@rithviknishad rithviknishad changed the title Update Daily Rounds fields JSON schema validations Update JSON schema validations of Daily Round fields Aug 22, 2024
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 64.91%. Comparing base (857fe7e) to head (8a2d19a).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
care/facility/api/serializers/daily_round.py 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2386      +/-   ##
===========================================
+ Coverage    64.86%   64.91%   +0.04%     
===========================================
  Files          242      242              
  Lines        13804    13811       +7     
  Branches      1904     1906       +2     
===========================================
+ Hits          8954     8965      +11     
+ Misses        4472     4468       -4     
  Partials       378      378              

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

@rithviknishad rithviknishad marked this pull request as ready for review August 23, 2024 13:32
@rithviknishad rithviknishad requested a review from a team as a code owner August 23, 2024 13:32
care/facility/api/serializers/daily_round.py Outdated Show resolved Hide resolved
@rithviknishad rithviknishad removed the In progress Work in progress label Sep 6, 2024
@bodhish
Copy link
Member

bodhish commented Sep 19, 2024

@anroopak can you review this PR?

Copy link
Contributor

@anroopak anroopak left a comment

Choose a reason for hiding this comment

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

Code LGTM, please confirm about if it is a typo or not before merging. Will approve after the confirmation.

Custom migrations may cause the release to stall if the table is huge. So need confirmation that it is not so huge.

care/facility/models/json_schema/daily_round.py Outdated Show resolved Hide resolved
@rithviknishad rithviknishad merged commit 2788679 into develop Sep 21, 2024
10 checks passed
@rithviknishad rithviknishad deleted the rithviknishad/fix/daily-rounds-json-validations branch September 21, 2024 04:22
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.

Add more validations for json fields in daily round object
5 participants