probberechts / soccerdata

⛏⚽ Scrape soccer data from Club Elo, ESPN, FBref, FiveThirtyEight, Football-Data.co.uk, FotMob, Sofascore, SoFIFA, Understat and WhoScored.
https://soccerdata.readthedocs.io/en/latest/
Other
529 stars 90 forks source link

Add option to configure caching max-age via env #453

Closed probberechts closed 6 months ago

probberechts commented 6 months ago

This commit adds a "SOCCERDATA_MAXAGE" environment variable. If set, cached data that is older than the configured max-age will be re-downloaded. This is useful for testing. We want to check regularly whether the scrapers can still parse the remote data, but downloading all data in each test run is too slow.

codecov-commenter commented 6 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (86754b2) 60.82% compared to head (0171e2e) 60.77%. Report is 1 commits behind head on master.

Files Patch % Lines
soccerdata/_config.py 33.33% 1 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #453 +/- ## ========================================== - Coverage 60.82% 60.77% -0.06% ========================================== Files 10 10 Lines 1450 1453 +3 Branches 298 299 +1 ========================================== + Hits 882 883 +1 - Misses 521 522 +1 - Partials 47 48 +1 ```

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