From dc30ab3d36549449178f5e85bd015434196010e4 Mon Sep 17 00:00:00 2001 From: teh_coderer Date: Fri, 28 Jul 2023 21:13:42 -0500 Subject: [PATCH 01/28] Hotfix/ locking when deploying streamlit app (#5261) * fix locking when deploying streamlit app * Update streamlit_run.py * Update streamlit_run.py --- openbb_terminal/core/plots/no_import.py | 10 +++++----- openbb_terminal/dashboards/streamlit_run.py | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/openbb_terminal/core/plots/no_import.py b/openbb_terminal/core/plots/no_import.py index eb3fa1f1029..3d9a22d084c 100644 --- a/openbb_terminal/core/plots/no_import.py +++ b/openbb_terminal/core/plots/no_import.py @@ -72,11 +72,11 @@ class DummyBackend: and get_current_system().LOGGING_SUB_APP != "sdk" ): console.print(pywry_missing) - if console.input( - "If you prefer to continue without interactive plots/tables, " - "press [green]enter[/] or [red]ctrl+c[/] to exit." - ): - dotenv.set_key(SETTINGS_ENV_FILE, "PLOT_ENABLE_PYWRY", "0") + console.print( + "\n\nContinuing with default plotly behaviour (open in browser).", + style="yellow", + ) + dotenv.set_key(SETTINGS_ENV_FILE, "PLOT_ENABLE_PYWRY", "0") current_user.preferences.USE_INTERACTIVE_DF = False set_current_user(current_user) diff --git a/openbb_terminal/dashboards/streamlit_run.py b/openbb_terminal/dashboards/streamlit_run.py index 7c14766b76d..3fe378a5884 100644 --- a/openbb_terminal/dashboards/streamlit_run.py +++ b/openbb_terminal/dashboards/streamlit_run.py @@ -5,9 +5,12 @@ from pathlib import Path import streamlit.web.bootstrap from openbb_terminal.core.config.paths import REPOSITORY_DIRECTORY -from openbb_terminal.core.plots.plotly_helper import theme +from openbb_terminal.core.session.current_system import set_system_variable +from openbb_terminal.core.session.current_user import set_preference -theme.apply_style("dark") +set_system_variable("LOGGING_SUPPRESS", True) +set_preference("CHART_STYLE", "dark") +set_preference("PLOT_ENABLE_PYWRY", "False") def main(): From d212a8e2704aa9756d42d0deb53b5d5676b6352d Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Mon, 31 Jul 2023 09:05:22 -0700 Subject: [PATCH 02/28] hotfix/gdp-units - better GDP units (#5262) * better GDP units * mypy * remove not needed dict * test_oecd_view.py * test_oecd_model.py --- openbb_terminal/economy/economy_controller.py | 6 ++--- openbb_terminal/economy/oecd_model.py | 21 ++++++++++------- openbb_terminal/economy/oecd_view.py | 23 +++++++++++-------- .../test_oecd_model/test_get_gdp.yaml | 8 +++---- .../csv/test_oecd_model/test_get_gdp.csv | 4 ++-- .../economy/test_economy_controller.py | 2 +- .../economy/test_oecd_model.py | 4 ++-- .../openbb_terminal/economy/test_oecd_view.py | 5 +++- 8 files changed, 42 insertions(+), 31 deletions(-) diff --git a/openbb_terminal/economy/economy_controller.py b/openbb_terminal/economy/economy_controller.py index 9c75d92e09f..d47c4482526 100644 --- a/openbb_terminal/economy/economy_controller.py +++ b/openbb_terminal/economy/economy_controller.py @@ -596,9 +596,9 @@ class EconomyController(BaseController): "--units", type=str, dest="units", - help="Use either USD_CAP (US dollars per capita) or MLN_USD (millions of US dollars)", - choices=["USD_CAP", "MLN_USD"], - default="USD_CAP", + help="Use either USD or USD_CAP (USD Per Capita)", + choices=["USD", "USD_CAP"], + default="USD", ) parser.add_argument( diff --git a/openbb_terminal/economy/oecd_model.py b/openbb_terminal/economy/oecd_model.py index 2c315dfaf07..bc8d7ad4739 100644 --- a/openbb_terminal/economy/oecd_model.py +++ b/openbb_terminal/economy/oecd_model.py @@ -473,8 +473,8 @@ def no_data_message(error: str): @log_start_end(log=logger) def get_gdp( - countries: Optional[List[str]], - units: str = "USD_CAP", + countries: Optional[str] = "united_states", + units: str = "USD", start_date="", end_date="", ) -> pd.DataFrame: @@ -496,7 +496,7 @@ def get_gdp( countries: list List of countries to get data for units: str - Units to get data in. Either 'USD_CAP' or 'MLN_USD'. + Units to get data in. Either 'USD' or 'USD_CAP'. Default is US dollars per capita. start_date: str Start date of data, in YYYY-MM-DD format @@ -518,17 +518,21 @@ def get_gdp( if isinstance(end_date, datetime): end_date = end_date.date() - if units not in ["USD_CAP", "MLN_USD"]: - return console.print( - "Use either USD_CAP (US dollars per capita) " - "or MLN_USD (millions of US dollars) for units" + units_dict = {"USD": "MLN_USD", "USD_CAP": "USD_CAP"} + + if units not in units_dict: + console.print( + "Invalid choice, choices are either USD or USD_CAP. Defaulting to USD." ) + units = "USD" + + countries = [countries] if isinstance(countries, str) else countries # type: ignore[assignment] df = pd.DataFrame() try: df = pd.read_csv( - f"https://stats.oecd.org/sdmx-json/data/DP_LIVE/.GDP.TOT.{units}.A/OECD?contentType=csv&detail=code" + f"https://stats.oecd.org/sdmx-json/data/DP_LIVE/.GDP.TOT.{units_dict[units]}.A/OECD?contentType=csv&detail=code" f"&separator=comma&csv-lang=en&startPeriod={start_date}&endPeriod={end_date}", index_col=5, ) @@ -552,6 +556,7 @@ def get_gdp( result.index = pd.to_datetime(result.index, format="%Y") result.sort_index(inplace=True) + result = result * 1000000 if units == "USD" else result return result diff --git a/openbb_terminal/economy/oecd_view.py b/openbb_terminal/economy/oecd_view.py index 79c5187aa22..a7f3cc6e5b1 100644 --- a/openbb_terminal/economy/oecd_view.py +++ b/openbb_terminal/economy/oecd_view.py @@ -21,19 +21,19 @@ YAXIS_TITLES = { "AGRWTH": "Annual Growth Rate (%)", "IDX": "Index (Base = 2015)", "IDX2015": "Index (Base = 2015)", - "MLN_USD": "Millions of US Dollars", + "USD": "Nominal Value in USD", "PC_CHGPY": "Same Quarter of the Previous Year (% Change)", "PC_CHGPP": "Previous Quarter (% Change)", "PC_GDP": "Percentage of GDP (%)", "THND_USD_CAP": "Thousands of USD per Capita", - "USD_CAP": "US Dollars per Capita", + "USD_CAP": "USD per Capita", } @log_start_end(log=logger) def plot_gdp( - countries: Optional[List[str]], - units: str = "USD_CAP", + countries: Optional[str] = "united_states", + units: str = "USD", start_date: str = "", end_date: str = "", raw: bool = False, @@ -59,7 +59,7 @@ def plot_gdp( countries: list List of countries to get data for units: str - Units to get data in. Either 'USD_CAP' or 'MLN_USD'. + Units to get data in. Either 'USD' or 'USD_CAP'. Default is US dollars per capita. start_date: str Start date of data, in YYYY-MM-DD format @@ -79,11 +79,13 @@ def plot_gdp( Union[OpenBBFigure, None] OpenBBFigure object if external_axes is True, else None (opens plot in a window) """ - if units not in ["USD_CAP", "MLN_USD"]: - return console.print( - "Use either USD_CAP (US dollars per capita) " - "or MLN_USD (millions of US dollars) for units" + countries = [countries] if isinstance(countries, str) else countries # type: ignore[assignment] + + if units not in ["USD", "USD_CAP"]: + console.print( + "Invalid choice, choices are either USD or USD_CAP. Defaulting to USD." ) + units = "USD" df = oecd_model.get_gdp(countries, units, start_date, end_date) @@ -102,7 +104,8 @@ def plot_gdp( showlegend=True, ) - title = "Nominal Gross Domestic Product (GDP)" + title = "Nominal Gross Domestic Product (USD)" + title = title + " Per Capita" if units == "USD_CAP" else title fig.set_title(title) if raw: diff --git a/tests/openbb_terminal/economy/cassettes/test_oecd_model/test_get_gdp.yaml b/tests/openbb_terminal/economy/cassettes/test_oecd_model/test_get_gdp.yaml index 9db6e834e45..2079d460a20 100644 --- a/tests/openbb_terminal/economy/cassettes/test_oecd_model/test_get_gdp.yaml +++ b/tests/openbb_terminal/economy/cassettes/test_oecd_model/test_get_gdp.yaml @@ -9,11 +9,11 @@ interactions: User-Agent: - Python-urllib/3.10 method: GET - uri: https://stats.oecd.org/sdmx-json/data/DP_LIVE/.GDP.TOT.USD_CAP.A/OECD?contentType=csv&detail=code&separator=comma&csv-lang=en&startPeriod=2020-01-01&endPeriod=2022-01-31 + uri: https://stats.oecd.org/sdmx-json/data/DP_LIVE/.GDP.TOT.MLN_USD.A/OECD?contentType=csv&detail=code&separator=comma&csv-lang=en&startPeriod=2020-01-01&endPeriod=2022-01-31 response: body: string: "\uFEFF\"LOCATION\",\"INDICATOR\",\"SUBJECT\",\"MEASURE\",\"FREQUENCY\",\"TIME\",\"Value\",\"Flag - Codes\"\r\n\"AUS\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",55690.9186,\r\n\"AUS\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",61977.196179,\r\n\"AUT\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",57253.300563,\r\n\"AUT\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",59976.264665,\r\n\"BEL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",54539.032525,\"P\"\r\n\"BEL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",58806.119249,\"P\"\r\n\"CAN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",47265.698235,\r\n\"CAN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",53101.315002,\r\n\"CZE\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",42813.74134,\r\n\"CZE\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",44801.666875,\r\n\"DNK\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",60840.940164,\r\n\"DNK\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",64897.769113,\r\n\"FIN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",52289.303157,\r\n\"FIN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",54687.859802,\r\n\"FRA\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",47823.919578,\r\n\"FRA\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",50998.933198,\"P\"\r\n\"DEU\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",56476.934309,\"P\"\r\n\"DEU\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",58784.138861,\"P\"\r\n\"GRC\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",28413.784684,\"P\"\r\n\"GRC\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",31289.247761,\"P\"\r\n\"HUN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",34156.840044,\r\n\"HUN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",36677.803167,\"P\"\r\n\"ISL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",54649.872164,\r\n\"ISL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",58297.114413,\r\n\"IRL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",94028.901163,\r\n\"IRL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",106852.122229,\r\n\"ITA\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",43140.246576,\r\n\"ITA\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",46674.614118,\r\n\"JPN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",41770.933602,\r\n\"JPN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",42782.469082,\r\n\"KOR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",44698.282816,\r\n\"KOR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",46888.679035,\"P\"\r\n\"LUX\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",119871.429414,\r\n\"LUX\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",131277.948732,\"P\"\r\n\"MEX\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",18466.909979,\"P\"\r\n\"MEX\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",19445.00585,\"P\"\r\n\"NLD\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",59815.501543,\"P\"\r\n\"NLD\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",63418.747204,\"P\"\r\n\"NZL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",45414.702452,\r\n\"NZL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",47045.373087,\"E\"\r\n\"NOR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",65129.643836,\r\n\"NOR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",81850.933065,\r\n\"POL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",34893.459765,\r\n\"POL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",37710.71133,\r\n\"PRT\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",34952.243057,\r\n\"PRT\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",36760.996583,\"P\"\r\n\"SVK\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",32898.852987,\r\n\"SVK\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",33941.41438,\r\n\"ESP\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",37992.368883,\"P\"\r\n\"ESP\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",40724.034713,\"P\"\r\n\"SWE\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",56135.141361,\r\n\"SWE\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",60111.612638,\r\n\"CHE\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",70804.014012,\r\n\"CHE\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",75950.570423,\r\n\"TUR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",27971.203588,\r\n\"TUR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",30671.746024,\r\n\"GBR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",45867.757803,\r\n\"GBR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",49765.080563,\r\n\"USA\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",63480.861222,\r\n\"USA\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",70181.12175,\r\n\"CHL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",24606.968439,\r\n\"CHL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",28105.05092,\r\n\"CHN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",17176.865661,\r\n\"CHN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",19334.953602,\r\n\"COL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",15650.441829,\"P\"\r\n\"COL\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",17436.951542,\"E\"\r\n\"EST\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",39456.812096,\r\n\"EST\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",43494.06995,\r\n\"ISR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",40223.17989,\r\n\"ISR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",44060.518619,\r\n\"RUS\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",29819.046969,\"E\"\r\n\"SVN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",40860.470781,\r\n\"SVN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",43970.371468,\r\n\"ZAF\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",12293.489021,\r\n\"OECD\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",45359.343025,\"P\"\r\n\"OECD\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",49021.954326,\"E\"\r\n\"OECDE\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",44618.19283,\"P\"\r\n\"OECDE\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",47872.813415,\"P\"\r\n\"LVA\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",33008.225642,\r\n\"LVA\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",35037.056459,\r\n\"LTU\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",40124.47344,\r\n\"LTU\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",43688.013736,\r\n\"SAU\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",46378.343249,\r\n\"EA19\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",48238.265758,\r\n\"EA19\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",51333.028282,\r\n\"ARG\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",20769.015441,\r\n\"ARG\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",23627.366959,\r\n\"CRI\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",21763.124576,\r\n\"CRI\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",22700.254928,\"E\"\r\n\"BGR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",25167.305528,\r\n\"BGR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",26793.309833,\"P\"\r\n\"HRV\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",29690.20613,\r\n\"HRV\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",34022.550299,\"P\"\r\n\"CYP\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",40897.780537,\"P\"\r\n\"CYP\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",43317.904519,\"P\"\r\n\"MLT\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",44509.304787,\r\n\"MLT\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",48726.138109,\r\n\"ROU\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",33080.128126,\"P\"\r\n\"ROU\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",35946.765464,\"P\"\r\n\"ZMB\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",3358.004891,\r\n\"HKG\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",58988.697181,\"E\"\r\n\"HKG\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",66159.314319,\"E\"\r\n\"MDG\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",1540.394877,\"E\"\r\n\"MAR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",8051.435771,\"E\"\r\n\"MAR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",9073.558801,\"E\"\r\n\"SGP\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",98148.67364,\r\n\"EU27_2020\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",45843.543522,\r\n\"EU27_2020\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",48924.776134,\r\n\"ALB\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",14033.967211,\"P\"\r\n\"SRB\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",19547.72567,\r\n\"SRB\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2021\",21588.39529,\"P\"\r\n\"GEO\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",14731.202573,\r\n\"CMR\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",3867.183996,\r\n\"SEN\",\"GDP\",\"TOT\",\"USD_CAP\",\"A\",\"2020\",3513.149951,\r\n" + Codes\"\r\n\"AUS\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",1430866.404,\r\n\"AUS\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",1595112.956,\r\n\"AUT\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",510568.008,\r\n\"AUT\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",537014.574,\r\n\"BEL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",629660.776,\"P\"\r\n\"BEL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",682137.395,\"P\"\r\n\"CAN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",1794940.001,\r\n\"CAN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",2026899.115,\r\n\"CZE\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",458157.819,\r\n\"CZE\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",479378.76,\r\n\"DNK\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",354277.793,\r\n\"DNK\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",387053.183,\r\n\"FIN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",289224.32,\r\n\"FIN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",303523.797,\r\n\"FRA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",3252531.255,\r\n\"FRA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",3479874.481,\"P\"\r\n\"DEU\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",4697130.976,\"P\"\r\n\"DEU\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",4891842.639,\"P\"\r\n\"GRC\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",304016.729,\"P\"\r\n\"GRC\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",333014.632,\"P\"\r\n\"HUN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",333161.834,\r\n\"HUN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",357064.87,\"P\"\r\n\"ISL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",19900.372,\r\n\"ISL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",21678.937,\r\n\"IRL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",471371.126,\r\n\"IRL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",546184.137,\r\n\"ITA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",2564455.924,\r\n\"ITA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",2760717.633,\r\n\"JPN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",5263052.866,\r\n\"JPN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",5383426.681,\r\n\"KOR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",2316806.899,\r\n\"KOR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",2425556.12,\"P\"\r\n\"LUX\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",75656.711,\r\n\"LUX\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",84175.446,\r\n\"MEX\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",2333740.769,\"P\"\r\n\"MEX\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",2480684.356,\"P\"\r\n\"NLD\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",1043402.526,\r\n\"NLD\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",1130684.908,\r\n\"NZL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",231699.786,\r\n\"NZL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",245363.98,\r\n\"NOR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",350366.117,\r\n\"NOR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",442761.845,\r\n\"POL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",1338432.734,\r\n\"POL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",1443514.646,\r\n\"PRT\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",359941.428,\r\n\"PRT\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",378292.824,\"P\"\r\n\"SVK\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",179715.845,\r\n\"SVK\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",188085.979,\r\n\"ESP\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",1799328.046,\"P\"\r\n\"ESP\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",1928019.184,\"P\"\r\n\"SWE\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",581247.942,\r\n\"SWE\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",629080.783,\r\n\"CHE\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",611675.806,\r\n\"CHE\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",661282.472,\r\n\"TUR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",2332603.593,\r\n\"TUR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",2581588.441,\r\n\"GBR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",3077151.591,\r\n\"GBR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",3355086.227,\r\n\"USA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",21060474,\r\n\"USA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",23315081,\r\n\"CHL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",481373.694,\r\n\"CHL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",552379.782,\r\n\"CHN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",24255795.538,\r\n\"CHN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",27445503.77,\r\n\"COL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",769209.548,\"P\"\r\n\"COL\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",881190.92,\"P\"\r\n\"EST\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",52438.777,\r\n\"EST\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",57864.708,\r\n\"IND\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",9005119.325,\r\n\"IDN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",3303238.766,\r\n\"IDN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",3567505.282,\r\n\"ISR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",370624.727,\r\n\"ISR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",412651.502,\r\n\"RUS\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",4367291.715,\r\n\"SVN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",85929.679,\r\n\"SVN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",92701.12,\r\n\"ZAF\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",796453.237,\r\n\"ZAF\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",870861.683,\r\n\"OECD\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",62111314.203,\"P\"\r\n\"OECD\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",67376333.253,\"E\"\r\n\"OECDE\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",25947386.546,\"P\"\r\n\"OECDE\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",27941283.242,\"P\"\r\n\"LVA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",62750.162,\r\n\"LVA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",65991.926,\r\n\"BRA\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",3213097.741,\r\n\"LTU\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",112288.658,\r\n\"LTU\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",122667.694,\r\n\"SAU\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",1628533.458,\r\n\"SAU\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",1751177.858,\r\n\"EA19\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",16561861.2,\r\n\"EA19\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",17651090.34,\r\n\"ARG\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",942170.824,\r\n\"ARG\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",1083361.763,\r\n\"CRI\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",111138.964,\r\n\"CRI\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",116703.599,\"E\"\r\n\"BGR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",175386.724,\r\n\"BGR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",193304.902,\r\n\"HRV\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",120226.026,\r\n\"HRV\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",134736.734,\"P\"\r\n\"CYP\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",36948.39,\r\n\"CYP\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",39970.121,\r\n\"MLT\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",23149.335,\r\n\"MLT\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",25907.066,\r\n\"ROU\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",642164.611,\r\n\"ROU\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",693440.505,\"P\"\r\n\"MKD\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",35902.666,\r\n\"MKD\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",37872.917,\"P\"\r\n\"ZMB\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",63559.36,\r\n\"HKG\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",441000.955,\r\n\"HKG\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",488461.722,\r\n\"MDG\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",43227.888,\"E\"\r\n\"MAR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",292347.633,\r\n\"MAR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",332718.328,\r\n\"SGP\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",558073.358,\r\n\"EU27_2020\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",20565206.685,\r\n\"EU27_2020\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",21972441.797,\r\n\"ALB\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",39826.28,\"P\"\r\n\"SRB\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",134862.222,\r\n\"SRB\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2021\",147874.29,\"P\"\r\n\"GEO\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",54840.076,\r\n\"CMR\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",102499.678,\r\n\"SEN\",\"GDP\",\"TOT\",\"MLN_USD\",\"A\",\"2020\",58676.63,\r\n" headers: Access-Control-Allow-Headers: - Content-Type @@ -26,11 +26,11 @@ interactions: Connection: - close Content-Disposition: - - attachment;filename=DP_LIVE_20032023141550584.csv + - attachment;filename=DP_LIVE_29072023210803524.csv Content-Type: - text/csv Date: - - Mon, 20 Mar 2023 13:15:50 GMT + - Sat, 29 Jul 2023 19:08:03 GMT Transfer-Encoding: - chunked status: diff --git a/tests/openbb_terminal/economy/csv/test_oecd_model/test_get_gdp.csv b/tests/openbb_terminal/economy/csv/test_oecd_model/test_get_gdp.csv index 1cc65f4b2af..9782b0b3159 100644 --- a/tests/openbb_terminal/economy/csv/test_oecd_model/test_get_gdp.csv +++ b/tests/openbb_terminal/economy/csv/test_oecd_model/test_get_gdp.csv @@ -1,3 +1,3 @@ TIME,united_states,canada -2020-01-01,63480.861222,47265.698235 -2021-01-01,70181.12175,53101.315002 +2020-01-01,21060474000000.0,1794940001000.0 +2021-01-01,23315081000000.0,2026899115000.0 diff --git a/tests/openbb_terminal/economy/test_economy_controller.py b/tests/openbb_terminal/economy/test_economy_controller.py index ad74d47977d..f6f985a0c40 100644 --- a/tests/openbb_terminal/economy/test_economy_controller.py +++ b/tests/openbb_terminal/economy/test_economy_controller.py @@ -609,7 +609,7 @@ def test_call_func_expect_queue(expected_queue, func, queue): countries=["united states"], start_date=datetime.datetime(2021, 1, 1, 0, 0), end_date=datetime.datetime(2023, 1, 1, 0, 0), - units="USD_CAP", + units="USD", raw=False, export="csv", sheet_name=None, diff --git a/tests/openbb_terminal/economy/test_oecd_model.py b/tests/openbb_terminal/economy/test_oecd_model.py index fa3f7f90351..816d55c9a81 100644 --- a/tests/openbb_terminal/economy/test_oecd_model.py +++ b/tests/openbb_terminal/economy/test_oecd_model.py @@ -11,8 +11,8 @@ def test_get_gdp(recorder): """Test get_gdp""" data = oecd_model.get_gdp( countries=["united_states", "canada"], - start_date=datetime.strptime("2020-01-01", "%Y-%m-%d"), - end_date=datetime.strptime("2022-01-31", "%Y-%m-%d"), + start_date="2020-01-01", + end_date="2022-01-31", ) assert isinstance(data, pd.DataFrame) recorder.capture(data) diff --git a/tests/openbb_terminal/economy/test_oecd_view.py b/tests/openbb_terminal/economy/test_oecd_view.py index b1f36e7ef1b..921ad7a9056 100644 --- a/tests/openbb_terminal/economy/test_oecd_view.py +++ b/tests/openbb_terminal/economy/test_oecd_view.py @@ -9,7 +9,10 @@ from openbb_terminal.economy import oecd_view @pytest.mark.parametrize( "countries, kwargs", [ - (["united_states"], {"start_date": "2019-01-01", "end_date": "2021-12-31"}), + ( + ["united_states"], + {"units": "USD_CAP", "start_date": "2019-01-01", "end_date": "2021-12-31"}, + ), ], ) def test_plot_gdp(countries, kwargs): From c8f82e1f8fe6150fcc1548a8f92f1d0e710f78c3 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 1 Aug 2023 12:04:16 +0100 Subject: [PATCH 03/28] reorder system settings attrs --- .../openbb_core/app/model/system_settings.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/openbb_sdk/sdk/core/openbb_core/app/model/system_settings.py b/openbb_sdk/sdk/core/openbb_core/app/model/system_settings.py index 7d39030216a..b883a7d191b 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/model/system_settings.py +++ b/openbb_sdk/sdk/core/openbb_core/app/model/system_settings.py @@ -20,17 +20,6 @@ FrozenField = partial(Field, allow_mutation=False) class SystemSettings(Tagged): - run_in_isolation: bool = Field( - default=False, - description="Whether or not to run each command in total isolation.", - allow_mutation=False, - ) - dbms_uri: Optional[str] = Field( - default=None, - description="Connection URI like : `mongodb://root:example@localhost:27017/`", - allow_mutation=False, - ) - # System section os: str = FrozenField(default=str(pl.system())) python_version: str = FrozenField(default=str(pl.python_version())) @@ -60,6 +49,14 @@ class SystemSettings(Tagged): test_mode: bool = False debug_mode: bool = False headless: bool = False + run_in_isolation: bool = FrozenField( + default=False, + description="Whether or not to run each command in total isolation.", + ) + dbms_uri: Optional[str] = FrozenField( + default=None, + description="Connection URI like : `mongodb://root:example@localhost:27017/`", + ) class Config: validate_assignment = True From fe1073da095cc4ccd77b9bc41fbe895119413d66 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 1 Aug 2023 12:29:42 +0100 Subject: [PATCH 04/28] only allow setup for allowed system fields --- .../openbb_core/app/service/system_service.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/openbb_sdk/sdk/core/openbb_core/app/service/system_service.py b/openbb_sdk/sdk/core/openbb_core/app/service/system_service.py index f9bc25cc7b9..5e974a195e4 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/service/system_service.py +++ b/openbb_sdk/sdk/core/openbb_core/app/service/system_service.py @@ -1,3 +1,4 @@ +import json from pathlib import Path from typing import Optional @@ -7,7 +8,14 @@ from openbb_core.app.model.system_settings import SystemSettings class SystemService: SYSTEM_SETTINGS_PATH = SYSTEM_SETTINGS_PATH - SYSTEM_SETTINGS_ALLOWED_FIELD_SET = {"run_in_isolation", "dbms_uri"} + SYSTEM_SETTINGS_ALLOWED_FIELD_SET = { + "log_collect", + "test_mode", + "headless", + "debug_mode", + "run_in_isolation", + "dbms_uri", + } @classmethod def read_default_system_settings( @@ -19,7 +27,13 @@ class SystemService: with path.open(mode="r") as file: system_settings_json = file.read() - system_settings = SystemSettings.parse_raw(system_settings_json) + system_settings_dict = json.loads(system_settings_json) + S = system_settings_dict.copy() + for field in S: + if field not in cls.SYSTEM_SETTINGS_ALLOWED_FIELD_SET: + del system_settings_dict[field] + + system_settings = SystemSettings.parse_obj(system_settings_dict) else: system_settings = SystemSettings() From 3b5fc53cc770a4b6cc1bbd9a7390013d1167c2c6 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 1 Aug 2023 06:41:21 -0700 Subject: [PATCH 05/28] Adds details/image for installing C++ Build Tools (#5268) * Adds details/image for installing C++ Build Tools * Update installation_updates.md with screenshots * Update installation_updates.md Screenshots for MS C++ Build Tools --- website/content/sdk/faqs/installation_updates.md | 10 ++++++++++ website/content/terminal/faqs/installation_updates.md | 4 ++++ website/content/terminal/installation/source.md | 11 +++++++++++ 3 files changed, 25 insertions(+) diff --git a/website/content/sdk/faqs/installation_updates.md b/website/content/sdk/faqs/installation_updates.md index 58498bb91d5..68651eec43a 100644 --- a/website/content/sdk/faqs/installation_updates.md +++ b/website/content/sdk/faqs/installation_updates.md @@ -32,6 +32,16 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; ## Installation and Updates +
"Microsoft Visual C++ 14.0 or greater is required" + +Download and install [C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/), restart the machine, then try again. + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/ceb57be0-6dae-42f2-aca6-bf62ce7d6135) + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/f8aef8fc-a080-4164-bd36-460714ec44f3) + +
+
Do I have to use Miniconda? There are certain dependencies which are sourced exclusively from the `conda-forge` directory. Other virtual environment managers, such a `venv`, may not solve the environment properly, resulting in failed package installations or incorrect builds. We highly recommend using Miniconda as the Python virtual environment manager for installing the OpenBB SDK. diff --git a/website/content/terminal/faqs/installation_updates.md b/website/content/terminal/faqs/installation_updates.md index 7c35712c2c2..c49bca56200 100644 --- a/website/content/terminal/faqs/installation_updates.md +++ b/website/content/terminal/faqs/installation_updates.md @@ -74,6 +74,10 @@ poetry install -E all Download and install [C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/), restart the machine, then try again. +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/ceb57be0-6dae-42f2-aca6-bf62ce7d6135) + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/f8aef8fc-a080-4164-bd36-460714ec44f3) +
Error: failed building wheel for bt diff --git a/website/content/terminal/installation/source.md b/website/content/terminal/installation/source.md index 540cf33657a..5f06c3b639f 100644 --- a/website/content/terminal/installation/source.md +++ b/website/content/terminal/installation/source.md @@ -59,6 +59,12 @@ If Miniconda is installed, a version number will be displayed, for example: conda 23.1.0 ``` +There is a good chance the version of Conda is not current. Update it with the command below: + +```shell +conda update -n base -c conda-forge conda +``` +
Git @@ -89,6 +95,11 @@ Or follow the instructions [here](https://git-scm.com/book/en/v2/Getting-Started Use the instructions [here](https://visualstudio.microsoft.com/visual-cpp-build-tools/) to install or update Microsoft C++ Build Tools. +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/ceb57be0-6dae-42f2-aca6-bf62ce7d6135) + +![image](https://github.com/OpenBB-finance/OpenBBTerminal/assets/85772166/f8aef8fc-a080-4164-bd36-460714ec44f3) + +
Rosetta2 (Apple Silicon only) From ae91a3f9b9cba56c18323091a266acfd6e1d7595 Mon Sep 17 00:00:00 2001 From: teh_coderer Date: Tue, 1 Aug 2023 11:05:29 -0500 Subject: [PATCH 06/28] Hotfix `economy/overview` rates displaying as dates (#5269) * fix: `economy/overview` rates displaying as dates * Fix Test --------- Co-authored-by: James Maslek --- .../tables/src/components/Table/index.tsx | 4 +- openbb_terminal/core/plots/table.html | 90 +++++++++---------- .../test_display_curve[YI].txt | 3 +- 3 files changed, 48 insertions(+), 49 deletions(-) diff --git a/frontend-components/tables/src/components/Table/index.tsx b/frontend-components/tables/src/components/Table/index.tsx index e948185ece6..ee46a822208 100644 --- a/frontend-components/tables/src/components/Table/index.tsx +++ b/frontend-components/tables/src/components/Table/index.tsx @@ -181,7 +181,7 @@ export default function Table({ : columns[0]; const indexValue = indexLabel ? row[indexLabel] : null; const value = row[column]; - const only_numbers = value?.toString().replace(/[^0-9]/g, "") ?? ""; + const only_numbers = value?.toString()?.split(".")?.pop()?.replace(/[^0-9]/g, "") ?? ""; const probablyDate = only_numbers?.length >= 4 && (includesDateNames(column) || @@ -219,7 +219,7 @@ export default function Table({ const indexValue = indexLabel ? row.original[indexLabel] : null; const value = row.original[column]; const valueType = typeof value; - const only_numbers = value?.toString().replace(/[^0-9]/g, "") ?? ""; + const only_numbers = value?.toString()?.split(".")?.pop()?.replace(/[^0-9]/g, "") ?? ""; const probablyDate = only_numbers?.length >= 4 && (includesDateNames(column) || diff --git a/openbb_terminal/core/plots/table.html b/openbb_terminal/core/plots/table.html index 98161f92834..351a979165b 100644 --- a/openbb_terminal/core/plots/table.html +++ b/openbb_terminal/core/plots/table.html @@ -79,7 +79,7 @@ }