nfelodcm 0.1.13__tar.gz → 0.1.14__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/PKG-INFO +1 -1
  2. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Primatives/DataPull.py +30 -9
  3. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/coaches.json +2 -2
  4. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/filmmargins.json +2 -2
  5. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/games.json +2 -2
  6. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/hfa.json +1 -1
  7. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/logos.json +1 -1
  8. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/market_data.json +2 -2
  9. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/participants.json +1 -1
  10. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/pbp.json +2 -2
  11. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/player_stats.json +2 -2
  12. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/players.json +2 -2
  13. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/qbelo.json +2 -2
  14. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/qbr.json +1 -1
  15. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/rosters.json +2 -2
  16. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/srs_ratings.json +2 -2
  17. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/wepa.json +2 -2
  18. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Maps/wt_ratings.json +2 -2
  19. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Utilities/global_variables.json +5 -5
  20. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm.egg-info/PKG-INFO +1 -1
  21. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/pyproject.toml +1 -1
  22. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/README.md +0 -0
  23. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/__init__.py +0 -0
  24. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/__init__.py +0 -0
  25. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/assignment.py +0 -0
  26. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/assignments/__init__.py +0 -0
  27. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/assignments/desc_based_plays.py +0 -0
  28. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/assignments/fastr_team_repl.py +0 -0
  29. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/assignments/format_player_file.py +0 -0
  30. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/assignments/format_qb_file.py +0 -0
  31. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/assignments/penalty_formatting.py +0 -0
  32. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Assignments/assignments/score_clean.py +0 -0
  33. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/DCMTable.py +0 -0
  34. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Primatives/Freshness.py +0 -0
  35. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Primatives/LocalIO.py +0 -0
  36. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Primatives/TableMap.py +0 -0
  37. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/Primatives/__init__.py +0 -0
  38. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Engine/__init__.py +0 -0
  39. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Utilities/__init__.py +0 -0
  40. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Utilities/checks.py +0 -0
  41. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Utilities/extract_map.py +0 -0
  42. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Utilities/retrieve_season_state.py +0 -0
  43. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/Utilities/set_season_state.py +0 -0
  44. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/nfelodcm.py +0 -0
  45. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm/tests.py +0 -0
  46. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm.egg-info/SOURCES.txt +0 -0
  47. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm.egg-info/dependency_links.txt +0 -0
  48. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm.egg-info/requires.txt +0 -0
  49. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/nfelodcm.egg-info/top_level.txt +0 -0
  50. {nfelodcm-0.1.13 → nfelodcm-0.1.14}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nfelodcm
3
- Version: 0.1.13
3
+ Version: 0.1.14
4
4
  Summary: Python package for loading and caching CSVs hosted on github into pandas dataframes
5
5
  Author-email: Robert Greer <nfl@robbygreer.com>
6
6
  Maintainer-email: Robert Greer <nfl@robbygreer.com>
@@ -19,15 +19,36 @@ class DataPull():
19
19
  """
20
20
  Pulls data from the url and returns a pandas dataframe
21
21
  """
22
- ## pull data ##
23
- df = pd.read_csv(
24
- url,
25
- usecols=self.columns,
26
- dtype=self.dtypes,
27
- engine=self.config['engine']
28
- )
29
- ## add pulled data to container ##
30
- self.pulled_data.append(df)
22
+ ## logic for retries ##
23
+ retries_remaining = 3
24
+ pull_error = None
25
+ while retries_remaining > 0:
26
+ try:
27
+ ## pull data ##
28
+ df = pd.read_csv(
29
+ url,
30
+ usecols=self.columns,
31
+ dtype=self.dtypes,
32
+ engine=self.config['engine']
33
+ )
34
+ ## add pulled data to container ##
35
+ self.pulled_data.append(df)
36
+ ## end if successful ##
37
+ break
38
+ except Exception as e:
39
+ print('ERROR: Failed to pull data from {0}. Retrying...'.format(
40
+ url
41
+ ))
42
+ pull_error = e
43
+ retries_remaining -= 1
44
+ ## if retries are exhausted, raise an error ##
45
+ if retries_remaining == 0:
46
+ raise ValueError(
47
+ 'ERROR: Failed to pull data from {0} after 3 retries: {1}'.format(
48
+ url,
49
+ pull_error
50
+ )
51
+ )
31
52
 
32
53
  def handle_pull(self):
33
54
  """
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "coaches",
3
3
  "description": "Aggregated head coaching stats",
4
- "last_local_update": "2024-08-16T17:34:47.031765",
4
+ "last_local_update": "2024-10-14T03:46:47.583528",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/coaches/main/coaches.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/coaches/commits?path=coaches.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:52:00.240960+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:47.037268+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "filmmargins",
3
3
  "description": "Margins derived from PFF grades",
4
- "last_local_update": "2024-07-07T23:35:11.485380",
4
+ "last_local_update": "2024-10-14T03:43:33.333429",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/filmmargin/main/film_margins.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/filmmargin/commits?path=film_margins.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:49:10.845958+00:00"
13
+ "last_freshness_check": "2024-10-14T03:43:32.515900+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "games",
3
3
  "description": "nflgamedata games",
4
- "last_local_update": "2024-08-18T17:49:10.204394",
4
+ "last_local_update": "2024-10-14T03:43:31.843120",
5
5
  "download_url": "https://raw.githubusercontent.com/nflverse/nfldata/master/data/games.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nfldata/commits",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 500,
13
- "last_freshness_check": "2024-08-18T17:49:09.852096+00:00"
13
+ "last_freshness_check": "2024-10-14T03:43:31.451383+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelohfa/commits?path=estimated_hfa.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:52:00.883723+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:48.650188+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-pbp/commits?path=teams_colors_logos.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:49:10.512043+00:00"
13
+ "last_freshness_check": "2024-10-14T03:43:32.159951+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "market_data",
3
3
  "description": "Spread and totals from various sources",
4
- "last_local_update": "2024-08-18T17:51:54.978277",
4
+ "last_local_update": "2024-10-14T03:46:18.736320",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/nfelomarket_data/main/Data/lines.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelomarket_data/commits?path=Data/lines.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:51:54.414731+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:18.033883+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "pbp_participation",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:51:55.960661+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:42.811793+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": "season",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pbp",
3
3
  "description": "nflfastR play-by-play",
4
- "last_local_update": "2024-08-16T17:30:48.412901",
4
+ "last_local_update": "2024-10-14T03:45:53.054768",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/pbp/play_by_play_{0}.csv.gz",
6
6
  "compression": "gzip",
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "pbp",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:49:11.151095+00:00"
13
+ "last_freshness_check": "2024-10-14T03:43:33.615018+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": "season",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "player_stats",
3
3
  "description": "nflfastR player stats",
4
- "last_local_update": "2024-08-16T17:31:08.070803",
4
+ "last_local_update": "2024-10-14T03:46:13.928645",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/player_stats/player_stats.csv.gz",
6
6
  "compression": "gzip",
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "player_stats",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:49:43.735234+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:11.343694+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "players",
3
3
  "description": "nflfastR player meta data",
4
- "last_local_update": "2024-08-18T17:51:59.907913",
4
+ "last_local_update": "2024-10-14T03:46:46.634500",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/players/players.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "players",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:51:58.576510+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:45.509051+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qbelo",
3
3
  "description": "538/nfelo QB Elo model",
4
- "last_local_update": "2024-08-18T17:51:53.719214",
4
+ "last_local_update": "2024-10-14T03:46:16.651527",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/nfeloqb/main/qb_elos.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfeloqb/commits?path=qb_elos.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:51:52.659336+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:15.649652+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "espn_data",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:49:09.510108+00:00"
13
+ "last_freshness_check": "2024-10-14T03:41:53.164600+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rosters",
3
3
  "description": "nflfastR rosters",
4
- "last_local_update": "2024-07-08T03:35:10.725351",
4
+ "last_local_update": "2024-10-14T03:46:42.355950",
5
5
  "download_url": "https://github.com/nflverse/nflverse-data/releases/download/rosters/roster_{0}.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/nflverse/nflverse-data/releases/tags",
11
11
  "gh_release_tag": "rosters",
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:51:55.412934+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:19.196250+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": "season",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srs",
3
3
  "description": "A Simple Ranking System implimentation for the NFL",
4
- "last_local_update": "2024-08-16T17:31:10.910765",
4
+ "last_local_update": "2024-10-14T03:46:17.699832",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/nfelosrs/main/srs_ratings.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelosrs/commits?path=srs_ratings.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:51:54.055635+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:17.008608+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wepa",
3
3
  "description": "nfelo Weighted Expected Points Model",
4
- "last_local_update": "2024-07-07T23:13:39.454179",
4
+ "last_local_update": "2024-10-14T03:46:15.241075",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/wepa/main/data/wepa_by_game_pit.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/wepa/commits?path=data/wepa_by_game_pit.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:49:44.494425+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:14.490318+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wt_ratings",
3
3
  "description": "Win Totals and ratings derived from win totals (WT Ratings)",
4
- "last_local_update": "2024-08-16T17:34:47.737905",
4
+ "last_local_update": "2024-10-14T03:46:48.314022",
5
5
  "download_url": "https://raw.githubusercontent.com/greerreNFL/nfelosrs/main/wt_ratings.csv",
6
6
  "compression": null,
7
7
  "engine": "c",
@@ -10,7 +10,7 @@
10
10
  "gh_api_endpoint": "https://api.github.com/repos/greerreNFL/nfelosrs/commits?path=wt_ratings.csv",
11
11
  "gh_release_tag": null,
12
12
  "sla_seconds": 900,
13
- "last_freshness_check": "2024-08-18T17:52:00.580050+00:00"
13
+ "last_freshness_check": "2024-10-14T03:46:48.024623+00:00"
14
14
  },
15
15
  "iter": {
16
16
  "type": null,
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "season_states": {
3
3
  "last_full_week": {
4
- "season": 2023,
5
- "week": 22
4
+ "season": 2024,
5
+ "week": 5
6
6
  },
7
7
  "last_partial_week": {
8
- "season": 2023,
9
- "week": 22
8
+ "season": 2024,
9
+ "week": 6
10
10
  },
11
11
  "next_week": {
12
12
  "season": 2024,
13
- "week": 1
13
+ "week": 7
14
14
  }
15
15
  }
16
16
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nfelodcm
3
- Version: 0.1.13
3
+ Version: 0.1.14
4
4
  Summary: Python package for loading and caching CSVs hosted on github into pandas dataframes
5
5
  Author-email: Robert Greer <nfl@robbygreer.com>
6
6
  Maintainer-email: Robert Greer <nfl@robbygreer.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nfelodcm"
7
- version = "0.1.13"
7
+ version = "0.1.14"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.11"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes
File without changes