From 69b121eb71379cc91b1887f499dc49b239f07bca Mon Sep 17 00:00:00 2001 From: James Maslek Date: Mon, 24 Jul 2023 09:57:20 -0400 Subject: [PATCH] Andrew reveiw after 9 months --- .../forecast/forecast_controller.py | 32 ++++++++++++++----- openbb_terminal/forecast/helpers.py | 2 +- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/openbb_terminal/forecast/forecast_controller.py b/openbb_terminal/forecast/forecast_controller.py index 630d8e39e47..b4386fa6e75 100644 --- a/openbb_terminal/forecast/forecast_controller.py +++ b/openbb_terminal/forecast/forecast_controller.py @@ -1039,7 +1039,9 @@ class ForecastController(BaseController): if ns_parser: # check proper file name is provided if not ns_parser.target_dataset: - console.print("[red]Please enter valid dataset.\n[/red]") + console.print( + "[red]Please select a valid dataset with the -d flag.\n[/red]" + ) return df = self.datasets[ns_parser.target_dataset] @@ -1079,13 +1081,17 @@ class ForecastController(BaseController): return if not ns_parser.values: - console.print("[red]Please enter valid dataset.\n[/red]") + console.print( + "[red]Please select a valid dataset with the -d flag.\n[/red]" + ) return values = [x.strip() for x in ns_parser.values.split(",")] target_df = values[0].split(".")[0] if target_df not in self.datasets: - console.print("[red]Please enter valid dataset.\n[/red]") + console.print( + "[red]Please select a valid dataset with the -d flag.\n[/red]" + ) return for value in values: @@ -1148,7 +1154,9 @@ class ForecastController(BaseController): return if not ns_parser.values: - console.print("[red]Please enter valid dataset.\n[/red]") + console.print( + "[red]Please select a valid dataset with the -d flag.\n[/red]" + ) return try: @@ -1191,7 +1199,9 @@ class ForecastController(BaseController): if ns_parser: # check proper file name is provided if not ns_parser.target_dataset: - console.print("[red]Please enter valid dataset.\n[/red]") + console.print( + "[red]Please select a valid dataset with the -d flag.\n[/red]" + ) return data = self.datasets[ns_parser.target_dataset] @@ -1311,7 +1321,9 @@ class ForecastController(BaseController): if ns_parser: # check proper file name is provided if not ns_parser.target_dataset: - console.print("[red]Please enter valid dataset.\n[/red]") + console.print( + "[red]Please select a valid dataset with the -d flag.\n[/red]" + ) return ( @@ -1412,7 +1424,9 @@ class ForecastController(BaseController): if ns_parser: # check proper file name is provided if not ns_parser.target_dataset: - console.print("[red]Please enter valid dataset.\n[/red]") + console.print( + "[red]Please select a valid dataset with the -d flag.\n[/red]" + ) return df = forecast_model.add_sto( @@ -1499,7 +1513,9 @@ class ForecastController(BaseController): if ns_parser: # check proper file name is provided if not ns_parser.target_dataset: - console.print("[red]Please enter valid dataset.\n[/red]") + console.print( + "[red]Please select a valid dataset with the -d flag.\n[/red]" + ) return self.datasets[ns_parser.target_dataset] = forecast_model.add_rsi( diff --git a/openbb_terminal/forecast/helpers.py b/openbb_terminal/forecast/helpers.py index 238b6b33f1a..7c5d4193963 100644 --- a/openbb_terminal/forecast/helpers.py +++ b/openbb_terminal/forecast/helpers.py @@ -1153,7 +1153,7 @@ def check_parser_input(parser: argparse.ArgumentParser, datasets, *args) -> bool if not hasattr(parser, "target_dataset"): return False if not parser.target_dataset: # type: ignore - console.print("[red]Please enter valid dataset.\n[/red]") + console.print("[red]Please select a valid dataset with the -d flag.\n[/red]") return False if "ignore_column" in args: return True