From 4c02dc2a66066045a83064d6fdcb3ee6c216f82e Mon Sep 17 00:00:00 2001 From: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com> Date: Mon, 6 Jun 2022 16:20:44 +0100 Subject: [PATCH] Fix multiple crypto bugs (#1903) * fix #1850 * fix #1831 * add extra check to Reddit API keys * ignore warning message to update praw api * improve OpenBB links * fix quick performance only on stocks class because I'm James bitch * fix quick performance only on stocks class because I'm James bitch * fix #1829 * fix #1821 * add messari to keys - fix #1819 * example of multiple oclumns to check on options/chains * minor improvement in xlabel re. #1814 * remove repeated command * fix #1698 * fix line too long * fix #1814 fr now * fix tests * Fix multiple bugs * Disable false positive pylint in some crypto models * Fix website not building because of expo command removed Co-authored-by: DidierRLopes Co-authored-by: Theodore Aptekarev --- .../cryptocurrency/due_diligence/finbrain_crypto_view.py | 2 +- openbb_terminal/cryptocurrency/due_diligence/messari_view.py | 2 +- .../cryptocurrency/due_diligence/pycoingecko_model.py | 1 + openbb_terminal/cryptocurrency/overview/coinpaprika_view.py | 2 +- .../stocks/sector_industry_analysis/financedatabase_model.py | 1 + .../cryptocurrency/due_diligence/test_glassnode_view.py | 1 - website/data/menu/main.yml | 4 ---- 7 files changed, 5 insertions(+), 8 deletions(-) diff --git a/openbb_terminal/cryptocurrency/due_diligence/finbrain_crypto_view.py b/openbb_terminal/cryptocurrency/due_diligence/finbrain_crypto_view.py index a2e479a2c8b..98a33416092 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/finbrain_crypto_view.py +++ b/openbb_terminal/cryptocurrency/due_diligence/finbrain_crypto_view.py @@ -92,7 +92,7 @@ def display_crypto_sentiment_analysis( ) ax.axhline(y=0, linestyle="--") ax.set_xlabel("Time") - ax.set_ylabel("Sentiment") + ax.set_ylabel("Finbrain's Sentiment Score") start_date = sentiment.index[-1].strftime("%Y/%m/%d") ax.set_title(f"FinBrain's Sentiment Analysis for {coin}-USD since {start_date}") ax.set_ylim([-1.1, 1.1]) diff --git a/openbb_terminal/cryptocurrency/due_diligence/messari_view.py b/openbb_terminal/cryptocurrency/due_diligence/messari_view.py index a2b1de1c072..b47c04cb9f7 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/messari_view.py +++ b/openbb_terminal/cryptocurrency/due_diligence/messari_view.py @@ -207,7 +207,7 @@ def display_marketcap_dominance( else: return - ax.plot(df.index, df["values"]) + ax.plot(df.index, df["marketcap_dominance"]) ax.set_title(f"{coin}'s Market Cap Dominance over time") ax.set_ylabel(f"{coin} Percentage share") diff --git a/openbb_terminal/cryptocurrency/due_diligence/pycoingecko_model.py b/openbb_terminal/cryptocurrency/due_diligence/pycoingecko_model.py index 40b7fd1cf21..eae21159aa9 100644 --- a/openbb_terminal/cryptocurrency/due_diligence/pycoingecko_model.py +++ b/openbb_terminal/cryptocurrency/due_diligence/pycoingecko_model.py @@ -1,5 +1,6 @@ """CoinGecko model""" __docformat__ = "numpy" +# pylint:disable=unsupported-assignment-operation import logging from typing import Any, Dict, List, Optional, Tuple, Union diff --git a/openbb_terminal/cryptocurrency/overview/coinpaprika_view.py b/openbb_terminal/cryptocurrency/overview/coinpaprika_view.py index 7e4ce45911e..f76f1fb954a 100644 --- a/openbb_terminal/cryptocurrency/overview/coinpaprika_view.py +++ b/openbb_terminal/cryptocurrency/overview/coinpaprika_view.py @@ -85,7 +85,7 @@ def display_global_market(export: str) -> None: df = paprika.get_global_market() df_data = df.copy() - df["Value"] = df["Value"].apply( + df["Value"] = df["Value"].apply( # pylint:disable=unsupported-assignment-operation lambda x: lambda_long_number_format_with_type_check(x) ) diff --git a/openbb_terminal/stocks/sector_industry_analysis/financedatabase_model.py b/openbb_terminal/stocks/sector_industry_analysis/financedatabase_model.py index c19865fb398..4720bad3327 100644 --- a/openbb_terminal/stocks/sector_industry_analysis/financedatabase_model.py +++ b/openbb_terminal/stocks/sector_industry_analysis/financedatabase_model.py @@ -140,6 +140,7 @@ def filter_stocks( industry=industry, exclude_exchanges=exclude_exchanges, ) + print(data.keys()) else: # no industry data = fd.select_equities( country=country, diff --git a/tests/openbb_terminal/cryptocurrency/due_diligence/test_glassnode_view.py b/tests/openbb_terminal/cryptocurrency/due_diligence/test_glassnode_view.py index e5f8e36a011..09a5456f3c4 100644 --- a/tests/openbb_terminal/cryptocurrency/due_diligence/test_glassnode_view.py +++ b/tests/openbb_terminal/cryptocurrency/due_diligence/test_glassnode_view.py @@ -13,7 +13,6 @@ def vcr_config(): } -@pytest.mark.skip(reason="`subplots` not mocked => calling displays the plot") @pytest.mark.vcr @pytest.mark.record_stdout def test_display_btc_rainbow(mocker): diff --git a/website/data/menu/main.yml b/website/data/menu/main.yml index a4d21fc2d1a..09733770121 100755 --- a/website/data/menu/main.yml +++ b/website/data/menu/main.yml @@ -1197,8 +1197,6 @@ main: ref: "/terminal/common/prediction_techniques/conv1d" - name: mc ref: "/terminal/common/prediction_techniques/mc" - - name: expo - ref: "/terminal/common/prediction_techniques/expo" - name: funds ref: "/terminal/funds" sub: @@ -1662,8 +1660,6 @@ main: ref: "/terminal/common/prediction_techniques/conv1d" - name: mc ref: "/terminal/common/prediction_techniques/mc" - - name: expo - ref: "/terminal/common/prediction_techniques/expo" - name: "OpenBB Python API" ref: "/api" - name: "OpenBB Bots"