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

Fix a bunch #1852

Merged
merged 5 commits into from
May 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ def display_most_shorted(num_stocks: int, export: str):
show_index=False,
title="Most shorted stocks"
)
console.print("")

export_data(
export,
Expand Down
4 changes: 2 additions & 2 deletions openbb_terminal/alternative/alt_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def __init__(self, queue: List[str] = None):
def print_help(self):
"""Print help"""
help_text = """[menu]
> covid COVID menu, e.g.: cases, deaths, rates
> oss Open Source menu, e.g.: star history, repos information[/menu]
> covid COVID menu, e.g.: cases, deaths, rates
> oss Open Source menu, e.g.: star history, repos information[/menu]
"""
console.print(text=help_text, menu="Alternative")

Expand Down
3 changes: 0 additions & 3 deletions openbb_terminal/alternative/covid/covid_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def display_covid_ov(
index_name="Date",
title=f"[bold]{country} COVID Numbers[/bold]",
)
console.print("")

if export:
export_data(export, os.path.dirname(os.path.abspath(__file__)), "ov", ov)
Expand Down Expand Up @@ -172,7 +171,6 @@ def display_covid_stat(
index_name="Date",
title=f"[bold]{country} COVID {stat}[/bold]",
)
console.print("")

export_data(export, os.path.dirname(os.path.abspath(__file__)), stat, data)

Expand Down Expand Up @@ -209,7 +207,6 @@ def display_country_slopes(
index_name="Country",
title=f"[bold]{('Highest','Lowest')[ascend]} Sloping Cases[/bold] (Cases/Day)",
)
console.print("")

export_data(
export,
Expand Down
2 changes: 0 additions & 2 deletions openbb_terminal/alternative/oss/github_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from openbb_terminal.cryptocurrency.dataframe_helpers import (
lambda_long_number_format_with_type_check,
)
from openbb_terminal.rich_config import console

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -140,7 +139,6 @@ def display_repo_summary(repo: str, export: str = "") -> None:
print_rich_table(
df, headers=list(df.columns), show_index=False, title="Repo summary"
)
console.print("")

export_data(
export,
Expand Down
1 change: 0 additions & 1 deletion openbb_terminal/alternative/oss/runa_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ def display_rossindex(
show_index=False,
title="ROSS Index - the fastest-growing open-source startups",
)
console.print("")

export_data(
export,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ def display_sentiment_analysis(
show_index=True,
)

console.print("")
export_data(
export, os.path.dirname(os.path.abspath(__file__)), "headlines", sentiment
)
4 changes: 2 additions & 2 deletions openbb_terminal/common/behavioural_analysis/google_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def display_queries(ticker: str, num: int = 5, export: str = ""):
headers=list(df_related_queries.columns),
title=f"Top {ticker}'s related queries",
)
console.print("")

export_data(export, os.path.dirname(os.path.abspath(__file__)), "queries", df)


Expand All @@ -254,5 +254,5 @@ def display_rise(ticker: str, num: int, export: str = ""):
headers=list(df_related_queries.columns),
title=f"Top rising {ticker}'s related queries",
)
console.print("")

export_data(export, os.path.dirname(os.path.abspath(__file__)), "rise", df)
4 changes: 1 addition & 3 deletions openbb_terminal/common/behavioural_analysis/reddit_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def print_and_record_reddit_post(
print_rich_table(
df, headers=list(df.columns), show_index=False, title="Reddit Submission"
)
console.print("\n")


@log_start_end(log=logger)
Expand Down Expand Up @@ -166,12 +165,11 @@ def display_popular_tickers(
popular_tickers_df,
headers=list(popular_tickers_df.columns),
show_index=False,
title=f"\nThe following TOP {n_top} tickers have been mentioned:",
title=f"The following TOP {n_top} tickers have been mentioned",
)
else:
console.print("No tickers found")

console.print("")
export_data(
export,
os.path.dirname(os.path.abspath(__file__)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def display_trending():
show_index=False,
title="Trending Stocks",
)
console.print("")


@log_start_end(log=logger)
Expand Down
3 changes: 1 addition & 2 deletions openbb_terminal/common/prediction_techniques/arima_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,10 @@ def display_arima(
title="ARIMA Model",
)

console.print("")
print_prediction_kpis(df_pred["Real"].values, df_pred["Prediction"].values)

else:
# Print prediction data
print_pretty_prediction(df_pred, values.values[-1])

export_data(export, os.path.dirname(os.path.abspath(__file__)), "arima")
console.print("")
4 changes: 2 additions & 2 deletions openbb_terminal/common/prediction_techniques/pred_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def print_pretty_prediction(df_pred: pd.DataFrame, last_price: float):
index_name="Datetime",
headers=["Prediction"],
floatfmt=".2f",
title=f"Actual price: [yellow]{last_price:.2f} $[/yellow]\n",
title=f"Actual price: [yellow]{last_price:.2f} $[/yellow]",
)

else:
Expand All @@ -579,7 +579,7 @@ def print_pretty_prediction(df_pred: pd.DataFrame, last_price: float):
print_rich_table(
df_pred,
show_index=True,
title=f"Actual price: [yellow]{last_price:.2f} $[/yellow]\n",
title=f"Actual price: [yellow]{last_price:.2f} $[/yellow]",
index_name="Datetime",
headers=["Prediction"],
floatfmt=".2f",
Expand Down
9 changes: 2 additions & 7 deletions openbb_terminal/common/quantitative_analysis/qa_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def display_summary(df: pd.DataFrame, export: str):
show_index=True,
title="[bold]Summary Statistics[/bold]",
)
console.print("")

export_data(
export,
os.path.dirname(os.path.abspath(__file__)).replace("common", "stocks"),
Expand Down Expand Up @@ -785,7 +785,6 @@ def display_normality(df: pd.DataFrame, target: str, export: str = ""):
floatfmt=".4f",
title="[bold]Normality Statistics[/bold]",
)
console.print("")

export_data(
export,
Expand Down Expand Up @@ -823,7 +822,7 @@ def display_unitroot(
title="[bold]Unit Root Calculation[/bold]",
floatfmt=".4f",
)
console.print("")

export_data(
export,
os.path.dirname(os.path.abspath(__file__)).replace("common", "stocks"),
Expand Down Expand Up @@ -875,8 +874,6 @@ def display_raw(
floatfmt=".3f",
)

console.print("")


@log_start_end(log=logger)
def display_line(
Expand Down Expand Up @@ -1047,7 +1044,6 @@ def display_var(
title=f"[bold]{ticker}{str_title}Value at Risk[/bold]",
floatfmt=".4f",
)
console.print("")


def display_es(
Expand Down Expand Up @@ -1109,7 +1105,6 @@ def display_es(
title=f"[bold]{ticker}{str_title}Expected Shortfall[/bold]",
floatfmt=".4f",
)
console.print("")


def display_sharpe(data: pd.DataFrame, rfr: float, window: float):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
is_intraday,
is_valid_axes_count,
)
from openbb_terminal.rich_config import console

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -123,7 +122,6 @@ def fibonacci_retracement(
show_index=False,
title="Fibonacci retracement levels",
)
console.print("")

export_data(
export,
Expand Down
30 changes: 15 additions & 15 deletions openbb_terminal/cryptocurrency/crypto_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,26 +106,26 @@ def print_help(self):
has_ticker_start = "" if self.coin else "[unvl]"
has_ticker_end = "" if self.coin else "[/unvl]"
help_text = f"""[cmds]
load load a specific cryptocurrency for analysis
find find coins[/cmds]
load load a specific cryptocurrency for analysis
find find coins[/cmds]

[param]Coin: [/param]{self.coin}
[param]Source: [/param]{source_txt}
[cmds]
headlines crypto sentiment from 15+ major news headlines [src][Finbrain][/src]{has_ticker_start}
chart view a candle chart for a specific cryptocurrency
prt potential returns tool - check how much upside if ETH reaches BTC market cap{has_ticker_end}
headlines crypto sentiment from 15+ major news headlines [src][Finbrain][/src]{has_ticker_start}
chart view a candle chart for a specific cryptocurrency
prt potential returns tool - check how much upside if ETH reaches BTC market cap{has_ticker_end}
[/cmds][menu]
> disc discover trending cryptocurrencies, e.g.: top gainers, losers, top sentiment
> ov overview of the cryptocurrencies, e.g.: market cap, DeFi, latest news, top exchanges, stables
> onchain information on different blockchains, e.g.: eth gas fees, whale alerts, DEXes info
> defi decentralized finance information, e.g.: dpi, llama, tvl, lending, borrow, funding
> tools explore different tools e.g.: apytoapr, il
> nft non-fungible tokens, e.g.: today drops{has_ticker_start}
> dd due-diligence for loaded coin, e.g.: coin information, social media, market stats
> ta technical analysis for loaded coin, e.g.: ema, macd, rsi, adx, bbands, obv
> pred prediction techniques, e.g.: regression, arima, rnn, lstm, conv1d, monte carlo
> qa quantitative analysis e.g.: decompose, cusum, residuals analysis[/menu]
> disc discover trending cryptocurrencies, e.g.: top gainers, losers, top sentiment
> ov overview of the cryptocurrencies, e.g.: market cap, DeFi, latest news, top exchanges, stables
> onchain information on different blockchains, e.g.: eth gas fees, whale alerts, DEXes info
> defi decentralized finance information, e.g.: dpi, llama, tvl, lending, borrow, funding
> tools explore different tools e.g.: apytoapr, il
> nft non-fungible tokens, e.g.: today drops{has_ticker_start}
> dd due-diligence for loaded coin, e.g.: coin information, social media, market stats
> ta technical analysis for loaded coin, e.g.: ema, macd, rsi, adx, bbands, obv
> pred prediction techniques, e.g.: regression, arima, rnn, lstm, conv1d, monte carlo
> qa quantitative analysis e.g.: decompose, cusum, residuals analysis[/menu]
{has_ticker_end}
"""
console.print(text=help_text, menu="Cryptocurrency")
Expand Down
1 change: 0 additions & 1 deletion openbb_terminal/cryptocurrency/cryptocurrency_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,6 @@ def find(source: str, coin: str, key: str, top: int, export: str) -> None:
print_rich_table(
df, headers=list(df.columns), show_index=False, title="Similar Coins"
)
console.print("")

export_data(
export,
Expand Down
2 changes: 0 additions & 2 deletions openbb_terminal/cryptocurrency/defi/coindix_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
lambda_long_number_format,
print_rich_table,
)
from openbb_terminal.rich_config import console

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -87,7 +86,6 @@ def display_defi_vaults(
show_index=False,
title="Top DeFi Vaults",
)
console.print("")

export_data(
export,
Expand Down
50 changes: 25 additions & 25 deletions openbb_terminal/cryptocurrency/defi/defi_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,37 +107,37 @@ def __init__(self, queue: List[str] = None):
def print_help(self):
"""Print help"""
help_text = """[cmds]
newsletter Recent DeFi related newsletters [src][Substack][/src]
dpi DeFi protocols listed on DefiPulse [src][Defipulse][/src]
funding Funding rates - current or last 30 days average [src][Defirate][/src]
borrow DeFi borrow rates - current or last 30 days average [src][Defirate][/src]
lending DeFi ending rates - current or last 30 days average [src][Defirate][/src]
vaults Top DeFi Vaults on different blockchains [src][Coindix][/src]
newsletter Recent DeFi related newsletters [src][Substack][/src]
dpi DeFi protocols listed on DefiPulse [src][Defipulse][/src]
funding Funding rates - current or last 30 days average [src][Defirate][/src]
borrow DeFi borrow rates - current or last 30 days average [src][Defirate][/src]
lending DeFi ending rates - current or last 30 days average [src][Defirate][/src]
vaults Top DeFi Vaults on different blockchains [src][Coindix][/src]
[src][The Graph][/src] [info]Uniswap[/info]
tokens Tokens trade-able on Uniswap
stats Base statistics about Uniswap
pairs Recently added pairs on Uniswap
pools Pools by volume on Uniswap
swaps Recent swaps done on Uniswap
tokens Tokens trade-able on Uniswap
stats Base statistics about Uniswap
pairs Recently added pairs on Uniswap
pools Pools by volume on Uniswap
swaps Recent swaps done on Uniswap
[src][Defi Llama][/src]
ldapps Lists dApps
gdapps Displays top DeFi dApps grouped by chain
stvl Displays historical values of the total sum of TVLs from all dApps
dtvl Displays historical total value locked (TVL) by dApp
ldapps Lists dApps
gdapps Displays top DeFi dApps grouped by chain
stvl Displays historical values of the total sum of TVLs from all dApps
dtvl Displays historical total value locked (TVL) by dApp
[src][Terra Engineer][/src]
aterra Displays 30-day history of specified asset in terra address
ayr Displays 30-day history of anchor yield reserve
aterra Displays 30-day history of specified asset in terra address
ayr Displays 30-day history of anchor yield reserve
[src][Terra FCD][/src]
sinfo Displays staking info for provided terra account address
validators Displays information about terra blockchain validators
govp Displays terra blockchain governance proposals list
gacc Displays terra blockchain account growth history
sratio Displays terra blockchain staking ratio history
sreturn Displays terra blockchain staking returns history
sinfo Displays staking info for provided terra account address
validators Displays information about terra blockchain validators
govp Displays terra blockchain governance proposals list
gacc Displays terra blockchain account growth history
sratio Displays terra blockchain staking ratio history
sreturn Displays terra blockchain staking returns history
[src][Smartstake][/src]
lcsc Displays Luna circulating supply changes
lcsc Displays Luna circulating supply changes
[src][CryptoSaurio][/src]
anchor Display anchor earnings data[/cmds]
anchor Display anchor earnings data[/cmds]
"""
console.print(text=help_text, menu="Cryptocurrency - Decentralized Finance")

Expand Down
2 changes: 0 additions & 2 deletions openbb_terminal/cryptocurrency/defi/defipulse_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from openbb_terminal.cryptocurrency.defi import defipulse_model
from openbb_terminal.decorators import log_start_end
from openbb_terminal.helper_funcs import export_data, print_rich_table
from openbb_terminal.rich_config import console

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -40,7 +39,6 @@ def display_defipulse(top: int, sortby: str, descend: bool, export: str = "") ->
show_index=False,
title="DeFi Pulse Crypto Protocols",
)
console.print("")

export_data(
export,
Expand Down
4 changes: 0 additions & 4 deletions openbb_terminal/cryptocurrency/defi/defirate_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from openbb_terminal.cryptocurrency.defi import defirate_model
from openbb_terminal.decorators import log_start_end
from openbb_terminal.helper_funcs import export_data, print_rich_table
from openbb_terminal.rich_config import console

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -36,7 +35,6 @@ def display_funding_rates(top: int, current: bool = True, export: str = "") -> N
headers=list(df.columns),
show_index=False,
)
console.print("")

export_data(
export,
Expand Down Expand Up @@ -72,7 +70,6 @@ def display_lending_rates(top: int, current: bool = True, export: str = "") -> N
show_index=False,
title="Top DeFi Lendings",
)
console.print("")

export_data(
export,
Expand Down Expand Up @@ -109,7 +106,6 @@ def display_borrow_rates(top: int, current: bool = True, export: str = "") -> No
show_index=False,
title="DeFi Borrow Rates",
)
console.print("")

export_data(
export,
Expand Down
Loading