summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteh_coderer <me@tehcoderer.com>2023-03-05 19:23:56 -0500
committerteh_coderer <me@tehcoderer.com>2023-03-05 19:23:56 -0500
commit6b58bab580ca759d55caeba4a4ad6d38302dc80c (patch)
tree2fff78edd9aefd915e11f54d25f05511c6c88bd6
parent848ac54bd63340d702a944488b8cffc48f5a1815 (diff)
fix : add PLOT_OPEN_EXPORT, USE_INTERACTIVE_DF to user dataclass
-rw-r--r--openbb_terminal/config_terminal.py4
-rw-r--r--openbb_terminal/core/models/credentials_model.py2
-rw-r--r--openbb_terminal/core/models/preferences_model.py4
-rw-r--r--openbb_terminal/core/plots/backend.py2
4 files changed, 8 insertions, 4 deletions
diff --git a/openbb_terminal/config_terminal.py b/openbb_terminal/config_terminal.py
index 859c02db4ea..2c1e28427a9 100644
--- a/openbb_terminal/config_terminal.py
+++ b/openbb_terminal/config_terminal.py
@@ -5,11 +5,11 @@ import os
import i18n
# IMPORTATION INTERNAL
-from openbb_terminal.core.config.paths import MISCELLANEOUS_DIRECTORY
from openbb_terminal.base_helpers import load_env_vars, strtobool
+from openbb_terminal.core.config.paths import MISCELLANEOUS_DIRECTORY
from openbb_terminal.core.session.current_user import get_current_user
-from .helper_classes import TerminalStyle as _TerminalStyle
+from .helper_classes import TerminalStyle as _TerminalStyle
# # Terminal UX section
current_user = get_current_user()
diff --git a/openbb_terminal/core/models/credentials_model.py b/openbb_terminal/core/models/credentials_model.py
index 310e661bc87..7dcff0a81f7 100644
--- a/openbb_terminal/core/models/credentials_model.py
+++ b/openbb_terminal/core/models/credentials_model.py
@@ -10,7 +10,7 @@ class CredentialsModel:
"""Model for credentials."""
# Data providers
- API_DATABENTO_KEY = "REPLACE_ME"
+ API_DATABENTO_KEY: str = "REPLACE_ME"
API_KEY_ALPHAVANTAGE: str = "REPLACE_ME"
API_KEY_FINANCIALMODELINGPREP: str = "REPLACE_ME"
API_KEY_QUANDL: str = "REPLACE_ME"
diff --git a/openbb_terminal/core/models/preferences_model.py b/openbb_terminal/core/models/preferences_model.py
index 8196ca55004..05e41632fdc 100644
--- a/openbb_terminal/core/models/preferences_model.py
+++ b/openbb_terminal/core/models/preferences_model.py
@@ -30,12 +30,16 @@ class PreferencesModel:
PLOT_WIDTH: PositiveInt = 800
PLOT_HEIGHT_PERCENTAGE: PositiveFloat = 50.0
PLOT_WIDTH_PERCENTAGE: PositiveFloat = 70.0
+ # Whether to open plot image exports after they are created
+ PLOT_OPEN_EXPORT: bool = False
# FEATURE FLAGS
SYNC_ENABLED: bool = True
FILE_OVERWRITE: bool = False
RETRY_WITH_LOAD: bool = False
USE_TABULATE_DF: bool = True
+ # Use interactive window to display dataframes with options to sort, filter, etc.
+ USE_INTERACTIVE_DF = True
USE_CLEAR_AFTER_CMD: bool = False
USE_COLOR: bool = True
USE_DATETIME: bool = True
diff --git a/openbb_terminal/core/plots/backend.py b/openbb_terminal/core/plots/backend.py
index 3fd8940accb..d26945d4295 100644
--- a/openbb_terminal/core/plots/backend.py
+++ b/openbb_terminal/core/plots/backend.py
@@ -177,7 +177,7 @@ class Backend(pywry.PyWry):
img_path.unlink(missing_ok=True)
renderPDF.drawToFile(drawing, str(export_image))
- if strtobool(os.environ.get("OPENBB_PLOT_OPEN_EXPORT", False)):
+ if get_current_user().preferences.PLOT_OPEN_EXPORT:
if sys.platform == "win32":
os.startfile(export_image) # nosec: B606
else: