Move start plot backend (#4454)

* move start plot backend

* update sdk helper
This commit is contained in:
montezdesousa
2023-03-10 14:29:27 +00:00
committed by GitHub
parent ae0a79ce0d
commit fea616ee90
4 changed files with 9 additions and 1 deletions

View File

@@ -21,8 +21,11 @@ theme = _TerminalStyle(
current_user.preferences.RICH_STYLE,
)
# Start the plots backend
plots_backend().start(load_env_vars("DEBUG_MODE", strtobool, False))
def start_plot_backend():
"""Starts the plot backend"""
plots_backend().start(load_env_vars("DEBUG_MODE", strtobool, False))
def start_required_configurations():

View File

@@ -353,6 +353,7 @@ from openbb_terminal.core.session.current_user import is_local
from openbb_terminal.terminal_helper import is_auth_enabled
cfg.start_required_configurations()
cfg.start_plot_backend()
logger = logging.getLogger(__name__)
theme.applyMPLstyle()

View File

@@ -24,6 +24,7 @@ from openbb_terminal.core.session.current_user import is_local
from openbb_terminal.terminal_helper import is_auth_enabled
cfg.start_required_configurations()
cfg.start_plot_backend()
logger = logging.getLogger(__name__)
theme.applyMPLstyle()

View File

@@ -23,6 +23,7 @@ from prompt_toolkit.formatted_text import HTML
from prompt_toolkit.styles import Style
from rich import panel
import openbb_terminal.config_terminal as cfg
from openbb_terminal.common import feedparser_view
from openbb_terminal.core.config.paths import (
HOME_DIRECTORY,
@@ -1236,6 +1237,8 @@ def main(
if debug:
os.environ["DEBUG_MODE"] = "true"
cfg.start_plot_backend()
if isinstance(path_list, list) and path_list[0].endswith(".openbb"):
run_routine(file=path_list[0], routines_args=routines_args)
elif path_list: