From b3ea14d883bbbef0f99ea4de7eb43e2706390ed4 Mon Sep 17 00:00:00 2001 From: cardosofede Date: Thu, 16 May 2024 13:22:47 -0400 Subject: [PATCH] (feat) refactor inital state --- frontend/pages/backtesting/analyze/analyze.py | 2 +- frontend/pages/backtesting/create/create.py | 2 +- frontend/pages/backtesting/optimize/optimize.py | 2 +- frontend/pages/config/dman_maker_v2/app.py | 2 +- frontend/pages/config/pmm_simple/app.py | 2 +- frontend/pages/config/position_builder/app.py | 2 +- frontend/pages/config/xemm_controller/app.py | 2 +- frontend/pages/data/download_candles/app.py | 2 +- frontend/pages/orchestration/file_manager/app.py | 2 +- frontend/pages/orchestration/instances/app.py | 2 +- frontend/pages/orchestration/launch_bot_v2/app.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frontend/pages/backtesting/analyze/analyze.py b/frontend/pages/backtesting/analyze/analyze.py index 3c755a3..0975039 100644 --- a/frontend/pages/backtesting/analyze/analyze.py +++ b/frontend/pages/backtesting/analyze/analyze.py @@ -16,7 +16,7 @@ from frontend.data_viz.graphs import BacktestingGraphs from frontend.data_viz.strategy_analysis import StrategyAnalysis from frontend.st_utils import initialize_st_page -initialize_st_page(title="Analyze", icon="๐Ÿ”ฌ", initial_sidebar_state="collapsed") +initialize_st_page(title="Analyze", icon="๐Ÿ”ฌ") BASE_DATA_DIR = "data/backtesting" diff --git a/frontend/pages/backtesting/create/create.py b/frontend/pages/backtesting/create/create.py index 9f2dee9..9008693 100644 --- a/frontend/pages/backtesting/create/create.py +++ b/frontend/pages/backtesting/create/create.py @@ -9,7 +9,7 @@ from frontend.components.directional_strategy_creation_card import DirectionalSt from frontend.components.editor import Editor from frontend.st_utils import initialize_st_page -initialize_st_page(title="Create", icon="๏ธโš”๏ธ", initial_sidebar_state="collapsed") +initialize_st_page(title="Create", icon="๏ธโš”๏ธ") # TODO: # * Add videos explaining how to the triple barrier method works and how the backtesting is designed, diff --git a/frontend/pages/backtesting/optimize/optimize.py b/frontend/pages/backtesting/optimize/optimize.py index 520e392..498a9d4 100644 --- a/frontend/pages/backtesting/optimize/optimize.py +++ b/frontend/pages/backtesting/optimize/optimize.py @@ -13,7 +13,7 @@ from frontend.components.optimizations_file_explorer import OptimizationsStrateg from backend.utils import os_utils from frontend.st_utils import initialize_st_page -initialize_st_page(title="Optimize", icon="๐Ÿงช", initial_sidebar_state="collapsed") +initialize_st_page(title="Optimize", icon="๐Ÿงช") def run_optuna_dashboard(): os_utils.execute_bash_command(f"optuna-dashboard sqlite:///data/backtesting/backtesting_report.db") diff --git a/frontend/pages/config/dman_maker_v2/app.py b/frontend/pages/config/dman_maker_v2/app.py index d171170..730e49a 100644 --- a/frontend/pages/config/dman_maker_v2/app.py +++ b/frontend/pages/config/dman_maker_v2/app.py @@ -10,7 +10,7 @@ from frontend.components.st_inputs import normalize, distribution_inputs, get_di from frontend.st_utils import initialize_st_page # Initialize the Streamlit page -initialize_st_page(title="D-Man Maker V2", icon="๐Ÿง™โ€โ™‚๏ธ", initial_sidebar_state="collapsed") +initialize_st_page(title="D-Man Maker V2", icon="๐Ÿง™โ€โ™‚๏ธ") # Page content st.text("This tool will let you create a config for D-Man Maker V2 and upload it to the BackendAPI.") diff --git a/frontend/pages/config/pmm_simple/app.py b/frontend/pages/config/pmm_simple/app.py index 1ffb2d8..d02e694 100644 --- a/frontend/pages/config/pmm_simple/app.py +++ b/frontend/pages/config/pmm_simple/app.py @@ -11,7 +11,7 @@ from frontend.components.backtesting import backtesting_section from frontend.st_utils import initialize_st_page # Initialize the Streamlit page -initialize_st_page(title="PMM Simple", icon="๐Ÿ‘จโ€๐Ÿซ", initial_sidebar_state="collapsed") +initialize_st_page(title="PMM Simple", icon="๐Ÿ‘จโ€๐Ÿซ") backend_api_client = BackendAPIClient.get_instance(host=BACKEND_API_HOST, port=BACKEND_API_PORT) # Page content diff --git a/frontend/pages/config/position_builder/app.py b/frontend/pages/config/position_builder/app.py index b7f3a2b..8feb50a 100644 --- a/frontend/pages/config/position_builder/app.py +++ b/frontend/pages/config/position_builder/app.py @@ -8,7 +8,7 @@ from frontend.components.st_inputs import normalize, distribution_inputs, get_di from frontend.st_utils import initialize_st_page # Initialize the Streamlit page -initialize_st_page(title="Position Generator", icon="๐Ÿ”ญ", initial_sidebar_state="collapsed") +initialize_st_page(title="Position Generator", icon="๐Ÿ”ญ") # Page content st.text("This tool will help you analyze and generate a position config.") diff --git a/frontend/pages/config/xemm_controller/app.py b/frontend/pages/config/xemm_controller/app.py index 33c2a39..00bd029 100644 --- a/frontend/pages/config/xemm_controller/app.py +++ b/frontend/pages/config/xemm_controller/app.py @@ -7,7 +7,7 @@ from backend.services.backend_api_client import BackendAPIClient from frontend.st_utils import initialize_st_page # Initialize the Streamlit page -initialize_st_page(title="XEMM Multiple Levels", icon="โšก๏ธ", initial_sidebar_state="collapsed") +initialize_st_page(title="XEMM Multiple Levels", icon="โšก๏ธ") # Page content st.text("This tool will let you create a config for XEMM Controller and upload it to the BackendAPI.") diff --git a/frontend/pages/data/download_candles/app.py b/frontend/pages/data/download_candles/app.py index 6cf6018..d2a8d19 100644 --- a/frontend/pages/data/download_candles/app.py +++ b/frontend/pages/data/download_candles/app.py @@ -7,7 +7,7 @@ from backend.services.backend_api_client import BackendAPIClient from frontend.st_utils import initialize_st_page # Initialize Streamlit page -initialize_st_page(title="Download Candles", icon="๐Ÿ’พ", initial_sidebar_state="collapsed") +initialize_st_page(title="Download Candles", icon="๐Ÿ’พ") backend_api_client = BackendAPIClient.get_instance() c1, c2, c3, c4 = st.columns([2, 2, 2, 0.5]) diff --git a/frontend/pages/orchestration/file_manager/app.py b/frontend/pages/orchestration/file_manager/app.py index 70b2e62..8f20839 100644 --- a/frontend/pages/orchestration/file_manager/app.py +++ b/frontend/pages/orchestration/file_manager/app.py @@ -7,7 +7,7 @@ from frontend.components.dashboard import Dashboard from frontend.components.editor import Editor from frontend.st_utils import initialize_st_page -initialize_st_page(title="Strategy Configs", icon="๐Ÿ—‚๏ธ", initial_sidebar_state="collapsed") +initialize_st_page(title="Strategy Configs", icon="๐Ÿ—‚๏ธ") if "fe_board" not in st.session_state: diff --git a/frontend/pages/orchestration/instances/app.py b/frontend/pages/orchestration/instances/app.py index 836d3b1..1689212 100644 --- a/frontend/pages/orchestration/instances/app.py +++ b/frontend/pages/orchestration/instances/app.py @@ -19,7 +19,7 @@ def get_grid_positions(n_cards: int, cols: int = NUM_CARD_COLS, card_width: int return sorted(x_y, key=lambda x: (x[1], x[0])) -initialize_st_page(title="Instances", icon="๐Ÿฆ…", initial_sidebar_state="collapsed") +initialize_st_page(title="Instances", icon="๐Ÿฆ…") api_client = BackendAPIClient.get_instance(host=BACKEND_API_HOST, port=BACKEND_API_PORT) diff --git a/frontend/pages/orchestration/launch_bot_v2/app.py b/frontend/pages/orchestration/launch_bot_v2/app.py index c2ea54c..a2c885e 100644 --- a/frontend/pages/orchestration/launch_bot_v2/app.py +++ b/frontend/pages/orchestration/launch_bot_v2/app.py @@ -11,7 +11,7 @@ CARD_WIDTH = 6 CARD_HEIGHT = 3 NUM_CARD_COLS = 2 -initialize_st_page(title="Launch Bot", icon="๐Ÿ™Œ", initial_sidebar_state="collapsed") +initialize_st_page(title="Launch Bot", icon="๐Ÿ™Œ") def get_grid_positions(n_cards: int, cols: int = NUM_CARD_COLS, card_width: int = CARD_HEIGHT, card_height: int = CARD_WIDTH):