Closed pbulsink closed 6 months ago
This concludes covering Ergast related no-internet failures, need to cover FastF1 no-internet yet...
This is a big PR.
Beyond minor fixes here and there on top of what I've already pulled to master about being flexible with changing API returns, the big thing is handling no internet connection gracefully.
For Ergast functions, there's a set of escapes via tryCatch
that detect if there's an error in establishing and completing the api request. If they're hit, the get_ergast_data()
function returns NULL
(and displays a message to the user but not a warning). The requesting function detects this NULL
return and exits, again returning NULL
.
For FastF1 functions, there's two escapes: similar via tryCatch
checking the availability of the [livetiming.formula1.com]() web resource, but also verifying that the python functions have been able to download data. If either fail, again, messages are displayed and functions return NULL
.
Codecov Report
Attention: Patch coverage is
24.32432%
with56 lines
in your changes are missing coverage. Please review.Additional details and impacted files
```diff @@ Coverage Diff @@ ## master #233 +/- ## =========================================== - Coverage 93.95% 51.48% -42.48% =========================================== Files 19 19 Lines 596 641 +45 =========================================== - Hits 560 330 -230 - Misses 36 311 +275 ```:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.