James McCool commited on
Commit
e2889a1
·
1 Parent(s): 2eb744d

Refactor lineup input fields and update warnings for database load status

Browse files

- Removed the macro column for lineup number input and adjusted the lineup number input range.
- Added warnings to inform users about the active database load status for Draftkings, NBA, and NFL.

Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -651,12 +651,12 @@ with st.container():
651
  salary_max = 60000
652
 
653
  with st.expander("Info and Filters"):
654
- prio_col, optimals_site_col, optimals_macro_col, optimals_salary_col, optimals_stacks_col = st.columns(5)
655
 
656
  with prio_col:
657
  prio_var = st.radio("Which priority variable do you want to use?", ('proj', 'Own', 'Mix'), key='prio_var_radio')
658
  prio_mix = st.number_input("If Mix, what split of Projection/Ownership to dedicate to Projection?", min_value=0, max_value=100, value=50, step=1)
659
- lineup_num = st.number_input("How many lineups do you want to work with?", min_value=1000, max_value=50000, value=25000, step=100, key='lineup_download_var_input')
660
 
661
  with optimals_site_col:
662
  if site_var == 'Draftkings':
@@ -673,9 +673,6 @@ with st.container():
673
  slate_var3 = st.radio("Which slate data are you loading?", (nfl_slate_names_fd if type_var == 'Showdown' else ['Main', 'Secondary', 'Auxiliary']), key='slate_var3_radio')
674
  else:
675
  slate_var3 = st.radio("Which slate data are you loading?", (['Main', 'Secondary', 'Auxiliary']), key='slate_var3_radio')
676
-
677
- with optimals_macro_col:
678
- lineup_num_var = st.number_input("How many lineups do you want to display?", min_value=1, max_value=1000, value=150, step=1, key='lineup_num_var_input')
679
 
680
  with optimals_salary_col:
681
  if site_var == 'Draftkings':
@@ -719,6 +716,7 @@ if selected_tab == 'Data Load':
719
  with col1:
720
  st.subheader("Draftkings/Fanduel CSV")
721
  st.info("Upload the player pricing CSV from the site you are playing on")
 
722
 
723
  pricing_source = st.selectbox("Select a pricing source", options=['Paydirt DB', 'User Upload'])
724
  if 'csv_file' not in st.session_state:
@@ -796,6 +794,7 @@ if selected_tab == 'Data Load':
796
  with col2:
797
  st.subheader("Portfolio File")
798
  st.info("Go ahead and upload a portfolio file here. Only include player columns.")
 
799
 
800
  upload_toggle = st.selectbox("What source are you uploading from?", options=['Paydirt DB', 'SaberSim (Just IDs)', 'Draftkings/Fanduel (Names + IDs)', 'Other (Just Names)'])
801
  if 'portfolio' not in st.session_state:
@@ -910,6 +909,7 @@ if selected_tab == 'Data Load':
910
  with col3:
911
  st.subheader("Projections File")
912
  st.info("upload a projections file that has 'player_names', 'salary', 'median', 'ownership', and 'captain ownership' columns. Note that the salary for showdown needs to be the FLEX salary, not the captain salary.")
 
913
  proj_options = st.selectbox("Select a projections source", options=['Paydirt DB', 'User Upload'])
914
 
915
 
 
651
  salary_max = 60000
652
 
653
  with st.expander("Info and Filters"):
654
+ prio_col, optimals_site_col, optimals_salary_col, optimals_stacks_col = st.columns(5)
655
 
656
  with prio_col:
657
  prio_var = st.radio("Which priority variable do you want to use?", ('proj', 'Own', 'Mix'), key='prio_var_radio')
658
  prio_mix = st.number_input("If Mix, what split of Projection/Ownership to dedicate to Projection?", min_value=0, max_value=100, value=50, step=1)
659
+ lineup_num_var = st.number_input("How many lineups do you want to work with?", min_value=100, max_value=10000, value=1000, step=100, key='lineup_download_var_input')
660
 
661
  with optimals_site_col:
662
  if site_var == 'Draftkings':
 
673
  slate_var3 = st.radio("Which slate data are you loading?", (nfl_slate_names_fd if type_var == 'Showdown' else ['Main', 'Secondary', 'Auxiliary']), key='slate_var3_radio')
674
  else:
675
  slate_var3 = st.radio("Which slate data are you loading?", (['Main', 'Secondary', 'Auxiliary']), key='slate_var3_radio')
 
 
 
676
 
677
  with optimals_salary_col:
678
  if site_var == 'Draftkings':
 
716
  with col1:
717
  st.subheader("Draftkings/Fanduel CSV")
718
  st.info("Upload the player pricing CSV from the site you are playing on")
719
+ st.warning("Database load is active and in testing for Draftkings, not for Fanduel")
720
 
721
  pricing_source = st.selectbox("Select a pricing source", options=['Paydirt DB', 'User Upload'])
722
  if 'csv_file' not in st.session_state:
 
794
  with col2:
795
  st.subheader("Portfolio File")
796
  st.info("Go ahead and upload a portfolio file here. Only include player columns.")
797
+ st.warning("Database load is active and in testing for NBA and NFL, both Classic and Regular")
798
 
799
  upload_toggle = st.selectbox("What source are you uploading from?", options=['Paydirt DB', 'SaberSim (Just IDs)', 'Draftkings/Fanduel (Names + IDs)', 'Other (Just Names)'])
800
  if 'portfolio' not in st.session_state:
 
909
  with col3:
910
  st.subheader("Projections File")
911
  st.info("upload a projections file that has 'player_names', 'salary', 'median', 'ownership', and 'captain ownership' columns. Note that the salary for showdown needs to be the FLEX salary, not the captain salary.")
912
+ st.warning("Database load is active and in testing for NBA and NFL, both Classic and Regular")
913
  proj_options = st.selectbox("Select a projections source", options=['Paydirt DB', 'User Upload'])
914
 
915