From 04cec47f13076e2e8711de0fd9b2400e8dd4934d Mon Sep 17 00:00:00 2001 From: colin99d Date: Wed, 15 Mar 2023 09:43:45 -0400 Subject: [PATCH 1/3] Updated reqs --- openbb_terminal/economy/economy_controller.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openbb_terminal/economy/economy_controller.py b/openbb_terminal/economy/economy_controller.py index cc325d3545a2..c9ffabbc294b 100644 --- a/openbb_terminal/economy/economy_controller.py +++ b/openbb_terminal/economy/economy_controller.py @@ -679,6 +679,9 @@ def call_fred(self, other_args: List[str]): dest="parameter", default="", help="Series ID of the Macro Economic data from FRED", + required="-h" not in other_args + and "-q" not in other_args + and "--query" not in other_args, ) parser.add_argument( "-s", @@ -704,6 +707,9 @@ def call_fred(self, other_args: List[str]): nargs="+", dest="query", help="Query the FRED database to obtain Series IDs given the query search term.", + required="-h" not in other_args + and "-p" not in other_args + and "--parameter" not in other_args, ) if other_args and "-" not in other_args[0][0]: other_args.insert(0, "-p") From 60fb2fb607b7edd33ea37555b3f6b74498918410 Mon Sep 17 00:00:00 2001 From: colin99d Date: Wed, 15 Mar 2023 09:46:47 -0400 Subject: [PATCH 2/3] Updated reqs --- openbb_terminal/economy/economy_controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openbb_terminal/economy/economy_controller.py b/openbb_terminal/economy/economy_controller.py index c9ffabbc294b..533cecdd0e01 100644 --- a/openbb_terminal/economy/economy_controller.py +++ b/openbb_terminal/economy/economy_controller.py @@ -680,6 +680,7 @@ def call_fred(self, other_args: List[str]): default="", help="Series ID of the Macro Economic data from FRED", required="-h" not in other_args + and "--help" not in other_args and "-q" not in other_args and "--query" not in other_args, ) @@ -708,6 +709,7 @@ def call_fred(self, other_args: List[str]): dest="query", help="Query the FRED database to obtain Series IDs given the query search term.", required="-h" not in other_args + and "--help" not in other_args and "-p" not in other_args and "--parameter" not in other_args, ) From 9189442a8aeb22ecd08bf13412cee099dcfb5a36 Mon Sep 17 00:00:00 2001 From: James Maslek Date: Wed, 15 Mar 2023 16:15:09 -0400 Subject: [PATCH 3/3] Fix test --- tests/openbb_terminal/economy/test_economy_controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/openbb_terminal/economy/test_economy_controller.py b/tests/openbb_terminal/economy/test_economy_controller.py index 1089fc01ee3a..930d8734bbdd 100644 --- a/tests/openbb_terminal/economy/test_economy_controller.py +++ b/tests/openbb_terminal/economy/test_economy_controller.py @@ -835,7 +835,7 @@ def test_call_fred_query(mocker): "other_args, mocked_func, called_args, called_kwargs", [ ( - ["--parameter=dgs2,dgs5"], + ["--parameter", "dgs2,dgs5"], "fred_view.display_fred_series", [], dict( @@ -850,7 +850,7 @@ def test_call_fred_query(mocker): ), ), ( - ["--parameter=DgS2,dgs5", "--export=csv", "--raw"], + ["--parameter", "DgS2,dgs5", "--export=csv", "--raw"], "fred_view.display_fred_series", [], dict( @@ -865,7 +865,7 @@ def test_call_fred_query(mocker): ), ), ( - ["--parameter=DgS2,dgs5", "--export=csv", "--start=2022-10-10"], + ["--parameter", "DgS2,dgs5", "--export=csv", "--start=2022-10-10"], "fred_view.display_fred_series", [], dict(