nfelodcm 0.1.5__tar.gz → 0.1.7__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 (37) hide show
  1. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/PKG-INFO +1 -1
  2. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Assignments/assignment.py +3 -2
  3. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/nfelodcm.py +22 -1
  4. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm.egg-info/PKG-INFO +1 -1
  5. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/pyproject.toml +1 -1
  6. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/README.md +0 -0
  7. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/__init__.py +0 -0
  8. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Assignments/__init__.py +0 -0
  9. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Assignments/assignments/__init__.py +0 -0
  10. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Assignments/assignments/desc_based_plays.py +0 -0
  11. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Assignments/assignments/fastr_team_repl.py +0 -0
  12. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Assignments/assignments/penalty_formatting.py +0 -0
  13. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/DCMTable.py +0 -0
  14. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Primatives/DataPull.py +0 -0
  15. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Primatives/Freshness.py +0 -0
  16. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Primatives/LocalIO.py +0 -0
  17. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Primatives/TableMap.py +0 -0
  18. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/Primatives/__init__.py +0 -0
  19. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Engine/__init__.py +0 -0
  20. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Maps/games.json +0 -0
  21. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Maps/logos.json +0 -0
  22. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Maps/participants.json +0 -0
  23. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Maps/pbp.json +0 -0
  24. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Maps/qbelo.json +0 -0
  25. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Maps/qbr.json +0 -0
  26. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Maps/rosters.json +0 -0
  27. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Utilities/__init__.py +0 -0
  28. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Utilities/checks.py +0 -0
  29. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Utilities/extract_map.py +0 -0
  30. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Utilities/global_variables.json +0 -0
  31. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Utilities/retrieve_season_state.py +0 -0
  32. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm/Utilities/set_season_state.py +0 -0
  33. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm.egg-info/SOURCES.txt +0 -0
  34. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm.egg-info/dependency_links.txt +0 -0
  35. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm.egg-info/requires.txt +0 -0
  36. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/nfelodcm.egg-info/top_level.txt +0 -0
  37. {nfelodcm-0.1.5 → nfelodcm-0.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nfelodcm
3
- Version: 0.1.5
3
+ Version: 0.1.7
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>
@@ -15,8 +15,9 @@ assignments = {
15
15
  'desc_based_plays' : {
16
16
  'func' : desc_based_plays,
17
17
  'new_columns' : [
18
- 'qb_dropback_all', 'rush_attempt_all',
19
- 'play_call'
18
+ ('qb_dropback_all', 'float32'),
19
+ ('rush_attempt_all', 'float32'),
20
+ ('play_call', 'str'),
20
21
  ]
21
22
  }
22
23
  }
@@ -1,5 +1,7 @@
1
1
  import pandas as pd
2
2
  import numpy
3
+ import pathlib
4
+ import json
3
5
 
4
6
  from .Engine import DCMTable
5
7
  import nfelodcm.nfelodcm.Utilities as utils
@@ -46,4 +48,23 @@ def get_map(url):
46
48
  print('"{0}": "{1}",'.format(
47
49
  col, dtype
48
50
  ))
49
-
51
+
52
+ def get_season_state(state_type='last_full_week'):
53
+ '''
54
+ Returns the season and week of the specified state type:
55
+ 'last_full_week' (default): the last week in which no games are still unplayed
56
+ 'last_partual_week': the last week where any game has been played
57
+ 'next_week': the first week with no games played
58
+ '''
59
+ ## open global variables json ##
60
+ global_variables = None
61
+ with open('{0}/global_variables.json'.format(pathlib.Path(__file__).parent.resolve()), 'r') as fp:
62
+ ## load config ##
63
+ global_variables = json.load(fp)
64
+ ## check input ##
65
+ if state_type not in list(global_variables['season_states'].keys()):
66
+ raise Exception('UTILITY ERROR: {0} is not an available state_type. Available types: {1}'.format(
67
+ state_type, '\n '.join(list(global_variables['season_states'].keys()))
68
+ ))
69
+ ## if state valid, return ##
70
+ return global_variables[state_type]['season'], global_variables[state_type]['week']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nfelodcm
3
- Version: 0.1.5
3
+ Version: 0.1.7
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.5"
7
+ version = "0.1.7"
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