nfelodcm 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.whl

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.
@@ -3,4 +3,5 @@ from .retrieve_season_state import current_season
3
3
  from .set_season_state import set_season_state
4
4
  from .checks import check_struc
5
5
  from .checks import check_map_type
6
- from .checks import check_data
6
+ from .checks import check_data
7
+ from .checks import check_data_folder
@@ -78,6 +78,16 @@ def check_map_type(map):
78
78
  ## return ##
79
79
  return passing, errors
80
80
 
81
+ def check_data_folder():
82
+ '''
83
+ Runs on load and checks that the data folder exists. If it does not, it creates it
84
+ '''
85
+ ## get data ##
86
+ data_dir = pathlib.Path(__file__).parent.parent.resolve() / 'Data'
87
+ ## if it does not exist, create ##
88
+ if not data_dir.exists():
89
+ data_dir.mkdir()
90
+
81
91
  def check_data():
82
92
  '''
83
93
  Runs on load and checks for the existence of local data for each map. If data does not exist,
@@ -4,6 +4,8 @@ import numpy
4
4
  from .Engine import DCMTable
5
5
  import nfelodcm.nfelodcm.Utilities as utils
6
6
 
7
+ ## ensure local data folder exists ##
8
+ utils.check_data_folder()
7
9
  ## init season state on load ##
8
10
  utils.set_season_state()
9
11
  ## update local data freshness meta as needed ##
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nfelodcm
3
- Version: 0.1.2
3
+ Version: 0.1.3
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>
@@ -1,5 +1,5 @@
1
1
  nfelodcm/__init__.py,sha256=T4OUcbJYVwMLzKSrm7CRT84jeqlvQeVWhfV2RCKlYM0,112
2
- nfelodcm/nfelodcm/nfelodcm.py,sha256=bqN1HBVV6xs6eC0vAy0QFLz7ljCfO9CKA22QEJEs3cE,1064
2
+ nfelodcm/nfelodcm/nfelodcm.py,sha256=Q96CBvdmyx-c-AQ67szBHoG38yxXlsjZq-liomu6oro,1128
3
3
  nfelodcm/nfelodcm/Engine/DCMTable.py,sha256=9_x82HKPWOwkIqQF4qZvUCLg8n6IUQfrtLlaU4bPIxM,2646
4
4
  nfelodcm/nfelodcm/Engine/__init__.py,sha256=vEEWcIBE4KLHoBCT1s2AIeSZxMfv1bcAqUNAJzSMSMo,31
5
5
  nfelodcm/nfelodcm/Engine/Assignments/__init__.py,sha256=IPKxTBbO3b0xaO922zkwif0FFd8Xqe3ZvCIFjhYg1oE,80
@@ -18,13 +18,13 @@ nfelodcm/nfelodcm/Maps/pbp.json,sha256=-91dzwDOG5aQP432MeRxlm2ybkCZksKnu6AgIPjjT
18
18
  nfelodcm/nfelodcm/Maps/qbelo.json,sha256=owSpd3hlC58HLCAeeTAhpIzhx9lA6EuvPfTlETklOpU,1832
19
19
  nfelodcm/nfelodcm/Maps/qbr.json,sha256=8zewIU0ted9FNFkjwyM308sR_pGvoB0PzZDeZhQUKXg,1153
20
20
  nfelodcm/nfelodcm/Maps/rosters.json,sha256=RvinVFIOSuBGeDwp3XqhKFeaWH8-A_nQRUO4KEM7JZ8,1435
21
- nfelodcm/nfelodcm/Utilities/__init__.py,sha256=mV5mBnrWIVItpVuQ2sYQWDxm1DpMFIgAxYoQLP79lF0,231
22
- nfelodcm/nfelodcm/Utilities/checks.py,sha256=jDuBsV9FxTsz30Zhce0tNwF0YzjNL8Kfg1HkT0hHCpg,3866
21
+ nfelodcm/nfelodcm/Utilities/__init__.py,sha256=KZPooahoLm1wPGw_mfOUI92FHLSvFNpMJmaRu6SCHq8,269
22
+ nfelodcm/nfelodcm/Utilities/checks.py,sha256=oUIqRFywLBYpN2e5iCR7ReLGrQNVgJxbNe458rgupCU,4179
23
23
  nfelodcm/nfelodcm/Utilities/extract_map.py,sha256=DVITMr0mlP6p2V1ZdaIcbEavs-FZ28-EZ885maiS_KU,969
24
24
  nfelodcm/nfelodcm/Utilities/global_variables.json,sha256=FrKTTJ3VJRTV8RdQmjpXZzIPLLC594SpiMBR6xYs7Nw,299
25
25
  nfelodcm/nfelodcm/Utilities/retrieve_season_state.py,sha256=ZrBaMWmo2DA9OZqZ6MBWmrY9Llkc5OUfxmDk7EB1tRU,579
26
26
  nfelodcm/nfelodcm/Utilities/set_season_state.py,sha256=Y5fvop3EZfWcx2F85MtSNEGnwjofWyEMg4_HLTenAUA,3737
27
- nfelodcm-0.1.2.dist-info/METADATA,sha256=PmdXE5ZxuCL_04KhtJjwL1qA1gbXcDEv-k0apw3XhNU,4409
28
- nfelodcm-0.1.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
29
- nfelodcm-0.1.2.dist-info/top_level.txt,sha256=SlNA7_yZSwWvZIl9Md6brBH_C7nAYnATe4CrvuUXOGo,9
30
- nfelodcm-0.1.2.dist-info/RECORD,,
27
+ nfelodcm-0.1.3.dist-info/METADATA,sha256=ufSSoOxwh2M8lsx5Ovmk60Xw_45XPCyXDdqydQcThcU,4409
28
+ nfelodcm-0.1.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
29
+ nfelodcm-0.1.3.dist-info/top_level.txt,sha256=SlNA7_yZSwWvZIl9Md6brBH_C7nAYnATe4CrvuUXOGo,9
30
+ nfelodcm-0.1.3.dist-info/RECORD,,