Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration test fix for crypto disc #2625

Merged
merged 9 commits into from
Sep 28, 2022
30 changes: 15 additions & 15 deletions openbb_terminal/cryptocurrency/discovery/discovery_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ def __init__(self, queue: List[str] = None):

if session and obbff.USE_PROMPT_TOOLKIT:
choices: dict = {c: {} for c in self.controller_choices}
choices["cggainers"]["-p"] = {c: {} for c in pycoingecko_model.API_PERIODS}
choices["cggainers"]["-i"] = {c: {} for c in pycoingecko_model.API_PERIODS}
choices["cggainers"]["--sort"] = {
c: {} for c in pycoingecko_model.GAINERS_LOSERS_COLUMNS
}
choices["cglosers"]["--sort"] = {
c: {} for c in pycoingecko_model.GAINERS_LOSERS_COLUMNS
}
choices["cglosers"]["-p"] = {c: {} for c in pycoingecko_model.API_PERIODS}
choices["cglosers"]["-i"] = {c: {} for c in pycoingecko_model.API_PERIODS}
choices["cgtop"] = {
c: None for c in pycoingecko_model.get_categories_keys()
}
Expand Down Expand Up @@ -154,7 +154,7 @@ def call_cgtop(self, other_args):
pycoingecko_view.display_coins(
sortby=" ".join(ns_parser.sortby),
category=ns_parser.category,
top=ns_parser.limit,
limit=ns_parser.limit,
export=ns_parser.export,
)

Expand Down Expand Up @@ -328,16 +328,16 @@ def call_cggainers(self, other_args):
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description="""
Shows Largest Gainers - coins which gain the most in given period.
You can use parameter --period to set which timeframe are you interested in: {14d,1h,1y,200d,24h,30d,7d}
You can use parameter --interval to set which timeframe are you interested in: {14d,1h,1y,200d,24h,30d,7d}
You can look on only N number of records with --limit,
You can sort by {Symbol,Name,Price [$],Market Cap,Market Cap Rank,Volume [$]} with --sort.
""",
)

parser.add_argument(
"-p",
"--period",
dest="period",
"-i",
"--interval",
dest="interval",
type=str,
help="time period, one from {14d,1h,1y,200d,24h,30d,7d}",
default="1h",
Expand Down Expand Up @@ -367,8 +367,8 @@ def call_cggainers(self, other_args):
)
if ns_parser:
pycoingecko_view.display_gainers(
period=ns_parser.period,
top=ns_parser.limit,
interval=ns_parser.interval,
limit=ns_parser.limit,
export=ns_parser.export,
sortby=" ".join(ns_parser.sortby),
)
Expand All @@ -382,16 +382,16 @@ def call_cglosers(self, other_args):
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
description="""
Shows Largest Losers - coins which price dropped the most in given period
You can use parameter --period to set which timeframe are you interested in: {14d,1h,1y,200d,24h,30d,7d}
You can use parameter --interval to set which timeframe are you interested in: {14d,1h,1y,200d,24h,30d,7d}
You can look on only N number of records with --limit,
You can sort by {Symbol,Name,Price [$],Market Cap,Market Cap Rank,Volume [$]} with --sort.
""",
)

parser.add_argument(
"-p",
"--period",
dest="period",
"-i",
"--interval",
dest="interval",
type=str,
help="time period, one from {14d,1h,1y,200d,24h,30d,7d}",
default="1h",
Expand Down Expand Up @@ -422,8 +422,8 @@ def call_cglosers(self, other_args):

if ns_parser:
pycoingecko_view.display_losers(
period=ns_parser.period,
top=ns_parser.limit,
interval=ns_parser.interval,
limit=ns_parser.limit,
export=ns_parser.export,
sortby=" ".join(ns_parser.sortby),
)
Expand Down