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

Generate staging DB with fake data #1337

Merged
merged 30 commits into from
May 23, 2024
Merged

Conversation

pylipp
Copy link
Collaborator

@pylipp pylipp commented May 3, 2024

Functional test:

  • docker compose up --build webapp then
  • curl 'http://localhost:5005/cron/reseed-db' -H 'x-appengine-cron: true'

Needs clarification:

  • how realistic do datetime fields need to be? currently they reflect the time the script runs

@pylipp pylipp force-pushed the generate-staging-db-with-fake-data branch from 99be8a3 to 50569a5 Compare May 6, 2024 15:02
Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 99.74937% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 85.40%. Comparing base (f50e965) to head (70d871e).
Report is 1 commits behind head on master.

Current head 70d871e differs from pull request most recent head 55305bc

Please upload reports for the commit 55305bc to get more accurate results.

Files Patch % Lines
back/boxtribute_server/cron/data_faking.py 99.65% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1337      +/-   ##
==========================================
+ Coverage   85.15%   85.40%   +0.25%     
==========================================
  Files         226      228       +2     
  Lines       20940    21306     +366     
  Branches     1588     1670      +82     
==========================================
+ Hits        17832    18197     +365     
  Misses       3091     3091              
- Partials       17       18       +1     
Flag Coverage Δ
backend 99.26% <99.74%> (+0.04%) ⬆️
frontend 82.38% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@pylipp pylipp force-pushed the generate-staging-db-with-fake-data branch 3 times, most recently from 420c2c6 to 85c359f Compare May 14, 2024 10:25
@pylipp pylipp force-pushed the generate-staging-db-with-fake-data branch 3 times, most recently from d14a13d to 82ffad1 Compare May 16, 2024 13:31
@pylipp pylipp marked this pull request as ready for review May 16, 2024 14:15
@pylipp pylipp requested a review from HaGuesto May 16, 2024 14:17
@pylipp pylipp force-pushed the generate-staging-db-with-fake-data branch 2 times, most recently from 53a3af0 to ff2d863 Compare May 16, 2024 14:34
@pylipp pylipp force-pushed the generate-staging-db-with-fake-data branch from ff2d863 to 70d871e Compare May 21, 2024 09:39
Copy link
Member

@HaGuesto HaGuesto left a comment

Choose a reason for hiding this comment

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

code review passed

back/boxtribute_server/cron/data_faking.py Outdated Show resolved Hide resolved
back/boxtribute_server/cron/data_faking.py Outdated Show resolved Hide resolved
back/boxtribute_server/cron/data_faking.py Show resolved Hide resolved
if box_state is not None:
location.box_state = box_state
location.is_donated = box_state == BoxState.Donated
location.is_lost = box_state == BoxState.Lost
Copy link
Member

Choose a reason for hiding this comment

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

take out lost and scrap

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Does it make sense to keep it for consistency until the is_lost and is_scrap fields are removed from the locations table?

- no LOST nor SCRAP locations
- more InStock and Donated locations
@pylipp
Copy link
Collaborator Author

pylipp commented May 23, 2024

@pylipp pylipp merged commit a9615cf into master May 23, 2024
8 of 9 checks passed
@pylipp pylipp deleted the generate-staging-db-with-fake-data branch May 23, 2024 10:31
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.

None yet

2 participants