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 More Facilities and patients to dummy data #1748

Merged
merged 3 commits into from
Dec 7, 2023
Merged

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Dec 6, 2023

Proposed Changes

  • Add More Facilities and patients to dummy data

Fixes ohcnetwork/care_fe#6732

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (033d085) 60.75% compared to head (a061867) 60.75%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1748   +/-   ##
=======================================
  Coverage   60.75%   60.75%           
=======================================
  Files         210      210           
  Lines       11533    11533           
  Branches     1644     1644           
=======================================
  Hits         7007     7007           
  Misses       4285     4285           
  Partials      241      241           

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

Copy link
Member

@sainak sainak left a comment

Choose a reason for hiding this comment

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

Deleting this will throw an error in https://github.com/coronasafe/care/blob/033d0855cdb4a602327e1f4f19808a8d706db4ed/care/facility/management/commands/load_dummy_data.py#L29-L31

as the first file is missing, the other two will fail due to constraint error.

These files are useful for setting up the backend for initial testing, so we should keep these instead and only run
https://github.com/coronasafe/care/blob/033d0855cdb4a602327e1f4f19808a8d706db4ed/care/facility/management/commands/load_dummy_data.py#L25-L28
for cypress

@Ashesh3
Copy link
Member Author

Ashesh3 commented Dec 6, 2023

Deleting this will throw an error in

https://github.com/coronasafe/care/blob/033d0855cdb4a602327e1f4f19808a8d706db4ed/care/facility/management/commands/load_dummy_data.py#L29-L31

as the first file is missing, the other two will fail due to constraint error.

These files are useful for setting up the backend for initial testing, so we should keep these instead and only run

https://github.com/coronasafe/care/blob/033d0855cdb4a602327e1f4f19808a8d706db4ed/care/facility/management/commands/load_dummy_data.py#L25-L28

for cypress

Hey, I am not deleting any files 😅 Just added more facilities and patients to the existing dummy data. I think the change size +1 −3,128 might have been confusing since the new data is all in a single line.

image

@Ashesh3 Ashesh3 requested a review from sainak December 6, 2023 09:30
@sainak
Copy link
Member

sainak commented Dec 6, 2023

Hey, I am not deleting any files 😅 Just added more facilities and patients to the existing dummy data. I think the change size +1 −3,128 might have been confusing since the new data is all in a single line. This is to discourage someone manually working with the json file directly.

Oh so that's why the title 😅,
formatting the json gave more clarity,

can you regenerate the fixtures by excluding, facility.historicalpatientregistration and facility.historicalfacilitycapacity they are not required and take half of the file size
and the facility_users.json seems redundant, so both the command and file can be removed

@sainak
Copy link
Member

sainak commented Dec 6, 2023

image

😅 i thought its deleted

@Ashesh3
Copy link
Member Author

Ashesh3 commented Dec 6, 2023

Hey, I am not deleting any files 😅 Just added more facilities and patients to the existing dummy data. I think the change size +1 −3,128 might have been confusing since the new data is all in a single line. This is to discourage someone manually working with the json file directly.

Oh so that's why the title 😅, formatting the json gave more clarity,

can you regenerate the fixtures by excluding, facility.historicalpatientregistration and facility.historicalfacilitycapacity they are not required and take half of the file size and the facility_users.json seems redundant, so both the command and file can be removed

yep, done!

@sainak sainak added the P2 label Dec 6, 2023
@vigneshhari vigneshhari merged commit e5409f7 into master Dec 7, 2023
8 checks passed
@vigneshhari vigneshhari deleted the new-dummy-data branch December 7, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add More Facilities and patients to dummy data
4 participants