diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index baa9109dd04..ca2832ee3f1 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -27,6 +27,13 @@ jobs: virtualenvs-create: true virtualenvs-in-project: true + - name: Setup sudo apt installs for ubuntu-latest + run: | + sudo apt-get update + sudo apt-get install -y \ + libgtk-3-dev \ + libwebkit2gtk-4.0-dev + - name: Load cached venv id: cached-poetry-dependencies uses: actions/cache@v3 @@ -55,7 +62,7 @@ jobs: cache-dependency-path: website/yarn.lock - name: Install dependencies - run: yarn install --frozen-lockfile + run: yarn install working-directory: website - name: Build website diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index ec8830a5516..0c1f7d59237 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -45,6 +45,13 @@ jobs: virtualenvs-create: true virtualenvs-in-project: true + - name: Setup sudo apt installs for ubuntu-latest + run: | + sudo apt-get update + sudo apt-get install -y \ + libgtk-3-dev \ + libwebkit2gtk-4.0-dev + - name: Load cached venv id: cached-poetry-dependencies uses: actions/cache@v3 @@ -72,7 +79,7 @@ jobs: title: "Integration test summary" path: failed_tests.txt channel: ${{ secrets.SLACK_CHANNEL_ID }} - + - name: Slack Notification - Success/Failure uses: act10ns/slack@v1 with: diff --git a/build/docker/compose.env b/build/docker/compose.env index d434ae1d312..ba80eef481d 100644 --- a/build/docker/compose.env +++ b/build/docker/compose.env @@ -1,2 +1,2 @@ OPENBBTERMINAL_DOCKER_REGISTRY="ghcr.io" -OPENBBTERMINAL_DOCKER_RELEASE_VERSION="2.5.1" +OPENBBTERMINAL_DOCKER_RELEASE_VERSION="3.0.0rc1" diff --git a/build/docker/docker-compose.yaml b/build/docker/docker-compose.yaml index 3d88dde0b2d..23970f8c0e7 100644 --- a/build/docker/docker-compose.yaml +++ b/build/docker/docker-compose.yaml @@ -7,6 +7,6 @@ services: - ~/OpenBBUserData:/home/python/OpenBBUserData - ~/.openbb_terminal:/home/python/.openbb_terminal platform: linux/amd64 - image: ghcr.io/openbb-finance/openbbterminal/openbb:2.5.1 + image: ghcr.io/openbb-finance/openbbterminal/openbb:3.0.0rc1 stdin_open: true # docker run -i tty: true # docker run -t diff --git a/build/nsis/setup.nsi b/build/nsis/setup.nsi index 639faff9d54..bcba92458d4 100644 --- a/build/nsis/setup.nsi +++ b/build/nsis/setup.nsi @@ -10,7 +10,7 @@ !define NAME "OpenBB Terminal" !define COMPANY "OpenBB" !define APPFILE "OpenBBTerminal.exe" - !define VERSION "2.5.1" + !define VERSION "3.0.0rc1" !define SLUG "${NAME} v${VERSION}" ;-------------------------------- diff --git a/build/pyinstaller/.env b/build/pyinstaller/.env index 4655fb47f4c..d6663e26a9d 100644 --- a/build/pyinstaller/.env +++ b/build/pyinstaller/.env @@ -1,5 +1,5 @@ OPENBB_LOGGING_APP_NAME=gst_packaged -OPENBB_LOGGING_COMMIT_HASH=sha:7c74b10 +OPENBB_LOGGING_COMMIT_HASH=sha:7972098 OPENBB_ENABLE_PREDICT=false OPENBB_ENABLE_CHECK_API=true OPENBB_ENABLE_THOUGHTS_DAY=false diff --git a/openbb_terminal/core/models/system_model.py b/openbb_terminal/core/models/system_model.py index 8f588883529..7c7df79a8a3 100644 --- a/openbb_terminal/core/models/system_model.py +++ b/openbb_terminal/core/models/system_model.py @@ -10,7 +10,7 @@ class SystemModel(BaseModel): """Data model for system variables and configurations.""" # System version - VERSION = "2.5.1" + VERSION = "3.0.0rc1" # Logging section LOGGING_APP_NAME: str = "gst" diff --git a/openbb_terminal/core/plots/backend.py b/openbb_terminal/core/plots/backend.py index 33d7306feb1..a62f7e28168 100644 --- a/openbb_terminal/core/plots/backend.py +++ b/openbb_terminal/core/plots/backend.py @@ -72,7 +72,7 @@ class Backend(PyWry): and not strtobool(os.environ.get("OPENBB_ENABLE_QUICK_EXIT", False)) and current_process().name == "MainProcess" ) - if PyWry.__version__ == "0.0.0": + if hasattr(PyWry, "__version__") and PyWry.__version__ == "0.0.0": self.isatty = False self.WIDTH, self.HEIGHT = 1400, 762 diff --git a/openbb_terminal/core/plots/no_import.py b/openbb_terminal/core/plots/no_import.py index 6cd435cb2e5..50b951132ee 100644 --- a/openbb_terminal/core/plots/no_import.py +++ b/openbb_terminal/core/plots/no_import.py @@ -7,8 +7,6 @@ from openbb_terminal.base_helpers import console from openbb_terminal.core.config.paths import SETTINGS_ENV_FILE from openbb_terminal.core.session.current_user import get_current_user -__version__ = "0.0.0" - pywry_missing = """ [red]PyWry is not installed or missing required linux dependencies.[/] @@ -34,6 +32,8 @@ To activate interactive plots/tables in pywry window, please make sure the follo class DummyBackend: """Dummy class to avoid import errors.""" + __version__ = "0.0.0" + max_retries = 0 outgoing: List[str] = [] init_engine: List[str] = [] diff --git a/openbb_terminal/dashboards/voila/chains.ipynb b/openbb_terminal/dashboards/voila/chains.ipynb index e99983e50c0..037b1ddaa66 100644 --- a/openbb_terminal/dashboards/voila/chains.ipynb +++ b/openbb_terminal/dashboards/voila/chains.ipynb @@ -64,7 +64,7 @@ " xanchor=\"center\",\n", " yanchor=\"top\",\n", " ),\n", - " )\n" + " )" ] }, { diff --git a/openbb_terminal/forecast/helpers.py b/openbb_terminal/forecast/helpers.py index b207bd3beab..c91ce3bb54b 100644 --- a/openbb_terminal/forecast/helpers.py +++ b/openbb_terminal/forecast/helpers.py @@ -343,12 +343,13 @@ def lambda_price_prediction_color(val: float) -> str: def print_pretty_prediction(df_pred: pd.DataFrame, last_price: float): """Print predictions""" - if rich_config.USE_COLOR and not get_current_user().preferences.USE_INTERACTIVE_DF: + if rich_config.USE_COLOR: df_pred = pd.DataFrame(df_pred) df_pred.columns = ["pred"] - df_pred["pred"] = df_pred["pred"].apply( - lambda x: lambda_price_prediction_color(x) - ) + if not get_current_user().preferences.USE_INTERACTIVE_DF: + df_pred["pred"] = df_pred["pred"].apply( + lambda x: lambda_price_prediction_color(x) + ) if check_dates(df_pred.index.to_series()): df_pred.index = df_pred.index.date print_rich_table( diff --git a/openbb_terminal/miscellaneous/i18n/en.yml b/openbb_terminal/miscellaneous/i18n/en.yml index 9e12be98722..8f6d520e212 100644 --- a/openbb_terminal/miscellaneous/i18n/en.yml +++ b/openbb_terminal/miscellaneous/i18n/en.yml @@ -751,7 +751,7 @@ en: economy/balance: Show Government defict or surplus in capital income and expenditures economy/revenue: Show Government revenue based on tax income economy/spending: Show Government spending as indicator of size of government - economy/trust: Show Government trust based on surveys regarding confidence in the government + economy/trust: Show Government trust based on surveys regarding confidence in the government economy/_database_: Databases economy/_stored: Stored datasets economy/overview: show a market overview of either indices, bonds or currencies diff --git a/openbb_terminal/miscellaneous/stocks/options/high_iv.ini b/openbb_terminal/miscellaneous/stocks/options/high_iv.ini index 0fb16644274..0a865fb1f99 100644 --- a/openbb_terminal/miscellaneous/stocks/options/high_iv.ini +++ b/openbb_terminal/miscellaneous/stocks/options/high_iv.ini @@ -4,7 +4,7 @@ # tickers [string]: a list of space or comma separated tickers to restrict or exclude them from the query. # E.g. "GME" or for multiples "AMC,BB,GME". -tickers = +tickers = # exclude [true|false]: if true, then tickers are excluded. If false, the search is restricted to these tickers. exclude = @@ -25,25 +25,25 @@ otm = true min-ask-bid = # max-ask-bid [float]: maximum spread between bid and ask. -max-ask-bid = +max-ask-bid = # min-exp [int]: minimum days until expiration. min-exp = # max-exp [int]: maximum days until expiration. -max-exp = +max-exp = # min-price [float]: minimum option premium. -min-price = +min-price = # max-price [float]: maximum option premium. max-price = #min-strike [float]: minimum option strike. -min-strike = +min-strike = #max-strike [float]: maximum option strike. -max-strike = +max-strike = # calls [true|false]: select call options. calls = true @@ -76,10 +76,10 @@ min-myield = max-myield = # min-delta [float]: minimum delta greek. -min-delta = +min-delta = # max-delta [float]: maximum delta greek. -max-delta = +max-delta = # min-gamma [float]: minimum gamma greek. min-gamma = @@ -103,7 +103,7 @@ max-vega = min-iv = 1.00 #max-iv [float]: maximum implied volatility. -max-iv = +max-iv = #min-oi [float]: minimum open interest. min-oi = 10 @@ -118,7 +118,7 @@ min-volume = 10 max-volume = #min-voi [float]: minimum volume / oi ratio. -min-voi = +min-voi = #max-voi [float]: maximum volume / oi ratio. max-voi = @@ -151,8 +151,8 @@ min-price-20d = max-price-20d = min-volume-20d = max-volume-20d = -min-iv-20d = -max-iv-20d = +min-iv-20d = +max-iv-20d = min-delta-20d = max-delta-20d = min-gamma-20d = diff --git a/openbb_terminal/miscellaneous/stocks/options/iv_below_20day.ini b/openbb_terminal/miscellaneous/stocks/options/iv_below_20day.ini index ca2153a983f..f121959a319 100644 --- a/openbb_terminal/miscellaneous/stocks/options/iv_below_20day.ini +++ b/openbb_terminal/miscellaneous/stocks/options/iv_below_20day.ini @@ -100,19 +100,19 @@ min-vega = max-vega = #min-iv [float]: minimum implied volatility. -min-iv = +min-iv = 1.00 #max-iv [float]: maximum implied volatility. max-iv = #min-oi [float]: minimum open interest. -min-oi = 1 +min-oi = 10 #max-oi[float]: maximum open interest max-oi = #min-volume [float]: minimum volume. -min-volume = +min-volume = 10 #max-volume [float]: maximum volume. max-volume = diff --git a/openbb_terminal/terminal_helper.py b/openbb_terminal/terminal_helper.py index b12bf34a908..e03845ca9ad 100644 --- a/openbb_terminal/terminal_helper.py +++ b/openbb_terminal/terminal_helper.py @@ -129,27 +129,27 @@ def update_terminal(): def open_openbb_documentation( - path, url="http://localhost/app/terminal", command=None, arg_type="" + path, url="https://my.openbb.dev/app/terminal", command=None, arg_type="" ): """Opens the documentation page based on your current location within the terminal. Make exceptions for menus that are considered 'common' by adjusting the path accordingly.""" if path == "/" and command is None: - path = "/how-to" + path = "/guides" command = "" elif "keys" in path: - path = "/guides?full=1&path=/quickstart/api-keys" + path = "/usage?full=1&path=/guides/api-keys" command = "" elif "settings" in path: - path = "/guides?path=/advanced/customizing-the-terminal" + path = "/usage?path=/guides/customizing-the-terminal" command = "" elif "featflags" in path: - path = "/guides?path=/advanced/customizing-the-terminal" + path = "/usage?path=/guides/customizing-the-terminal" command = "" elif "sources" in path: - path = "/guides?path=/advanced/changing-sources" + path = "/usage?path=/guides/changing-sources" command = "" elif "params" in path: - path = "/guides?path=/intros/portfolio/po" + path = "/usage?path=/intros/portfolio/po" command = "" else: if arg_type == "command": # user passed a command name @@ -157,32 +157,32 @@ def open_openbb_documentation( elif arg_type == "menu": # user passed a menu name if command in ["ta", "ba", "qa"]: menu = path.split("/")[-2] - path = f"/guides?path=/intros/common/{menu}" + path = f"/usage?path=/intros/common/{menu}" elif command == "forecast": command = "" - path = "/guides?path=/intros/forecast" + path = "/usage?path=/intros/forecast" else: - path = f"/guides?path=/intros/{path}" + path = f"/usage?path=/intros/{path}" else: # user didn't pass argument and is in a menu menu = path.split("/")[-2] path = ( - f"/guides?path=/intros/common/{menu}" + f"/usage?path=/intros/common/{menu}" if menu in ["ta", "ba", "qa"] - else f"/guides?path=/intros/{path}" + else f"/usage?path=/intros/{path}" ) if command: if command == "keys": - path = "/guides?full=1&path=/quickstart/api-keys" + path = "/usage?full=1&path=/guides/api-keys" command = "" elif "settings" in path or "featflags" in path: - path = "/guides?path=/advanced/customizing-the-terminal" + path = "/usage?path=/guides/customizing-the-terminal" command = "" elif "sources" in path: - path = "/guides?path=/advanced/changing-sources" + path = "/usage?path=/guides/changing-sources" command = "" elif command in ["record", "stop", "exe"]: - path = "/guides?path=/advanced/scripts-and-routines" + path = "/usage?path=/guides/scripts-and-routines" command = "" elif command in [ "intro", @@ -193,7 +193,7 @@ def open_openbb_documentation( "wiki", "news", ]: - path = "" + path = "/guides" command = "" elif command in ["ta", "ba", "qa"]: path = f"/guides?path=/intros/common/{command}" diff --git a/pyproject.toml b/pyproject.toml index 8493c01ca44..56b6f424f66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "openbb" -version = "2.5.1" +version = "3.0.0rc1" description = "Investment Research for Everyone, Anywhere." license = "MIT" authors = ["Didier Rodrigues Lopes"] diff --git a/tests/openbb_terminal/stocks/options/ini/spy_30_delta.ini b/tests/openbb_terminal/stocks/options/ini/spy_30_delta.ini index 9808f91a146..9ca3565c7c4 100644 --- a/tests/openbb_terminal/stocks/options/ini/spy_30_delta.ini +++ b/tests/openbb_terminal/stocks/options/ini/spy_30_delta.ini @@ -25,13 +25,13 @@ otm = true min-ask-bid = # max-ask-bid [float]: maximum spread between bid and ask. -max-ask-bid = +max-ask-bid = # min-exp [int]: minimum days until expiration. min-exp = # max-exp [int]: maximum days until expiration. -max-exp = +max-exp = # min-price [float]: minimum option premium. min-price = @@ -43,7 +43,7 @@ max-price = min-strike = 280 #max-strike [float]: maximum option strike. -max-strike = +max-strike = # calls [true|false]: select call options. calls = true @@ -100,10 +100,10 @@ min-vega = max-vega = #min-iv [float]: minimum implied volatility. -min-iv = +min-iv = #max-iv [float]: maximum implied volatility. -max-iv = +max-iv = #min-oi [float]: minimum open interest. min-oi = 10 @@ -118,7 +118,7 @@ min-volume = 100 max-volume = #min-voi [float]: minimum volume / oi ratio. -min-voi = +min-voi = #max-voi [float]: maximum volume / oi ratio. max-voi = @@ -138,7 +138,7 @@ max-cap = # "v_desc", "v_asc": volume, descending / ascending. # "ρ_desc", "ρ_asc": rho, descending / ascending. -order-by = +order-by = # limit [int]: number of results (max 50). limit = diff --git a/tests/openbb_terminal/stocks/options/ini/template.ini b/tests/openbb_terminal/stocks/options/ini/template.ini deleted file mode 100644 index ab73c0c59fc..00000000000 --- a/tests/openbb_terminal/stocks/options/ini/template.ini +++ /dev/null @@ -1,179 +0,0 @@ -# Author of preset: OpenBB Terminal -# Description: This is just a sample. The user that adds the preset can add a description for what type of stocks these filters are being used. -[FILTER] - -# tickers [string]: a list of space or comma separated tickers to restrict or exclude them from the query. -# E.g. "GME" or for multiples "AMC","BB","GME". -tickers = - -# exclude [true|false]: if true, then tickers are excluded. If false, the search is restricted to these tickers. -exclude = - -# min-diff [int]: minimum difference in percentage between strike and stock price. -min-diff = - -# max-diff [int]: maximum difference in percentage between strike and stock price. -max-diff = - -# itm [bool]: select in the money options. -itm = true - -# otm [bool]: select out of the money options. -otm = true - -# min-ask-bid [float]: minimum spread between bid and ask. -min-ask-bid = - -# max-ask-bid [float]: maximum spread between bid and ask. -max-ask-bid = - -# min-exp [int]: minimum days until expiration. -min-exp = - -# max-exp [int]: maximum days until expiration. -max-exp = - -# min-price [float]: minimum option premium. -min-price = - -# max-price [float]: maximum option premium. -max-price = - -#min-strike [float]: minimum option strike. -min-strike = - -#max-strike [float]: maximum option strike. -max-strike = - -# calls [true|false]: select call options. -calls = true - -# puts [true|false]: select put options. -puts = true - -# stock [true|false]: select normal stocks. -stock = - -# etf [true|false]: select etf options. -etf = - -# min-sto [float]: minimum option price / stock price ratio. -min-sto = - -# max-sto [float]: maximum option price / stock price ratio. -max-sto = - -# min-yield [float]: minimum premium / strike price ratio. -min-yield = - -# max-yield [float]: maximum premium / strike price ratio. -max-yield = - -# min-myield [float]: minimum yield per month until expiration date. -min-myield = - -# max-myield [float]: maximum yield per month until expiration date. -max-myield = - -# min-delta [float]: minimum delta greek. -min-delta = - -# max-delta [float]: maximum delta greek. -max-delta = - -# min-gamma [float]: minimum gamma greek. -min-gamma = - -# max-gamma [float]: maximum gamma greek. -max-gamma = - -# min-theta [float]: minimum theta greek. -min-theta = - -# max-theta [float]: maximum theta greek. -max-theta = - -# min-vega [float]: minimum vega greek. -min-vega = - -# max-vega [float]: maximum vega greek. -max-vega = - -#min-iv [float]: minimum implied volatility. -min-iv = - -#max-iv [float]: maximum implied volatility. -max-iv = - -#min-oi [float]: minimum open interest. -min-oi = - -#max-oi[float]: maximum open interest -max-oi = - -#min-volume [float]: minimum volume. -min-volume = - -#max-volume [float]: maximum volume. -max-volume = - -#min-voi [float]: minimum volume / oi ratio. -min-voi = - -#max-voi [float]: maximum volume / oi ratio. -max-voi = - -# min-cap [float]: minimum market capitalization (in billions USD). -min-cap = - -# max-cap [float]: maximum market capitalization (in billions USD). -max-cap = - -# order-by [default: e_desc]: how to order results, possible values: -# e_desc, e_asc: expiration, descending / ascending. -# iv_desc, iv_asc: implied volatility, descending / ascending. -# lp_desc, lp_asc: lastprice, descending / ascending. -# md_desc, md_asc: current stock price, descending / ascending. -order-by = - -# limit [int]: number of results (max 50). -limit = - -# active [true|false]: if set to true, restricts to options for which volume, open interest, ask, and bid are all > 0. -active = - -# [float|int] deviation from the 20 day average -min-price-20d = -max-price-20d = -min-volume-20d = -max-volume-20d = -min-iv-20d = -max-iv-20d = -min-delta-20d = -max-delta-20d = -min-gamma-20d = -max-gamma-20d = -min-theta-20d = -max-theta-20d = -min-vega-20d = -max-vega-20d = -min-rho-20d = -max-rho-20d = - -# [float|int] deviation from the 100 day average -min-price-100d = -max-price-100d = -min-volume-100d = -max-volume-100d = -min-iv-100d = -max-iv-100d = -min-delta-100d = -max-delta-100d = -min-gamma-100d = -max-gamma-100d = -min-theta-100d = -max-theta-100d = -min-vega-100d = -max-vega-100d = -min-rho-100d = -max-rho-100d = diff --git a/website/content/terminal/usage/guides/data.md b/website/content/terminal/usage/guides/data.md index 76800f9f1bc..37c53680b54 100644 --- a/website/content/terminal/usage/guides/data.md +++ b/website/content/terminal/usage/guides/data.md @@ -30,7 +30,7 @@ This folder contains all things user-created. For example: ## Exporting Files -Within many of the functionalities, we offer the capability to export to Excel (xlsx and csv) or JSON. This can be demonstrated with the `--export` argument, e.g. if you wish to export to `xlsx` you would add `--export xlsx`. +Within many of the functionalities, we offer the capability to export to Excel (xlsx and csv) or JSON. This can be demonstrated with the `--export` argument, e.g. if you wish to export to `xlsx` you would add `--export xlsx`. For example, if you wish to download market data you can do so from the stocks menu with the following: diff --git a/website/controller_doc_classes.py b/website/controller_doc_classes.py index 3ee6254b322..2b820f453f1 100644 --- a/website/controller_doc_classes.py +++ b/website/controller_doc_classes.py @@ -14,8 +14,8 @@ import pandas as pd from pandas.tseries.holiday import USFederalHolidayCalendar import openbb_terminal -import openbb_terminal.config_terminal as cfg # noqa: F401 -from openbb_terminal.core.plots.backend import plots_backend +import openbb_terminal.config_terminal as cfg +from openbb_terminal.core.plots.backend import plots_backend # noqa: F401 from openbb_terminal.decorators import disable_check_api from openbb_terminal.helper_funcs import ( EXPORT_BOTH_RAW_DATA_AND_FIGURES, @@ -28,10 +28,8 @@ from openbb_terminal.rich_config import console from openbb_terminal.sdk import openbb from openbb_terminal.stocks.comparison_analysis import finviz_compare_model -cfg.start_required_configurations() disable_check_api() -plots_backend().start() -plots_backend().isatty = True + CRYPTO_DATA = openbb.crypto.load("BTC", to_symbol="usd", source="YahooFinance") ETF_DATA = openbb.etf.load("SPY") @@ -513,6 +511,9 @@ if __name__ == "__main__": controller_doc = load_controllers.get_controller_doc(loaded) controller_doc.get_all_command_parsers() if run_image_exports: + cfg.setup_config_terminal() + plots_backend().start() + plots_backend().isatty = True controller_doc.run_image_exports() except KeyboardInterrupt: sys.exit(0) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 18fef89ceed..1be81d021ce 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -34,8 +34,8 @@ const config = { { redirects: [ { - from: "/terminal/guides/intros/forecasting", - to: "/terminal/guides/intros/forecast", + from: "/terminal/usage/intros/forecasting", + to: "/terminal/usage/intros/forecast", }, ], },