-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use objects qualified name in caching (#269)
* validate cache CI step * adds script * move cache dectorator to concrete class - this lets the class name be part of the function signature * qualname if not local
- Loading branch information
Showing
5 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
import sys | ||
import pybaseball | ||
import pandas as pd | ||
|
||
if __name__ == "__main__": | ||
season = 2020 | ||
pybaseball.cache.enable() | ||
batting = pybaseball.batting_stats(season) | ||
pitching = pybaseball.pitching_stats(season) | ||
columns_same = list(batting.columns) == list(pitching.columns) | ||
shape_same = batting.shape == pitching.shape | ||
cache_failed = columns_same and shape_same | ||
sys.exit(int(cache_failed)) |