From 0f01b8437d143b694c839f83efa0f894cd32b810 Mon Sep 17 00:00:00 2001 From: James Simmons <53658028+simmonsj330@users.noreply.github.com> Date: Fri, 12 Aug 2022 13:44:27 -0400 Subject: [PATCH] Release 1.7.0 (#2300) * Version Bump * Changing pred install for intel workflow * Disabling prediction menu * Fixing codesign paths * Changing disk location for detach * Making sure to not pull from main * changing windows build * Hopefully final change for the release * codesign fix * fixing package stuff * Fixing feature flags and env * Adding comments about feature flags * Changing windows build back Co-authored-by: Chavithra --- .github/workflows/intel_macos_build.yml | 4 +- build/nsis/setup.nsi | 2 +- build/pyinstaller/.env | 2 +- .../cryptocurrency/crypto_controller.py | 18 ++++--- openbb_terminal/economy/economy_controller.py | 51 ++++++++++++------- openbb_terminal/etf/etf_controller.py | 18 ++++--- openbb_terminal/feature_flags.py | 2 +- openbb_terminal/forex/forex_controller.py | 18 ++++--- openbb_terminal/stocks/stocks_controller.py | 18 ++++--- pyproject.toml | 2 +- 10 files changed, 85 insertions(+), 50 deletions(-) diff --git a/.github/workflows/intel_macos_build.yml b/.github/workflows/intel_macos_build.yml index 8062d07966a1..0f2991019d47 100644 --- a/.github/workflows/intel_macos_build.yml +++ b/.github/workflows/intel_macos_build.yml @@ -15,8 +15,6 @@ jobs: # Checkout repository main branch. this allows for the commit hashes to line up - name: Checkout uses: actions/checkout@v2.4.2 - with: - ref: 'main' - name: Git Log run: git log # Install create-dmg @@ -162,7 +160,7 @@ jobs: ls cp -R OpenBB\ Terminal ~/Desktop - name: Unmount DMG - run: hdiutil detach /dev/disk3s2 + run: hdiutil detach /dev/disk4 - name: Run Integration Tests run: /Users/ec2-user/Desktop/OpenBB\ Terminal/.OpenBB/OpenBBTerminal /Users/ec2-user/actions-runner/_work/OpenBBTerminal/OpenBBTerminal/scripts/*.openbb -t - name: Remove OpenBB Folder diff --git a/build/nsis/setup.nsi b/build/nsis/setup.nsi index 0ce5eb47e1c1..7e2d6aa0d230 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 "1.6.0" + !define VERSION "1.7.0" !define SLUG "${NAME} v${VERSION}" ;-------------------------------- diff --git a/build/pyinstaller/.env b/build/pyinstaller/.env index 047a8413d36d..e7a4a78eeaf6 100644 --- a/build/pyinstaller/.env +++ b/build/pyinstaller/.env @@ -1,6 +1,6 @@ OPENBB_PACKAGED_APPLICATION=true OPENBB_LOGGING_COMMIT_HASH='sha:dd768556' -OPENBB_ENABLE_PREDICT=true +OPENBB_ENABLE_PREDICT=false OPENBB_ENABLE_CHECK_API=true OPENBB_ENABLE_THOUGHTS_DAY=false OPENBB_REMEMBER_CONTEXTS=true diff --git a/openbb_terminal/cryptocurrency/crypto_controller.py b/openbb_terminal/cryptocurrency/crypto_controller.py index ebe2a5f82dd7..6c94e349e9a5 100644 --- a/openbb_terminal/cryptocurrency/crypto_controller.py +++ b/openbb_terminal/cryptocurrency/crypto_controller.py @@ -342,7 +342,18 @@ def call_qa(self, _): @log_start_end(log=logger) def call_pred(self, _): """Process pred command""" - if obbff.ENABLE_PREDICT: + # IMPORTANT: 8/11/22 prediction was discontinued on the installer packages + # because forecasting in coming out soon. + # This if statement disallows installer package users from using 'pred' + # even if they turn on the OPENBB_ENABLE_PREDICT feature flag to true + # however it does not prevent users who clone the repo from using it + # if they have ENABLE_PREDICT set to true. + if obbff.PACKAGED_APPLICATION or not obbff.ENABLE_PREDICT: + console.print( + "Predict is disabled. Forecasting coming soon!", + "\n", + ) + else: if self.symbol: try: from openbb_terminal.cryptocurrency.prediction_techniques import ( @@ -366,11 +377,6 @@ def call_pred(self, _): console.print( "No coin selected. Use 'load' to load the coin you want to look at.\n" ) - else: - console.print( - "Predict is disabled. Check ENABLE_PREDICT flag on feature_flags.py", - "\n", - ) @log_start_end(log=logger) def call_onchain(self, _): diff --git a/openbb_terminal/economy/economy_controller.py b/openbb_terminal/economy/economy_controller.py index 8f68d68e2c07..7c185fc35c27 100644 --- a/openbb_terminal/economy/economy_controller.py +++ b/openbb_terminal/economy/economy_controller.py @@ -1428,30 +1428,43 @@ def call_spectrum(self, other_args: List[str]): @log_start_end(log=logger) def call_pred(self, _): + """Process pred command""" - if not self.DATASETS: + # IMPORTANT: 8/11/22 prediction was discontinued on the installer packages + # because forecasting in coming out soon. + # This if statement disallows installer package users from using 'pred' + # even if they turn on the OPENBB_ENABLE_PREDICT feature flag to true + # however it does not prevent users who clone the repo from using it + # if they have ENABLE_PREDICT set to true. + if obbff.PACKAGED_APPLICATION or not obbff.ENABLE_PREDICT: console.print( - "There is no data stored yet. Please use either the 'macro', 'fred', 'index' and/or " - "'treasury' command in combination with the -st argument to be able to plot data.\n" + "Predict is disabled. Forecasting coming soon!", + "\n", ) - return - - from openbb_terminal.economy.prediction.pred_controller import ( - PredictionTechniquesController, - ) + else: + if not self.DATASETS: + console.print( + "There is no data stored yet. Please use either the 'macro', 'fred', 'index' and/or " + "'treasury' command in combination with the -st argument to be able to plot data.\n" + ) + return - data: Dict = {} - for source, _ in self.DATASETS.items(): - if not self.DATASETS[source].empty: - if len(self.DATASETS[source].columns) == 1: - data[self.DATASETS[source].columns[0]] = self.DATASETS[source] - else: - for col in list(self.DATASETS[source].columns): - data[col] = self.DATASETS[source][col].to_frame() + from openbb_terminal.economy.prediction.pred_controller import ( + PredictionTechniquesController, + ) - self.queue = self.load_class( - PredictionTechniquesController, self.DATASETS, self.queue - ) + data: Dict = {} + for source, _ in self.DATASETS.items(): + if not self.DATASETS[source].empty: + if len(self.DATASETS[source].columns) == 1: + data[self.DATASETS[source].columns[0]] = self.DATASETS[source] + else: + for col in list(self.DATASETS[source].columns): + data[col] = self.DATASETS[source][col].to_frame() + + self.queue = self.load_class( + PredictionTechniquesController, self.DATASETS, self.queue + ) @log_start_end(log=logger) def call_qa(self, _): diff --git a/openbb_terminal/etf/etf_controller.py b/openbb_terminal/etf/etf_controller.py index 33832142d77d..dc064e769022 100644 --- a/openbb_terminal/etf/etf_controller.py +++ b/openbb_terminal/etf/etf_controller.py @@ -648,7 +648,18 @@ def call_ta(self, _): @log_start_end(log=logger) def call_pred(self, _): """Process pred command""" - if obbff.ENABLE_PREDICT: + # IMPORTANT: 8/11/22 prediction was discontinued on the installer packages + # because forecasting in coming out soon. + # This if statement disallows installer package users from using 'pred' + # even if they turn on the OPENBB_ENABLE_PREDICT feature flag to true + # however it does not prevent users who clone the repo from using it + # if they have ENABLE_PREDICT set to true. + if obbff.PACKAGED_APPLICATION or not obbff.ENABLE_PREDICT: + console.print( + "Predict is disabled. Forecasting coming soon!", + "\n", + ) + else: if self.etf_name: try: from openbb_terminal.etf.prediction_techniques import ( @@ -675,11 +686,6 @@ def call_pred(self, _): ) else: console.print("Use 'load ' prior to this command!", "\n") - else: - console.print( - "Predict is disabled. Check ENABLE_PREDICT flag on feature_flags.py", - "\n", - ) @log_start_end(log=logger) def call_ca(self, _): diff --git a/openbb_terminal/feature_flags.py b/openbb_terminal/feature_flags.py index 35a05ba99fa0..4b23893fb56e 100644 --- a/openbb_terminal/feature_flags.py +++ b/openbb_terminal/feature_flags.py @@ -125,5 +125,5 @@ try: version = pkg_resources.get_distribution("OpenBBTerminal").version except Exception: - version = "1.6.0m" + version = "1.7.0m" VERSION = str(os.getenv("OPENBB_VERSION", version)) diff --git a/openbb_terminal/forex/forex_controller.py b/openbb_terminal/forex/forex_controller.py index e7eabb262cf0..1f266609b395 100644 --- a/openbb_terminal/forex/forex_controller.py +++ b/openbb_terminal/forex/forex_controller.py @@ -304,7 +304,18 @@ def call_ta(self, _): @log_start_end(log=logger) def call_pred(self, _): """Process pred command""" - if obbff.ENABLE_PREDICT: + # IMPORTANT: 8/11/22 prediction was discontinued on the installer packages + # because forecasting in coming out soon. + # This if statement disallows installer package users from using 'pred' + # even if they turn on the OPENBB_ENABLE_PREDICT feature flag to true + # however it does not prevent users who clone the repo from using it + # if they have ENABLE_PREDICT set to true. + if obbff.PACKAGED_APPLICATION or not obbff.ENABLE_PREDICT: + console.print( + "Predict is disabled. Forecasting coming soon!", + "\n", + ) + else: if self.from_symbol and self.to_symbol: if self.data.empty: console.print( @@ -332,11 +343,6 @@ def call_pred(self, _): ) else: console.print("No pair selected.\n") - else: - console.print( - "Predict is disabled. Check ENABLE_PREDICT flag on feature_flags.py", - "\n", - ) @log_start_end(log=logger) def call_qa(self, _): diff --git a/openbb_terminal/stocks/stocks_controller.py b/openbb_terminal/stocks/stocks_controller.py index 8e905bbacc3e..8ede2da72aa9 100644 --- a/openbb_terminal/stocks/stocks_controller.py +++ b/openbb_terminal/stocks/stocks_controller.py @@ -712,7 +712,18 @@ def call_qa(self, _): @log_start_end(log=logger) def call_pred(self, _): """Process pred command""" - if obbff.ENABLE_PREDICT: + # IMPORTANT: 8/11/22 prediction was discontinued on the installer packages + # because forecasting in coming out soon. + # This if statement disallows installer package users from using 'pred' + # even if they turn on the OPENBB_ENABLE_PREDICT feature flag to true + # however it does not prevent users who clone the repo from using it + # if they have ENABLE_PREDICT set to true. + if obbff.PACKAGED_APPLICATION or not obbff.ENABLE_PREDICT: + console.print( + "Predict is disabled. Forecasting coming soon!", + "\n", + ) + else: if self.ticker: if self.interval == "1440min": try: @@ -744,8 +755,3 @@ def call_pred(self, _): console.print("Load daily data to use this menu!", "\n") else: console.print("Use 'load ' prior to this command!", "\n") - else: - console.print( - "Predict is disabled. Check ENABLE_PREDICT flag on feature_flags.py", - "\n", - ) diff --git a/pyproject.toml b/pyproject.toml index efd99d546695..8744d6e3b628 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ # https://python-poetry.org/docs/dependency-specification/ [tool.poetry] name = "OpenBBTerminal" -version = "1.6.0" +version = "1.7.0" description = "" authors = ["Didier Rodrigues Lopes"] packages = [