summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Maslek <jmaslek11@gmail.com>2024-02-29 12:45:19 -0500
committerGitHub <noreply@github.com>2024-02-29 12:45:19 -0500
commitb458d2f4ba9ddaca7cdd1dc54ce29bbe1a0ec218 (patch)
treedd5af9e0890c66cac7d77314128441d7752cd544
parent1d70c877ff9317ed95a333ab1f3d9f3112ca4149 (diff)
More v3 removals (#6141)
* remove ultima + althub * move twitter keys * economy kill bigmac + remove eval + plot+ stored data * am losing track * oanda is next * brokers now * fix sdk in case anyone wants it * missed an sdk endpoint * spec file * small edits for installer * stop the int tests on these * always be fixin bugs * some more removals
-rw-r--r--.github/workflows/macos-build.yml40
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--build/pyinstaller/macOS/darwin/Resources/LICENSE.txt2
-rw-r--r--build/pyinstaller/terminal.spec5
-rw-r--r--openbb_platform/core/openbb_core/app/model/hub/features_keys.py4
-rw-r--r--openbb_terminal/common/ultima_newsmonitor_model.py240
-rw-r--r--openbb_terminal/common/ultima_newsmonitor_view.py130
-rw-r--r--openbb_terminal/core/sdk/controllers/__init__.py1
-rw-r--r--openbb_terminal/core/sdk/controllers/forex_sdk_controller.py54
-rw-r--r--openbb_terminal/core/sdk/controllers/stocks_sdk_controller.py3
-rw-r--r--openbb_terminal/core/sdk/models/economy_sdk_model.py4
-rw-r--r--openbb_terminal/core/sdk/models/forecast_sdk_model.py1
-rw-r--r--openbb_terminal/core/sdk/models/forex_sdk_model.py64
-rw-r--r--openbb_terminal/core/sdk/models/keys_sdk_model.py8
-rw-r--r--openbb_terminal/core/sdk/models/portfolio_sdk_model.py1
-rw-r--r--openbb_terminal/core/sdk/models/stocks_sdk_model.py6
-rw-r--r--openbb_terminal/core/sdk/sdk_init.py6
-rw-r--r--openbb_terminal/core/sdk/trail_map.csv20
-rw-r--r--openbb_terminal/economy/economy_controller.py287
-rw-r--r--openbb_terminal/forex/forex_controller.py13
-rw-r--r--openbb_terminal/forex/oanda/oanda_controller.py506
-rw-r--r--openbb_terminal/forex/oanda/oanda_model.py737
-rw-r--r--openbb_terminal/forex/oanda/oanda_view.py403
-rw-r--r--openbb_terminal/keys_controller.py152
-rw-r--r--openbb_terminal/keys_model.py339
-rw-r--r--openbb_terminal/miscellaneous/models/all_api_keys.json6
-rw-r--r--openbb_terminal/miscellaneous/models/hub_credentials.json5
-rw-r--r--openbb_terminal/miscellaneous/sources/openbb_default.json8
-rw-r--r--openbb_terminal/portfolio/__init__.py2
-rw-r--r--openbb_terminal/portfolio/brokers/README.md8
-rw-r--r--openbb_terminal/portfolio/brokers/__init__.py0
-rw-r--r--openbb_terminal/portfolio/brokers/bro_controller.py89
-rw-r--r--openbb_terminal/portfolio/brokers/brokers_helpers.py38
-rw-r--r--openbb_terminal/portfolio/brokers/coinbase/__init__.py0
-rw-r--r--openbb_terminal/portfolio/brokers/coinbase/coinbase_controller.py261
-rw-r--r--openbb_terminal/portfolio/brokers/coinbase/coinbase_model.py340
-rw-r--r--openbb_terminal/portfolio/brokers/coinbase/coinbase_view.py185
-rw-r--r--openbb_terminal/portfolio/brokers/degiro/README.md159
-rw-r--r--openbb_terminal/portfolio/brokers/degiro/__init__.py0
-rw-r--r--openbb_terminal/portfolio/brokers/degiro/degiro_controller.py448
-rw-r--r--openbb_terminal/portfolio/brokers/degiro/degiro_model.py524
-rw-r--r--openbb_terminal/portfolio/brokers/degiro/degiro_view.py524
-rw-r--r--openbb_terminal/portfolio/brokers/robinhood/robinhood_controller.py111
-rw-r--r--openbb_terminal/portfolio/brokers/robinhood/robinhood_model.py119
-rw-r--r--openbb_terminal/portfolio/brokers/robinhood/robinhood_view.py99
-rw-r--r--openbb_terminal/portfolio/portfolio_controller.py9
-rw-r--r--openbb_terminal/sdk.py12
-rw-r--r--openbb_terminal/stocks/behavioural_analysis/ba_controller.py84
-rw-r--r--openbb_terminal/stocks/behavioural_analysis/news_sentiment_model.py98
-rw-r--r--openbb_terminal/stocks/behavioural_analysis/news_sentiment_view.py72
-rw-r--r--openbb_terminal/stocks/comparison_analysis/ca_controller.py87
-rw-r--r--openbb_terminal/stocks/comparison_analysis/finviz_compare_model.py33
-rw-r--r--openbb_terminal/stocks/comparison_analysis/sdk_helpers.py4
-rw-r--r--openbb_terminal/stocks/dark_pool_shorts/sec_model.py46
-rw-r--r--openbb_terminal/stocks/stocks_controller.py24
-rw-r--r--openbb_terminal/terminal_controller.py14
-rw-r--r--openbb_terminal/terminal_helper.py35
-rw-r--r--poetry.lock74
-rw-r--r--pyproject.toml3
-rw-r--r--requirements-full.txt7
-rw-r--r--requirements.txt7
-rw-r--r--terminal.py1
62 files changed, 51 insertions, 6513 deletions
diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml
index 3d8652ab050..6c7a2971b17 100644
--- a/.github/workflows/macos-build.yml
+++ b/.github/workflows/macos-build.yml
@@ -140,26 +140,6 @@ jobs:
pkgutil --expand-full OpenBBTerminal.pkg extract/
rm -rf OpenBBTerminal.pkg
- - name: Run Integration Tests
- run: |
- extract/OpenBBTerminal.pkg/Payload/Applications/OpenBB\ Terminal/.OpenBB/OpenBBTerminal -t -s forecast cryptocurrency reports alternative economy futures econometrics dashboards portfolio stocks/test_stocks_options_screen.openbb stocks/test_stocks_options.openbb forex etf stocks/test_stocks_fa.openbb | tee result.txt
- grep "================================ Integration Test Summary ================================" result.txt -A100 | tail --bytes=2000 > summary.txt
-
- - name: Run Integration Tests Coverage Report
- run: |
- extract/OpenBBTerminal.pkg/Payload/Applications/OpenBB\ Terminal/.OpenBB/OpenBBTerminal -t --coverage | tee result.txt
- echo >> summary.txt
- sed -n '/Integration Coverage Summary/,$p' result.txt >> summary.txt
-
- - name: Upload summary to Slack
- uses: adrey/slack-file-upload-action@master
- with:
- token: ${{ secrets.SLACK_API_TOKEN }}
- initial_comment: "MacOs Build Integration test summary"
- title: "MacOs Build Integration test summary"
- path: summary.txt
- channel: ${{ secrets.SLACK_CHANNEL_ID }}
-
- name: Remove OpenBB Folder
run: |
rm -rf /Users/openbb/Desktop/OpenBB\ Terminal
@@ -293,26 +273,6 @@ jobs:
pkgutil --expand-full OpenBBTerminal.pkg extract/
rm -rf OpenBBTerminal.pkg
- - name: Run Integration Tests
- run: |
- extract/OpenBBTerminal.pkg/Payload/Applications/OpenBB\ Terminal/.OpenBB/OpenBBTerminal -t -s forecast cryptocurrency reports alternative economy futures econometrics dashboards portfolio stocks/test_stocks_options_screen.openbb stocks/test_stocks_options.openbb forex etf stocks/test_stocks_fa.openbb | tee result.txt
- grep "================================ Integration Test Summary ================================" result.txt -A100 | tail --bytes=2000 > summary.txt
- echo >> summary.txt
-
- - name: Run Integration Tests Coverage Report
- run: |
- extract/OpenBBTerminal.pkg/Payload/Applications/OpenBB\ Terminal/.OpenBB/OpenBBTerminal -t --coverage | tee result.txt
- sed -n '/Integration Coverage Summary/,$p' result.txt >> summary.txt
-
- - name: Upload summary to Slack
- uses: adrey/slack-file-upload-action@master
- with:
- token: ${{ secrets.SLACK_API_TOKEN }}
- initial_comment: "MacOs Build Integration test summary"
- title: "Intel MacOs Build Integration test summary"
- path: summary.txt
- channel: ${{ secrets.SLACK_CHANNEL_ID }}
-
- name: Remove OpenBB Folder
run: |
rm -rf /Users/openbb/Desktop/OpenBB\ Terminal
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index eff20db9821..dd290578b6e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1370,7 +1370,6 @@ The convention is as follows:
"news": [
"Feedparser",
"NewsApi",
- "Ultima"
],
...
```
@@ -1497,7 +1496,6 @@ class ForexController(BaseController):
CHOICES_MENUS = [
"forecast",
"qa",
- "oanda",
"ta",
]
RESOLUTION = ["i", "d", "w", "m"]
diff --git a/build/pyinstaller/macOS/darwin/Resources/LICENSE.txt b/build/pyinstaller/macOS/darwin/Resources/LICENSE.txt
index 793f55bb607..b86fa3e85d2 100644
--- a/build/pyinstaller/macOS/darwin/Resources/LICENSE.txt
+++ b/build/pyinstaller/macOS/darwin/Resources/LICENSE.txt
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2021-2023 OpenBB Inc.
+Copyright (c) 2021-2024 OpenBB Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/build/pyinstaller/terminal.spec b/build/pyinstaller/terminal.spec
index 2728339ece7..35d0b300995 100644
--- a/build/pyinstaller/terminal.spec
+++ b/build/pyinstaller/terminal.spec
@@ -72,10 +72,6 @@ added_files = [
(str(pathex / "streamlit"), "streamlit"),
(str(pathex / "altair"), "altair"),
(str(pathex / "pyarrow"), "pyarrow"),
- (str(pathex / "langchain"), "langchain"),
- (str(pathex / "llama_index/VERSION"), "llama_index"),
- (str(pathex / "tiktoken"), "tiktoken"),
- (str(pathex / "tiktoken_ext"), "tiktoken_ext"),
(which("pywry"), "."),
]
@@ -123,7 +119,6 @@ hidden_imports = [
"pytrends",
"pytrends.request",
"pyarrow",
- "langchain",
]
diff --git a/openbb_platform/core/openbb_core/app/model/hub/features_keys.py b/openbb_platform/core/openbb_core/app/model/hub/features_keys.py
index 31f828017d9..c0653ff443c 100644
--- a/openbb_platform/core/openbb_core/app/model/hub/features_keys.py
+++ b/openbb_platform/core/openbb_core/app/model/hub/features_keys.py
@@ -34,8 +34,4 @@ class FeaturesKeys(BaseModel):
API_SMARTSTAKE_KEY: Optional[str] = Field(default=None)
API_SMARTSTAKE_TOKEN: Optional[str] = Field(default=None)
API_TOKEN_TERMINAL_KEY: Optional[str] = Field(default=None)
- API_TWITTER_BEARER_TOKEN: Optional[str] = Field(default=None)
- API_TWITTER_KEY: Optional[str] = Field(default=None)
- API_TWITTER_SECRET_KEY: Optional[str] = Field(default=None)
- API_ULTIMA_KEY: Optional[str] = Field(default=None)
API_WHALE_ALERT_KEY: Optional[str] = Field(default=None)
diff --git a/openbb_terminal/common/ultima_newsmonitor_model.py b/openbb_terminal/common/ultima_newsmonitor_model.py
deleted file mode 100644
index 0fb041dda16..00000000000
--- a/openbb_terminal/common/ultima_newsmonitor_model.py
+++ /dev/null
@@ -1,240 +0,0 @@
-""" Ultima News Monitor Model """
-
-__docformat__ = "numpy"
-
-import logging
-import os
-from urllib.parse import quote
-
-import certifi
-import pandas as pd
-
-from openbb_terminal.core.session.current_user import get_current_user
-from openbb_terminal.decorators import log_start_end
-
-# from openbb_terminal.decorators import check_api_key
-from openbb_terminal.helper_funcs import request
-from openbb_terminal.rich_config import console
-
-logger = logging.getLogger(__name__)
-
-
-ULTIMA_BASE_URL = "https://api.ultimainsights.ai/v1"
-NO_API_KEY = "REPLACE_ME"
-
-
-@log_start_end(log=logger)
-# @check_api_key(["API_ULTIMA_KEY"])
-def get_news(term: str = "", sort: str = "articlePublishedDate") -> pd.DataFrame:
- """Get news for a given term and source. [Source: Ultima Insights News Monitor]
-
- Parameters
- ----------
- term : str
- term to search on the news articles
- sort: str
- the column to sort by
-
- Returns
- -------
- articles: pd.DataFrame
- term to search on the news articles
-
- Examples
- --------
- >>> from openbb_terminal.sdk import openbb
- >>> openbb.news()
- """
- # Necessary for installer so that it can locate the correct certificates for
- # API calls and https
- # https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error/73270162#73270162
- os.environ["REQUESTS_CA_BUNDLE"] = certifi.where()
- os.environ["SSL_CERT_FILE"] = certifi.where()
-
- current_user = get_current_user()
- if current_user.credentials.API_ULTIMA_KEY == NO_API_KEY:
- auth_header = None
- else:
- auth_header = {
- "Authorization": f"Bearer {current_user.credentials.API_ULTIMA_KEY}"
- }
-
- have_data = False
- limit = 0
-
- while not have_data:
- if term:
- term = quote(term)
- term = term.upper()
- term = term.strip()
- if term in supported_terms():
- if auth_header:
- data = request(
- f"{ULTIMA_BASE_URL}/getNewsArticles/{term}", headers=auth_header
- )
- else:
- data = request(f"{ULTIMA_BASE_URL}/getNewsArticles/{term}")
- else:
- console.print(
- "[red]Ticker not supported. Unable to retrieve data\n[/red]"
- )
- return pd.DataFrame()
- else:
- console.print("[red]No term specified. Unable to retrieve data\n[/red]")
- return pd.DataFrame()
-
- if (
- hasattr(data, "status") and data.status_code == 200
- ): # Checking if data has status attribute and if data request succeeded
- if data.content:
- have_data = True
- elif limit == 60: # Breaking if 60 successful requests return no data
- console.print("[red]Timeout occurred. Please try again\n[/red]")
- break
- limit = limit + 1
-
- elif (
- hasattr(data, "status") and data.status_code == 429
- ): # If data request failed
- console.print(
- "[red]Too many requests. Please get an API Key from https://www.ultimainsights.ai/[/red]"
- )
- break
- elif (
- hasattr(data, "status") and data.status_code != 200
- ): # If data request failed
- console.print("[red]Status code not 200. Unable to retrieve data\n[/red]")
- break
- else:
- # console.print("[red]Could not retrieve data\n[/red]")
- break
- if not data.json():
- return pd.DataFrame()
- df = pd.DataFrame(
- data.json(),
- columns=[
- "articleHeadline",
- "articleURL",
- "articlePublishedDate",
- "riskCategory",
- "riskElaboratedDescription",
- "relevancyScore",
- ],
- )
- df = df[df["relevancyScore"] < 5]
- df = df[df["relevancyScore"] > 3.5]
- df["riskElaboratedDescription"] = df["riskElaboratedDescription"].str.replace(
- "\n", ""
- )
- df["riskElaboratedDescription"] = df["riskElaboratedDescription"].str.replace(
- "\n", ""
- )
- df["articlePublishedDate"] = pd.to_datetime(df["articlePub