diff options
author | James Simmons <53658028+simmonsj330@users.noreply.github.com> | 2022-12-16 13:31:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-16 13:31:37 -0500 |
commit | 6112658d462b0f6dce4959749ea4c3df38293894 (patch) | |
tree | 8e79a840d061433267d3012fe6adc093d6d47525 | |
parent | 4c3c87d11b89893213927e27c3b7edc7214d2a0e (diff) |
Pyinstaller Hook Fix For Forecast Report (#3746)
* trying to replace hook
* reports controller commenting out forecast disable
* removing astropy, tensorflow, and riskfolio
Co-authored-by: James Maslek <jmaslek11@gmail.com>
-rw-r--r-- | build/pyinstaller/hooks/pyi_rth_inspect.py (renamed from build/pyinstaller/hooks/hook-inspect.py) | 0 | ||||
-rw-r--r-- | build/pyinstaller/terminal.spec | 10 | ||||
-rw-r--r-- | openbb_terminal/reports/reports_controller.py | 9 |
3 files changed, 14 insertions, 5 deletions
diff --git a/build/pyinstaller/hooks/hook-inspect.py b/build/pyinstaller/hooks/pyi_rth_inspect.py index 718972baf50..718972baf50 100644 --- a/build/pyinstaller/hooks/hook-inspect.py +++ b/build/pyinstaller/hooks/pyi_rth_inspect.py diff --git a/build/pyinstaller/terminal.spec b/build/pyinstaller/terminal.spec index a7998b6f838..b2a7e54518c 100644 --- a/build/pyinstaller/terminal.spec +++ b/build/pyinstaller/terminal.spec @@ -1,6 +1,7 @@ # -*- mode: python ; coding: utf-8 -*- import os import pathlib +import subprocess from dotenv import set_key @@ -30,6 +31,14 @@ binary_to_remove = pathlib.Path( print("Removing ARM64 Binary: _scs_direct.cpython-39-darwin.so") binary_to_remove.unlink(missing_ok=True) +# Removing inspect hook +destination = pathlib.Path( + os.path.join(pathex, "pyinstaller/hooks/rthooks", "pyi_rth_inspect.py") +) +print("Replacing Pyinstaller Hook: pyi_rth_inspect.py") +source = "build/pyinstaller/hooks/pyi_rth_inspect.py" +subprocess.run(["cp", source, str(destination)], check=True) + # Get latest commit commit_hash = get_commit_hash() @@ -87,7 +96,6 @@ hidden_imports = [ "frozendict", "textwrap3", "pyEX", - "tensorflow", "feedparser", "pymongo", "bson", diff --git a/openbb_terminal/reports/reports_controller.py b/openbb_terminal/reports/reports_controller.py index d5710671f49..ef0092d230d 100644 --- a/openbb_terminal/reports/reports_controller.py +++ b/openbb_terminal/reports/reports_controller.py @@ -19,7 +19,8 @@ from openbb_terminal.decorators import log_start_end from openbb_terminal.menu import session from openbb_terminal.parent_classes import BaseController from openbb_terminal.rich_config import console, MenuText -from openbb_terminal.terminal_helper import is_packaged_application + +# from openbb_terminal.terminal_helper import is_packaged_application logger = logging.getLogger(__name__) @@ -144,9 +145,9 @@ class ReportController(BaseController): @log_start_end(log=logger) def call_forecast(self, other_args: List[str]): - if is_packaged_application(): - console.print("This report is disabled for the installed version") - return + # if is_packaged_application(): + # console.print("This report is disabled for the installed version") + # return try: import darts # pyright: reportMissingImports=false # noqa: F401, E501 #pylint: disable=import-outside-toplevel, unused-import |