mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-29 04:32:43 +00:00
integration test fix for crypto disc (#2625)
Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt> Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com>
This commit is contained in:
@@ -56,14 +56,14 @@ class DiscoveryController(BaseController):
|
||||
|
||||
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()
|
||||
}
|
||||
@@ -154,7 +154,7 @@ class DiscoveryController(BaseController):
|
||||
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,
|
||||
)
|
||||
|
||||
@@ -328,16 +328,16 @@ class DiscoveryController(BaseController):
|
||||
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",
|
||||
@@ -367,8 +367,8 @@ class DiscoveryController(BaseController):
|
||||
)
|
||||
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),
|
||||
)
|
||||
@@ -382,16 +382,16 @@ class DiscoveryController(BaseController):
|
||||
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",
|
||||
@@ -422,8 +422,8 @@ class DiscoveryController(BaseController):
|
||||
|
||||
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),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user