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

Automated DB Update & String Conversion for check_db.py #277

Merged
merged 32 commits into from
Dec 17, 2023

Conversation

sjdoescoding
Copy link
Contributor

@sjdoescoding sjdoescoding commented Dec 15, 2023

  1. Created a workfile to automate the DB update process, it is not on an IF basis but rather WILL update the DB every midnight.

The PR function of the workfile hasn't been fully tested, but should be fairly easy to edit so it PRs the development branch for merging (like 1-2 lines of code).

  1. Modified the check_db.py file by creating a function that will convert empty strings ' ' to a float 0.0 as this was having issues during testing. Seems to work fine but can be reverted easily and retested. If the site requires an int figure then you can just remove the float conversion function and theoretically it should still work just fine.

sjdoescoding and others added 28 commits December 13, 2023 00:06
development yeet
testing at 10 midnight
updated line 60 beyond
changed --update all
verbose argument catcher incase no arguments provided i.e. --update all
line 62, added a function to replace empty strings with '0.0'
changed float to 0
further fixing empty results
indentation
Testing cron schedule
push commit, PR any changes
changed to on push
Action run on Fri Dec 15 15:45:17 UTC 2023
checking if:always()
Action run on Fri Dec 15 15:55:54 UTC 2023
Final, PR not working entirely but heck
reverted to original function
Action run on Fri Dec 15 16:14:36 UTC 2023
changed repo to euanwm and scheduled for midnight everyday
@sjdoescoding sjdoescoding requested a review from euanwm as a code owner December 15, 2023 16:24
Copy link

codecov bot commented Dec 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b59d41b) 87.27% compared to head (f6ae105) 87.27%.

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #277   +/-   ##
============================================
  Coverage        87.27%   87.27%           
============================================
  Files               12       12           
  Lines              393      393           
============================================
  Hits               343      343           
  Misses              42       42           
  Partials             8        8           

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

Copy link
Owner

@euanwm euanwm left a comment

Choose a reason for hiding this comment

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

Opened issue #278 as a result

.github/workflows/db_update.yml Outdated Show resolved Hide resolved
python_tools/check_db.py Outdated Show resolved Hide resolved
backend/event_data/AUS/2991.csv Outdated Show resolved Hide resolved
backend/event_data/AUS/3051.csv Outdated Show resolved Hide resolved
backend/event_data/AUS/3051.csv Outdated Show resolved Hide resolved
backend/event_data/AUS/2991.csv Outdated Show resolved Hide resolved
@euanwm euanwm merged commit 6e8a2c2 into euanwm:development Dec 17, 2023
6 checks passed
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.

2 participants