mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 13:01:38 +00:00
Andrew reveiw after 9 months
This commit is contained in:
committed by
Igor Radovanovic
parent
6a852c8be4
commit
69b121eb71
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user