James McCool commited on
Commit ·
8c6c2fc
1
Parent(s): 3f1ea7d
Changed both DK_seed_frame and FD_seed_frame functions to write player_data.json to the nfl_go/ directory (matching the local version)
Browse files- src/sports/nfl_functions.py +17 -8
src/sports/nfl_functions.py
CHANGED
|
@@ -3311,13 +3311,17 @@ def DK_seed_frame(roo_file, seed_team_acro, short_team_acro, client):
|
|
| 3311 |
project_root = os.path.dirname(os.path.dirname(current_dir))
|
| 3312 |
|
| 3313 |
# Ensure directory exists
|
| 3314 |
-
|
| 3315 |
-
os.makedirs(
|
| 3316 |
|
| 3317 |
-
# Write JSON data for Go processing
|
| 3318 |
-
player_data_path = os.path.join(
|
| 3319 |
with open(player_data_path, 'w') as f:
|
| 3320 |
json.dump(output_data, f)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3321 |
|
| 3322 |
if slates == 'Main Slate':
|
| 3323 |
collection = nfl_db['DK_NFL_name_map']
|
|
@@ -3486,13 +3490,18 @@ def FD_seed_frame(roo_file, seed_team_acro, short_team_acro, client):
|
|
| 3486 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 3487 |
project_root = os.path.dirname(os.path.dirname(current_dir))
|
| 3488 |
|
| 3489 |
-
|
| 3490 |
-
os.
|
|
|
|
| 3491 |
|
| 3492 |
-
# Write JSON data for Go processing
|
| 3493 |
-
player_data_path = os.path.join(
|
| 3494 |
with open(player_data_path, 'w') as f:
|
| 3495 |
json.dump(output_data, f)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3496 |
|
| 3497 |
if slates == 'Main Slate':
|
| 3498 |
collection = nfl_db['FD_NFL_name_map']
|
|
|
|
| 3311 |
project_root = os.path.dirname(os.path.dirname(current_dir))
|
| 3312 |
|
| 3313 |
# Ensure directory exists
|
| 3314 |
+
nfl_go_dir = os.path.join(project_root, 'nfl_go')
|
| 3315 |
+
os.makedirs(nfl_go_dir, exist_ok=True)
|
| 3316 |
|
| 3317 |
+
# Write JSON data for Go processing (both DK and FD use same file)
|
| 3318 |
+
player_data_path = os.path.join(nfl_go_dir, 'player_data.json')
|
| 3319 |
with open(player_data_path, 'w') as f:
|
| 3320 |
json.dump(output_data, f)
|
| 3321 |
+
|
| 3322 |
+
# Also ensure dk_nfl_dir exists for optimal_lineups.json
|
| 3323 |
+
dk_nfl_dir = os.path.join(project_root, 'dk_nfl_go')
|
| 3324 |
+
os.makedirs(dk_nfl_dir, exist_ok=True)
|
| 3325 |
|
| 3326 |
if slates == 'Main Slate':
|
| 3327 |
collection = nfl_db['DK_NFL_name_map']
|
|
|
|
| 3490 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
| 3491 |
project_root = os.path.dirname(os.path.dirname(current_dir))
|
| 3492 |
|
| 3493 |
+
# Ensure directory exists
|
| 3494 |
+
nfl_go_dir = os.path.join(project_root, 'nfl_go')
|
| 3495 |
+
os.makedirs(nfl_go_dir, exist_ok=True)
|
| 3496 |
|
| 3497 |
+
# Write JSON data for Go processing (both DK and FD use same file)
|
| 3498 |
+
player_data_path = os.path.join(nfl_go_dir, 'player_data.json')
|
| 3499 |
with open(player_data_path, 'w') as f:
|
| 3500 |
json.dump(output_data, f)
|
| 3501 |
+
|
| 3502 |
+
# Also ensure fd_nfl_dir exists for optimal_lineups.json
|
| 3503 |
+
fd_nfl_dir = os.path.join(project_root, 'fd_nfl_go')
|
| 3504 |
+
os.makedirs(fd_nfl_dir, exist_ok=True)
|
| 3505 |
|
| 3506 |
if slates == 'Main Slate':
|
| 3507 |
collection = nfl_db['FD_NFL_name_map']
|