euanwm / OpenWeightlifting

Repository that is deployed for the OpenWeightlifting site
https://www.openweightlifting.org
BSD 3-Clause "New" or "Revised" License
31 stars 21 forks source link

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

Closed sjdoescoding closed 8 months ago

sjdoescoding commented 9 months ago

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).

2) 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.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.