James McCool
commited on
Commit
·
84a54cb
1
Parent(s):
20b767f
Refactor slate handling in showdown functions to use specific showdown slate names for improved clarity and consistency in data retrieval.
Browse files
src/sim_func_hold/showdown_functions.py
CHANGED
|
@@ -6,12 +6,12 @@ from database import db
|
|
| 6 |
|
| 7 |
@st.cache_data(ttl = 599)
|
| 8 |
def init_DK_SD_seed_frames(slate, split):
|
| 9 |
-
if slate == '
|
| 10 |
-
collection = db[
|
| 11 |
-
elif slate == '
|
| 12 |
-
collection = db[
|
| 13 |
-
elif slate == '
|
| 14 |
-
collection = db[
|
| 15 |
|
| 16 |
cursor = collection.find().limit(split)
|
| 17 |
|
|
@@ -23,11 +23,11 @@ def init_DK_SD_seed_frames(slate, split):
|
|
| 23 |
|
| 24 |
@st.cache_data(ttl = 599)
|
| 25 |
def init_FD_SD_seed_frames(slate, split):
|
| 26 |
-
if slate == '
|
| 27 |
collection = db[f"FD_NFL_SD_seed_frame"]
|
| 28 |
-
elif slate == '
|
| 29 |
collection = db[f"FD_NFL_Secondary_SD_seed_frame"]
|
| 30 |
-
elif slate == '
|
| 31 |
collection = db[f"FD_NFL_Auxiliary_SD_seed_frame"]
|
| 32 |
|
| 33 |
cursor = collection.find().limit(split)
|
|
|
|
| 6 |
|
| 7 |
@st.cache_data(ttl = 599)
|
| 8 |
def init_DK_SD_seed_frames(slate, split):
|
| 9 |
+
if slate == 'Showdown #1':
|
| 10 |
+
collection = db["DK_NFL_SD_seed_frame"]
|
| 11 |
+
elif slate == 'Showdown #2':
|
| 12 |
+
collection = db["DK_NFL_Secondary_SD_seed_frame"]
|
| 13 |
+
elif slate == 'Showdown #3':
|
| 14 |
+
collection = db["DK_NFL_Auxiliary_SD_seed_frame"]
|
| 15 |
|
| 16 |
cursor = collection.find().limit(split)
|
| 17 |
|
|
|
|
| 23 |
|
| 24 |
@st.cache_data(ttl = 599)
|
| 25 |
def init_FD_SD_seed_frames(slate, split):
|
| 26 |
+
if slate == 'Showdown #1':
|
| 27 |
collection = db[f"FD_NFL_SD_seed_frame"]
|
| 28 |
+
elif slate == 'Showdown #2':
|
| 29 |
collection = db[f"FD_NFL_Secondary_SD_seed_frame"]
|
| 30 |
+
elif slate == 'Showdown #3':
|
| 31 |
collection = db[f"FD_NFL_Auxiliary_SD_seed_frame"]
|
| 32 |
|
| 33 |
cursor = collection.find().limit(split)
|
src/streamlit_app.py
CHANGED
|
@@ -579,8 +579,6 @@ if selected_tab == "Showdown Contest Sims":
|
|
| 579 |
sharp_split = 50000
|
| 580 |
elif strength_var2 == 'Very':
|
| 581 |
sharp_split = 10000
|
| 582 |
-
|
| 583 |
-
st.table(dk_raw)
|
| 584 |
|
| 585 |
if st.button("Run Contest Sim"):
|
| 586 |
|
|
|
|
| 579 |
sharp_split = 50000
|
| 580 |
elif strength_var2 == 'Very':
|
| 581 |
sharp_split = 10000
|
|
|
|
|
|
|
| 582 |
|
| 583 |
if st.button("Run Contest Sim"):
|
| 584 |
|