diff --git a/openbb_terminal/alternative/covid/covid_view.py b/openbb_terminal/alternative/covid/covid_view.py index 789df23cc21..6aac2c9606e 100644 --- a/openbb_terminal/alternative/covid/covid_view.py +++ b/openbb_terminal/alternative/covid/covid_view.py @@ -7,9 +7,8 @@ from typing import Optional, Union import pandas as pd -from openbb_terminal import OpenBBFigure +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.alternative.covid import covid_model -from openbb_terminal.config_terminal import theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table from openbb_terminal.rich_config import console diff --git a/openbb_terminal/common/behavioural_analysis/google_view.py b/openbb_terminal/common/behavioural_analysis/google_view.py index 8f77ba49ac0..db1ab80aaf3 100644 --- a/openbb_terminal/common/behavioural_analysis/google_view.py +++ b/openbb_terminal/common/behavioural_analysis/google_view.py @@ -7,9 +7,8 @@ from typing import List, Optional, Union import pandas as pd -from openbb_terminal import OpenBBFigure +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.common.behavioural_analysis import google_model -from openbb_terminal.config_terminal import theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table diff --git a/openbb_terminal/common/behavioural_analysis/twitter_view.py b/openbb_terminal/common/behavioural_analysis/twitter_view.py index 29a32d27e9d..fba72770628 100644 --- a/openbb_terminal/common/behavioural_analysis/twitter_view.py +++ b/openbb_terminal/common/behavioural_analysis/twitter_view.py @@ -9,9 +9,8 @@ import numpy as np import pandas as pd from dateutil import parser as dparse -from openbb_terminal import OpenBBFigure +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.common.behavioural_analysis import twitter_model -from openbb_terminal.config_terminal import theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, get_closing_price from openbb_terminal.rich_config import console diff --git a/openbb_terminal/common/quantitative_analysis/qa_view.py b/openbb_terminal/common/quantitative_analysis/qa_view.py index 6237f2ab2f9..4b478b85567 100644 --- a/openbb_terminal/common/quantitative_analysis/qa_view.py +++ b/openbb_terminal/common/quantitative_analysis/qa_view.py @@ -18,9 +18,8 @@ from pandas.plotting import register_matplotlib_converters from scipy import stats from statsmodels.graphics.gofplots import qqplot -from openbb_terminal import OpenBBFigure +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.common.quantitative_analysis import qa_model -from openbb_terminal.config_terminal import theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table from openbb_terminal.rich_config import console diff --git a/openbb_terminal/core/models/preferences_model.py b/openbb_terminal/core/models/preferences_model.py index 593f56240e7..3635e82dbdf 100644 --- a/openbb_terminal/core/models/preferences_model.py +++ b/openbb_terminal/core/models/preferences_model.py @@ -79,12 +79,10 @@ class PreferencesModel: MONITOR: NonNegativeInt = 0 # STYLE - # Color for `view` command data. All pyplot colors listed at: - # https://matplotlib.org/stable/gallery/color/named_colors.html - VIEW_COLOR: str = "tab:green" MPL_STYLE: str = "dark" PMF_STYLE: str = "dark" RICH_STYLE: str = "dark" + PLOT_STYLE: str = "dark" # PATHS PREFERRED_DATA_SOURCE_FILE: str = str(USER_DATA_SOURCES_DEFAULT_FILE) diff --git a/openbb_terminal/core/plots/plotly_helper.py b/openbb_terminal/core/plots/plotly_helper.py index 49d7aa83591..c6425fbe774 100644 --- a/openbb_terminal/core/plots/plotly_helper.py +++ b/openbb_terminal/core/plots/plotly_helper.py @@ -212,7 +212,9 @@ class TerminalStyle: return colors -theme = TerminalStyle("dark", "dark") +theme = TerminalStyle( + get_current_user().preferences.PLOT_STYLE, get_current_user().preferences.RICH_STYLE +) theme.apply_style() diff --git a/openbb_terminal/core/plots/plotly_ta/ta_class.py b/openbb_terminal/core/plots/plotly_ta/ta_class.py index 6c6ce8e08f2..4d0b6c9ebd8 100644 --- a/openbb_terminal/core/plots/plotly_ta/ta_class.py +++ b/openbb_terminal/core/plots/plotly_ta/ta_class.py @@ -8,10 +8,9 @@ from typing import Any, Dict, List, Optional, Type, Union import pandas as pd -from openbb_terminal import OpenBBFigure +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.base_helpers import console from openbb_terminal.common.technical_analysis import ta_helpers -from openbb_terminal.config_terminal import theme from openbb_terminal.core.plots.plotly_ta.base import PltTA from openbb_terminal.core.plots.plotly_ta.data_classes import ChartIndicators diff --git a/openbb_terminal/core/sdk/sdk_helpers.py b/openbb_terminal/core/sdk/sdk_helpers.py index 8c21a43dfa6..0bf69fa28f5 100644 --- a/openbb_terminal/core/sdk/sdk_helpers.py +++ b/openbb_terminal/core/sdk/sdk_helpers.py @@ -336,7 +336,7 @@ import logging import openbb_terminal.config_terminal as cfg from openbb_terminal import helper_funcs as helper # noqa: F401 -from openbb_terminal.config_terminal import theme +from openbb_terminal.core.plots.plotly_helper import theme # noqa: F401 from openbb_terminal.cryptocurrency.due_diligence.pycoingecko_model import Coin from openbb_terminal.dashboards.dashboards_controller import DashboardsController diff --git a/openbb_terminal/cryptocurrency/defi/llama_view.py b/openbb_terminal/cryptocurrency/defi/llama_view.py index 65b5587428f..49b49fb5d41 100644 --- a/openbb_terminal/cryptocurrency/defi/llama_view.py +++ b/openbb_terminal/cryptocurrency/defi/llama_view.py @@ -5,10 +5,7 @@ import logging import os from typing import Optional, Union -from openbb_terminal import ( - OpenBBFigure, - config_terminal as cfg, -) +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.cryptocurrency_helpers import read_data_file from openbb_terminal.cryptocurrency.defi import llama_model from openbb_terminal.decorators import log_start_end @@ -46,7 +43,7 @@ def display_grouped_defi_protocols( ) fig.set_title(f"Top {limit} dApp TVL grouped by chain") - colors = iter(cfg.theme.get_colors(reverse=True)) + colors = iter(theme.get_colors(reverse=True)) for chain in chains: chain_filter = df.loc[df.Chain == chain] diff --git a/openbb_terminal/cryptocurrency/due_diligence/coinglass_view.py b/openbb_terminal/cryptocurrency/due_diligence/coinglass_view.py index ccfc05b4bee..375565becbf 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/coinglass_view.py +++ b/openbb_terminal/cryptocurrency/due_diligence/coinglass_view.py @@ -4,8 +4,7 @@ from typing import Optional, Union import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.due_diligence.coinglass_model import ( get_funding_rate, get_liquidations, diff --git a/openbb_terminal/cryptocurrency/due_diligence/finbrain_crypto_view.py b/openbb_terminal/cryptocurrency/due_diligence/finbrain_crypto_view.py index cee079910fb..68601534684 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/finbrain_crypto_view.py +++ b/openbb_terminal/cryptocurrency/due_diligence/finbrain_crypto_view.py @@ -8,12 +8,11 @@ from typing import Optional, Union import numpy as np import pandas as pd -from openbb_terminal import OpenBBFigure, rich_config +from openbb_terminal import OpenBBFigure, rich_config, theme from openbb_terminal.common.behavioural_analysis.finbrain_model import get_sentiment from openbb_terminal.common.behavioural_analysis.finbrain_view import ( lambda_sentiment_coloring, ) -from openbb_terminal.config_terminal import theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data from openbb_terminal.rich_config import console diff --git a/openbb_terminal/cryptocurrency/due_diligence/glassnode_view.py b/openbb_terminal/cryptocurrency/due_diligence/glassnode_view.py index 5b8d34391bc..7102d5ebf2f 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/glassnode_view.py +++ b/openbb_terminal/cryptocurrency/due_diligence/glassnode_view.py @@ -5,8 +5,7 @@ from typing import Optional, Union import numpy as np -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.due_diligence.glassnode_model import ( get_active_addresses, get_exchange_balances, diff --git a/openbb_terminal/cryptocurrency/due_diligence/messari_view.py b/openbb_terminal/cryptocurrency/due_diligence/messari_view.py index 7263ede047b..6977d467cb2 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/messari_view.py +++ b/openbb_terminal/cryptocurrency/due_diligence/messari_view.py @@ -11,8 +11,7 @@ from typing import Optional, Union import numpy as np import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency import cryptocurrency_helpers from openbb_terminal.cryptocurrency.dataframe_helpers import prettify_paragraph from openbb_terminal.cryptocurrency.due_diligence.messari_model import ( diff --git a/openbb_terminal/cryptocurrency/nft/nftpricefloor_view.py b/openbb_terminal/cryptocurrency/nft/nftpricefloor_view.py index b7f499fc15c..69d472a6f01 100644 --- a/openbb_terminal/cryptocurrency/nft/nftpricefloor_view.py +++ b/openbb_terminal/cryptocurrency/nft/nftpricefloor_view.py @@ -7,8 +7,7 @@ import logging import os from typing import Optional, Union -from openbb_terminal.config_terminal import theme -from openbb_terminal import OpenBBFigure +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.nft import nftpricefloor_model from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table diff --git a/openbb_terminal/cryptocurrency/onchain/shroom_view.py b/openbb_terminal/cryptocurrency/onchain/shroom_view.py index c9454ad2f8d..5e9f2d1606f 100644 --- a/openbb_terminal/cryptocurrency/onchain/shroom_view.py +++ b/openbb_terminal/cryptocurrency/onchain/shroom_view.py @@ -5,8 +5,7 @@ import logging import os from typing import Optional, Union -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.onchain.shroom_model import ( get_daily_transactions, get_dapp_stats, diff --git a/openbb_terminal/cryptocurrency/overview/blockchaincenter_view.py b/openbb_terminal/cryptocurrency/overview/blockchaincenter_view.py index 840b9d714ea..ec4b08e5973 100644 --- a/openbb_terminal/cryptocurrency/overview/blockchaincenter_view.py +++ b/openbb_terminal/cryptocurrency/overview/blockchaincenter_view.py @@ -4,8 +4,7 @@ import os from datetime import datetime from typing import Optional, Union -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.overview.blockchaincenter_model import ( DAYS, get_altcoin_index, diff --git a/openbb_terminal/cryptocurrency/overview/glassnode_view.py b/openbb_terminal/cryptocurrency/overview/glassnode_view.py index c19b4564b93..fc14ab24569 100644 --- a/openbb_terminal/cryptocurrency/overview/glassnode_view.py +++ b/openbb_terminal/cryptocurrency/overview/glassnode_view.py @@ -6,8 +6,7 @@ from typing import Optional import numpy as np import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.overview.glassnode_model import get_btc_rainbow from openbb_terminal.decorators import check_api_key, log_start_end from openbb_terminal.helper_funcs import export_data diff --git a/openbb_terminal/cryptocurrency/overview/loanscan_view.py b/openbb_terminal/cryptocurrency/overview/loanscan_view.py index 8f3916a27ae..66cf2564cd8 100644 --- a/openbb_terminal/cryptocurrency/overview/loanscan_view.py +++ b/openbb_terminal/cryptocurrency/overview/loanscan_view.py @@ -5,10 +5,7 @@ from typing import Optional, Union import pandas as pd -from openbb_terminal import ( - OpenBBFigure, - config_terminal as cfg, -) +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.overview import loanscan_model from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table @@ -63,7 +60,7 @@ def display_crypto_rates( df_non_null = pd.melt(df.reset_index(), id_vars=["index"]).dropna() assets = df_non_null.variable.unique().tolist() - colors = iter(cfg.theme.get_colors(reverse=True)) + colors = iter(theme.get_colors(reverse=True)) for asset in assets: width = df_non_null.loc[(df_non_null.variable == asset)] diff --git a/openbb_terminal/cryptocurrency/overview/tokenterminal_view.py b/openbb_terminal/cryptocurrency/overview/tokenterminal_view.py index 6f55e6b0b25..0389c6a19b8 100644 --- a/openbb_terminal/cryptocurrency/overview/tokenterminal_view.py +++ b/openbb_terminal/cryptocurrency/overview/tokenterminal_view.py @@ -2,10 +2,7 @@ import logging import os -from openbb_terminal import ( - OpenBBFigure, - config_terminal as cfg, -) +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.cryptocurrency.overview.tokenterminal_model import ( CATEGORIES, METRICS, @@ -77,7 +74,7 @@ def display_fundamental_metrics( fig.add_bar( x=metric_series[:limit].index, y=metric_series[:limit].values, - marker_color=cfg.theme.get_colors(reverse=True)[:limit], + marker_color=theme.get_colors(reverse=True)[:limit], ) if category: diff --git a/openbb_terminal/economy/alphavantage_view.py b/openbb_terminal/economy/alphavantage_view.py index 579785b9eb4..7db0a0dc03e 100644 --- a/openbb_terminal/economy/alphavantage_view.py +++ b/openbb_terminal/economy/alphavantage_view.py @@ -5,8 +5,7 @@ import logging import os from typing import Optional, Union -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import check_api_key, log_start_end from openbb_terminal.economy import alphavantage_model from openbb_terminal.helper_funcs import export_data, print_rich_table diff --git a/openbb_terminal/etf/fmp_view.py b/openbb_terminal/etf/fmp_view.py index 41c014e44ed..6499aa3fc96 100644 --- a/openbb_terminal/etf/fmp_view.py +++ b/openbb_terminal/etf/fmp_view.py @@ -7,8 +7,7 @@ from typing import Optional import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import log_start_end from openbb_terminal.etf import fmp_model from openbb_terminal.helper_funcs import ( diff --git a/openbb_terminal/forex/oanda/oanda_view.py b/openbb_terminal/forex/oanda/oanda_view.py index 477dece61eb..bbae3bec9d8 100644 --- a/openbb_terminal/forex/oanda/oanda_view.py +++ b/openbb_terminal/forex/oanda/oanda_view.py @@ -6,8 +6,7 @@ from typing import Dict, Optional, Union import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.core.plots.plotly_ta.ta_class import PlotlyTA from openbb_terminal.decorators import check_api_key, log_start_end from openbb_terminal.forex.oanda.oanda_model import ( diff --git a/openbb_terminal/futures/databento_view.py b/openbb_terminal/futures/databento_view.py index e3d02ebe705..d4cf5d01b5f 100644 --- a/openbb_terminal/futures/databento_view.py +++ b/openbb_terminal/futures/databento_view.py @@ -1,24 +1,23 @@ """DataBento view""" __docformat__ = "numpy" +import logging import os -from typing import List, Optional +from typing import Optional -import mplfinance as mpf -from matplotlib import pyplot as plt - -from openbb_terminal.config_terminal import theme +from openbb_terminal.core.plots.plotly_helper import OpenBBFigure +from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import ( export_data, - is_valid_axes_count, - lambda_long_number_format_y_axis, - plot_autoscale, print_rich_table, ) from openbb_terminal.rich_config import console -from openbb_terminal.stocks import databento_model +from openbb_terminal.stocks import databento_model, stocks_helper + +logger = logging.getLogger(__name__) +@log_start_end(log=logger) def display_historical( symbol: str, start_date: Optional[str] = None, @@ -26,8 +25,8 @@ def display_historical( raw: bool = False, export: str = "", sheet_name: Optional[str] = None, - external_axes: Optional[List[plt.Axes]] = None, -): + external_axes: bool = False, +) -> Optional[OpenBBFigure]: """Display historical futures [Source: DataBento] Parameters @@ -44,61 +43,21 @@ def display_historical( Optionally specify the name of the sheet the data is exported to. export: str Type of format to export data - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None + external_axes : bool, optional + Whether to return the figure object or not, by default False """ data = databento_model.get_historical_futures( symbol.upper(), start_date=start_date, end_date=end_date ) if data.empty: - console.print(f"No data found for {symbol}.") - return - # We check if there's Volume data to avoid errors and empty subplots - has_volume = False - if "Volume" in data.columns: - has_volume = bool(data["Volume"].sum() > 0) + return console.print(f"No data found for {symbol}.") - candle_chart_kwargs = { - "type": "candle", - "style": theme.mpf_style, - "volume": has_volume, - "addplot": [], - "xrotation": theme.xticks_rotation, - "scale_padding": {"left": 0.3, "right": 1, "top": 0.8, "bottom": 0.8}, - "update_width_config": { - "candle_linewidth": 0.6, - "candle_width": 0.8, - "volume_linewidth": 0.8, - "volume_width": 0.8, - }, - "warn_too_much_data": 10000, - } - if external_axes is None: - candle_chart_kwargs["returnfig"] = True - candle_chart_kwargs["figratio"] = (10, 7) - candle_chart_kwargs["figscale"] = 1.10 - candle_chart_kwargs["figsize"] = plot_autoscale() - candle_chart_kwargs["warn_too_much_data"] = 100_000 - - fig, ax = mpf.plot(data, **candle_chart_kwargs) - - if has_volume: - lambda_long_number_format_y_axis(data, "Volume", ax) - - fig.suptitle( - f"{symbol}", - x=0.055, - y=0.965, - horizontalalignment="left", - ) - theme.visualize_output(force_tight_layout=False) - elif (has_volume and is_valid_axes_count(external_axes, 2)) or ( - not has_volume and is_valid_axes_count(external_axes, 1) - ): - candle_chart_kwargs["ax"] = external_axes[0] - if has_volume: - candle_chart_kwargs["volume"] = external_axes[1] - mpf.plot(data, **candle_chart_kwargs) + data = stocks_helper.process_candle(data) + figure = stocks_helper.display_candle( + symbol=symbol, + data=data, + external_axes=True, + ) if raw: print_rich_table( @@ -106,6 +65,7 @@ def display_historical( headers=list(data.columns), show_index=True, title="Futures timeseries", + export=bool(export), ) console.print() @@ -115,4 +75,7 @@ def display_historical( "historical_db", data, sheet_name, + figure, ) + + return figure.show(external=external_axes) # type: ignore diff --git a/openbb_terminal/parent_classes.py b/openbb_terminal/parent_classes.py index 14dc812c902..1f2b859cd2a 100644 --- a/openbb_terminal/parent_classes.py +++ b/openbb_terminal/parent_classes.py @@ -22,7 +22,6 @@ from prompt_toolkit.styles import Style from rich.markdown import Markdown # IMPORTS INTERNAL -from openbb_terminal.config_terminal import theme from openbb_terminal.core.completer.choices import build_controller_choice_map from openbb_terminal.core.session.constants import REGISTER_URL from openbb_terminal.core.session.current_user import get_current_user, is_local @@ -156,8 +155,6 @@ class BaseController(metaclass=ABCMeta): self.parser.exit_on_error = False # type: ignore self.parser.add_argument("cmd", choices=self.controller_choices) - theme.applyMPLstyle() - # Add in about options self.ABOUT_CHOICES = { c: None for c in self.CHOICES_COMMANDS + self.CHOICES_MENUS diff --git a/openbb_terminal/rich_config.py b/openbb_terminal/rich_config.py index a760ac14718..71c7de367a9 100644 --- a/openbb_terminal/rich_config.py +++ b/openbb_terminal/rich_config.py @@ -16,6 +16,7 @@ from openbb_terminal import ( config_terminal as cfg, ) from openbb_terminal.core.config.paths import MISCELLANEOUS_DIRECTORY +from openbb_terminal.core.plots.plotly_helper import theme from openbb_terminal.core.session.current_user import get_current_user # pylint: disable=no-member,c-extension-no-member @@ -24,7 +25,7 @@ from openbb_terminal.core.session.current_user import get_current_user # https://rich.readthedocs.io/en/stable/appendix/colors.html#appendix-colors # https://rich.readthedocs.io/en/latest/highlighting.html#custom-highlighters -CUSTOM_THEME = Theme(cfg.theme.console_style) +CUSTOM_THEME = Theme(theme.console_style) RICH_TAGS = [ "[menu]", diff --git a/openbb_terminal/sdk.py b/openbb_terminal/sdk.py index ae5ebeb4110..405c9034ef3 100644 --- a/openbb_terminal/sdk.py +++ b/openbb_terminal/sdk.py @@ -7,7 +7,7 @@ import logging import openbb_terminal.config_terminal as cfg from openbb_terminal import helper_funcs as helper # noqa: F401 -from openbb_terminal.config_terminal import theme +from openbb_terminal.core.plots.plotly_helper import theme # noqa: F401 from openbb_terminal.cryptocurrency.due_diligence.pycoingecko_model import Coin from openbb_terminal.dashboards.dashboards_controller import DashboardsController @@ -27,7 +27,6 @@ cfg.start_required_configurations() cfg.start_plot_backend() logger = logging.getLogger(__name__) -theme.applyMPLstyle() class OpenBBSDK: diff --git a/openbb_terminal/stocks/behavioural_analysis/finnhub_view.py b/openbb_terminal/stocks/behavioural_analysis/finnhub_view.py index 0e87e926d54..cbfe63e30c2 100644 --- a/openbb_terminal/stocks/behavioural_analysis/finnhub_view.py +++ b/openbb_terminal/stocks/behavioural_analysis/finnhub_view.py @@ -8,8 +8,7 @@ from typing import Optional, Union import pandas as pd import yfinance as yf -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import check_api_key, log_start_end from openbb_terminal.helper_funcs import export_data from openbb_terminal.stocks.behavioural_analysis import finnhub_model diff --git a/openbb_terminal/stocks/comparison_analysis/finbrain_view.py b/openbb_terminal/stocks/comparison_analysis/finbrain_view.py index 5ef4aacd367..49b27f2fff0 100644 --- a/openbb_terminal/stocks/comparison_analysis/finbrain_view.py +++ b/openbb_terminal/stocks/comparison_analysis/finbrain_view.py @@ -8,8 +8,7 @@ from typing import List, Optional import numpy as np import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table from openbb_terminal.rich_config import console diff --git a/openbb_terminal/stocks/comparison_analysis/yahoo_finance_view.py b/openbb_terminal/stocks/comparison_analysis/yahoo_finance_view.py index 1b5ea987193..09933ccfaa8 100644 --- a/openbb_terminal/stocks/comparison_analysis/yahoo_finance_view.py +++ b/openbb_terminal/stocks/comparison_analysis/yahoo_finance_view.py @@ -10,8 +10,7 @@ import numpy as np import pandas as pd from sklearn.preprocessing import MinMaxScaler -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table from openbb_terminal.stocks.comparison_analysis import yahoo_finance_model diff --git a/openbb_terminal/stocks/dark_pool_shorts/quandl_view.py b/openbb_terminal/stocks/dark_pool_shorts/quandl_view.py index f6d44393bca..61d9036b1b0 100644 --- a/openbb_terminal/stocks/dark_pool_shorts/quandl_view.py +++ b/openbb_terminal/stocks/dark_pool_shorts/quandl_view.py @@ -7,8 +7,7 @@ from typing import Optional import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import check_api_key, log_start_end from openbb_terminal.helper_funcs import ( export_data, diff --git a/openbb_terminal/stocks/dark_pool_shorts/stocksera_view.py b/openbb_terminal/stocks/dark_pool_shorts/stocksera_view.py index 316061dfe9a..e9e96d24b04 100644 --- a/openbb_terminal/stocks/dark_pool_shorts/stocksera_view.py +++ b/openbb_terminal/stocks/dark_pool_shorts/stocksera_view.py @@ -7,8 +7,7 @@ from typing import Optional, Union import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import check_api_key, log_start_end from openbb_terminal.helper_funcs import ( export_data, diff --git a/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py b/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py index fb25fffbace..e72343d8bd4 100644 --- a/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py +++ b/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py @@ -9,9 +9,8 @@ from typing import Optional, Union from pandas.core.frame import DataFrame -from openbb_terminal import OpenBBFigure +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.common.technical_analysis import ta_helpers -from openbb_terminal.config_terminal import theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import ( export_data, diff --git a/openbb_terminal/stocks/fundamental_analysis/fmp_view.py b/openbb_terminal/stocks/fundamental_analysis/fmp_view.py index 3985597dc77..99b7a661383 100644 --- a/openbb_terminal/stocks/fundamental_analysis/fmp_view.py +++ b/openbb_terminal/stocks/fundamental_analysis/fmp_view.py @@ -8,8 +8,7 @@ from typing import Optional import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import check_api_key, log_start_end from openbb_terminal.helper_funcs import ( export_data, diff --git a/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_view.py b/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_view.py index 8a59e4d6687..31202c1af87 100644 --- a/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_view.py +++ b/openbb_terminal/stocks/fundamental_analysis/yahoo_finance_view.py @@ -9,8 +9,7 @@ from typing import Optional, Union import pandas as pd import yfinance as yf -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import ( export_data, diff --git a/openbb_terminal/stocks/government/quiverquant_view.py b/openbb_terminal/stocks/government/quiverquant_view.py index b79453565bc..86e0146ea31 100644 --- a/openbb_terminal/stocks/government/quiverquant_view.py +++ b/openbb_terminal/stocks/government/quiverquant_view.py @@ -8,8 +8,7 @@ from typing import Optional, Union import numpy as np import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table from openbb_terminal.rich_config import console diff --git a/openbb_terminal/stocks/insider/businessinsider_view.py b/openbb_terminal/stocks/insider/businessinsider_view.py index 9be3709236e..a8129fd7d47 100644 --- a/openbb_terminal/stocks/insider/businessinsider_view.py +++ b/openbb_terminal/stocks/insider/businessinsider_view.py @@ -9,8 +9,7 @@ from typing import Optional import pandas as pd -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import ( export_data, diff --git a/openbb_terminal/stocks/options/screen/syncretism_view.py b/openbb_terminal/stocks/options/screen/syncretism_view.py index 19eb460f007..4fb2b7d6f56 100644 --- a/openbb_terminal/stocks/options/screen/syncretism_view.py +++ b/openbb_terminal/stocks/options/screen/syncretism_view.py @@ -6,8 +6,7 @@ import logging import os from typing import List, Optional, Union -from openbb_terminal import OpenBBFigure -from openbb_terminal.config_terminal import theme +from openbb_terminal import OpenBBFigure, theme from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import export_data, print_rich_table from openbb_terminal.rich_config import console