SCasanova / f1dataR

An R package to access Formula 1 Data from the Ergast API and the unofficial F1 data stream via the fastf1 python library.
https://scasanova.github.io/f1dataR/
Other
52 stars 5 forks source link

Use package_version #232

Closed pbulsink closed 6 months ago

pbulsink commented 6 months ago

R has a built-in set of functions that better handle version numbers than the code we've put together. The numeric_version() and package_version() functions are part of base and allow for simple comparison between version numbers. For example:

ver <- package_version('3.2.1')

ver <= '3.1' 
[1] FALSE

ver > '3'
[1] TRUE

This PR converts our code to use the base functions.

codecov[bot] commented 6 months ago

Codecov Report

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

Project coverage is 93.95%. Comparing base (d12eae2) to head (329b2f4). Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #232 +/- ## ========================================== - Coverage 95.65% 93.95% -1.70% ========================================== Files 19 19 Lines 598 596 -2 ========================================== - Hits 572 560 -12 - Misses 26 36 +10 ```

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

SCasanova commented 6 months ago

Great find