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

Deprecate reddit commands taking too long to connect to PushshiftAPI #3999

Merged
merged 26 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
94ae277
fix tk
montezdesousa Jan 17, 2023
32adeef
fix newsletters
montezdesousa Jan 17, 2023
a353790
fix lt
montezdesousa Jan 17, 2023
5402200
exception on pir
montezdesousa Jan 17, 2023
6d4a465
fix attrib bug and remove warning
montezdesousa Jan 17, 2023
736d7a9
fix earnings
montezdesousa Jan 17, 2023
0bbfb3d
fix ins, lt, whatif
montezdesousa Jan 17, 2023
acd0d62
fillna
montezdesousa Jan 17, 2023
c2a445b
fix vis
montezdesousa Jan 17, 2023
ed024b7
timeout reddit func
montezdesousa Jan 17, 2023
7bb981d
fix interest
montezdesousa Jan 17, 2023
cf61e71
black
montezdesousa Jan 17, 2023
406edd6
pylint
montezdesousa Jan 17, 2023
5aca673
Merge branch 'develop' into hotfix/reddit
montezdesousa Jan 17, 2023
ec130f7
Merge branch 'develop' into hotfix/reddit
montezdesousa Jan 17, 2023
fd7fbff
pylint again
montezdesousa Jan 17, 2023
9181c6a
Merge branch 'hotfix/reddit' of github.com:OpenBB-finance/OpenBBTermi…
montezdesousa Jan 17, 2023
2558811
back to timeout
montezdesousa Jan 17, 2023
dc93948
Merge branch 'develop' into hotfix/reddit
jmaslek Jan 22, 2023
8f3deeb
Merge branch 'develop' into hotfix/reddit
montezdesousa Jan 23, 2023
d1418c9
rewind
montezdesousa Jan 23, 2023
29d05f9
deprecate pushshift api commands
montezdesousa Jan 23, 2023
9aa5043
Merge branch 'develop' into hotfix/reddit
jmaslek Jan 24, 2023
b3aae2a
rewrite expected
montezdesousa Jan 24, 2023
fb8674b
Merge branch 'hotfix/reddit' of github.com:OpenBB-finance/OpenBBTermi…
montezdesousa Jan 24, 2023
843f2b4
Merge branch 'develop' into hotfix/reddit
jmaslek Jan 24, 2023
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
2 changes: 2 additions & 0 deletions openbb_terminal/common/behavioural_analysis/google_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ def display_correlation_interest(
colors = theme.get_colors()[1:]
for idx, word in enumerate(words):
df_interest = google_model.get_mentions(word)
if df_interest.empty:
continue
ax[1].plot(df_interest.index, df_interest[word], "-", color=colors[idx])

ax[1].set_ylabel("Interest [%]")
Expand Down
5 changes: 0 additions & 5 deletions openbb_terminal/miscellaneous/library/trail_map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ stocks.ba.mentions,openbb_terminal.common.behavioural_analysis.google_model.get_
stocks.ba.queries,openbb_terminal.common.behavioural_analysis.google_model.get_queries,
stocks.ba.regions,openbb_terminal.common.behavioural_analysis.google_model.get_regions,openbb_terminal.common.behavioural_analysis.google_view.display_regions
stocks.ba.rise,openbb_terminal.common.behavioural_analysis.google_model.get_rise,
stocks.ba.getdd,openbb_terminal.common.behavioural_analysis.reddit_model.get_due_dilligence,
stocks.ba.popular,openbb_terminal.common.behavioural_analysis.reddit_model.get_popular_tickers,
stocks.ba.redditsent,openbb_terminal.common.behavioural_analysis.reddit_model.get_posts_about,
stocks.ba.text_sent,openbb_terminal.common.behavioural_analysis.reddit_model.get_sentiment,
stocks.ba.spac,openbb_terminal.common.behavioural_analysis.reddit_model.get_spac,
stocks.ba.spacc,openbb_terminal.common.behavioural_analysis.reddit_model.get_spac_community,
stocks.ba.watchlist,openbb_terminal.common.behavioural_analysis.reddit_model.get_watchlists,
stocks.ba.wsb,openbb_terminal.common.behavioural_analysis.reddit_model.get_wsb_community,
stocks.ba.hist,openbb_terminal.common.behavioural_analysis.sentimentinvestor_model.get_historical,openbb_terminal.common.behavioural_analysis.sentimentinvestor_view.display_historical
stocks.ba.trend,openbb_terminal.common.behavioural_analysis.sentimentinvestor_model.get_trending,openbb_terminal.common.behavioural_analysis.sentimentinvestor_view.display_trending
Expand Down Expand Up @@ -549,4 +545,3 @@ futures.historical,openbb_terminal.futures.yfinance_model.get_historical_futures
futures.curve,openbb_terminal.futures.yfinance_model.get_curve_futures,openbb_terminal.futures.yfinance_view.display_curve
economy.get_groups,openbb_terminal.economy.finviz_model.get_groups,
stocks.filings,openbb_terminal.stocks.fundamental_analysis.fmp_model.get_filings,openbb_terminal.stocks.fundamental_analysis.fmp_view.display_filings

8 changes: 5 additions & 3 deletions openbb_terminal/portfolio/portfolio_engine.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Portfolio Engine"""
__docformat__ = "numpy"

from os import environ
import warnings
import logging
from typing import Dict, Any
Expand Down Expand Up @@ -193,9 +194,10 @@ def read_transactions(path: str) -> pd.DataFrame:

# Load transactions from file
if path.endswith(".xlsx"):
warnings.filterwarnings(
"ignore", category=UserWarning, module="openpyxl", lineno=312
)
if environ.get("DEBUG_MODE", "false") != "true":
warnings.filterwarnings(
"ignore", category=UserWarning, module="openpyxl"
)
transactions = pd.read_excel(path)
elif path.endswith(".csv"):
transactions = pd.read_csv(path)
Expand Down
16 changes: 8 additions & 8 deletions openbb_terminal/stocks/behavioural_analysis/ba_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class BehaviouralAnalysisController(StockBaseController):

CHOICES_COMMANDS = [
"load",
"watchlist",
"spac",
# "watchlist",
# "spac",
"spacc",
"wsb",
"popular",
Expand All @@ -59,8 +59,8 @@ class BehaviouralAnalysisController(StockBaseController):
"queries",
"rise",
"headlines",
"popular",
"getdd",
# "popular",
# "getdd",
"snews",
"interest",
]
Expand Down Expand Up @@ -95,11 +95,11 @@ def print_help(self):
mt.add_cmd("headlines", self.ticker)
mt.add_cmd("snews", self.ticker)
mt.add_cmd("wsb")
mt.add_cmd("watchlist")
mt.add_cmd("popular")
# mt.add_cmd("watchlist")
# mt.add_cmd("popular")
mt.add_cmd("spacc")
mt.add_cmd("spac")
mt.add_cmd("getdd", self.ticker)
# mt.add_cmd("spac")
# mt.add_cmd("getdd", self.ticker)
mt.add_cmd("redditsent", self.ticker)
mt.add_cmd("trending")
mt.add_cmd("stalker")
Expand Down