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

Refractor stocks/fa by incorporating stocks/dd and making the menu less reliant on Yahoo Finance #4055

Merged
merged 57 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
630f824
I missed some sheet_name ones :)
Jan 26, 2023
40cb383
Move quote to main menu and combine yahoo finance commands
Jan 26, 2023
a42d7c0
Update stocks for quote
Jan 26, 2023
464f0c2
First update to move yfinance away from main functionality
Jan 26, 2023
cbd0852
Small updates
Jan 26, 2023
cbdde30
Update tests to reflect changes
Jan 26, 2023
2d869c7
Fix some little things
Jan 26, 2023
d682edd
Update docs a little too
Jan 26, 2023
1665c13
Remove the Due Diligence menu
Jan 27, 2023
00e194b
Update tests for new change
Jan 27, 2023
22de01e
Update fa and stocks with new text and move some stuff around
Jan 27, 2023
801ffcc
Bye bye dd
Jan 27, 2023
0897d31
Pls work
JerBouma Jan 30, 2023
7e419ef
work..
JerBouma Jan 30, 2023
f8de870
work..
JerBouma Jan 30, 2023
3a3ed2a
work..
JerBouma Jan 30, 2023
1d45863
Work..|
JerBouma Jan 30, 2023
8577100
Add tests back in
JerBouma Jan 30, 2023
1e87327
Remove tests
JerBouma Jan 30, 2023
e947032
Fix fix fix
JerBouma Jan 30, 2023
9c8a4f4
Merge branch 'develop' into feature/yfinance-refractor-stocks
jmaslek Jan 30, 2023
9616bbc
Remove tests to fix conflicts
JerBouma Feb 1, 2023
cef2287
Improve the `stocks/search` command (#4084)
JerBouma Jan 31, 2023
121f149
Update commands with --sheet-name that didn't work (#4088)
JerBouma Jan 31, 2023
de1e971
Adds auto completion to `news` (#4089)
hjoaquim Jan 31, 2023
ea9221f
Hotfix/Windows-CLI (#4087)
tehcoderer Jan 31, 2023
7358b4c
Adds end date to `forex/load` (#4077)
hjoaquim Jan 31, 2023
049a6c5
Update tests to reflect changes
Jan 26, 2023
b73b056
work..
JerBouma Jan 30, 2023
38894c4
Remove tests
JerBouma Jan 30, 2023
571182f
Fix fix fix
JerBouma Jan 30, 2023
5d997bf
Remove tests
JerBouma Feb 1, 2023
ee3fee5
Update the whole test folder
JerBouma Feb 1, 2023
2e79eaa
Merge branch 'develop' into feature/yfinance-refractor-stocks
JerBouma Feb 1, 2023
1afd42c
Small updates
JerBouma Feb 1, 2023
fd01f9c
Revert change
JerBouma Feb 1, 2023
e6a36a8
Update eodhd to reflect it requires a paid plan and update tests
JerBouma Feb 1, 2023
e841acc
Merge branch 'develop' into feature/yfinance-refractor-stocks
JerBouma Feb 1, 2023
53cf0b3
Fix all the tests
JerBouma Feb 1, 2023
f2e197f
Update tests
JerBouma Feb 1, 2023
0cbe242
Update integration tests
JerBouma Feb 1, 2023
497de48
Removing tests so no whining happens
JerBouma Feb 3, 2023
c89570d
Merge branch
JerBouma Feb 3, 2023
7fbbc9f
ADD ALL THE TESTS
JerBouma Feb 3, 2023
95db018
Fix linting
JerBouma Feb 3, 2023
585422c
gitignore. thanks jer
jmaslek Feb 3, 2023
1db9146
Merge branch 'develop' into feature/yfinance-refractor-stocks
jmaslek Feb 3, 2023
dbd2d16
Add back dd and redirect to fa
JerBouma Feb 3, 2023
07c734e
Merge branch 'develop' into feature/yfinance-refractor-stocks
jmaslek Feb 3, 2023
a2f8f33
Update to just display a message
JerBouma Feb 3, 2023
1440c02
Update OpenBB SDK commands
JerBouma Feb 6, 2023
7b9c5cc
Fixing issues with exporting
JerBouma Feb 6, 2023
d8765cb
Merge
JerBouma Feb 6, 2023
79cd29d
Merge branch 'develop' into feature/yfinance-refractor-stocks
JerBouma Feb 6, 2023
923a4de
Fix ruff messing up
JerBouma Feb 6, 2023
73b4492
Fix tests
JerBouma Feb 6, 2023
d4b6b2b
Fix the tests by disabling isort to run on tests folder
jmaslek Feb 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ website/functions
*_sdk_audit.csv
website/terminaltest
!build/docker/compose.env
.dccache

# pyinstaller artifacts
*.pyo
Expand Down
11 changes: 1 addition & 10 deletions openbb_terminal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
# flake8: noqa
from . import (
common,
cryptocurrency,
economy,
etf,
forex,
portfolio,
reports,
stocks,
)
from . import common, cryptocurrency, economy, etf, forex, portfolio, reports, stocks
4 changes: 1 addition & 3 deletions openbb_terminal/alternative/alt_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
from openbb_terminal.alternative import hackernews_view
from openbb_terminal.custom_prompt_toolkit import NestedCompleter
from openbb_terminal.decorators import log_start_end
from openbb_terminal.helper_funcs import (
EXPORT_ONLY_RAW_DATA_ALLOWED,
)
from openbb_terminal.helper_funcs import EXPORT_ONLY_RAW_DATA_ALLOWED
from openbb_terminal.menu import session
from openbb_terminal.parent_classes import BaseController
from openbb_terminal.rich_config import MenuText, console
Expand Down
5 changes: 1 addition & 4 deletions openbb_terminal/alternative/hackernews_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

from openbb_terminal.alternative.hackernews_model import get_stories
from openbb_terminal.decorators import log_start_end
from openbb_terminal.helper_funcs import (
export_data,
print_rich_table,
)
from openbb_terminal.helper_funcs import export_data, print_rich_table

logger = logging.getLogger(__name__)

Expand Down
6 changes: 4 additions & 2 deletions openbb_terminal/alternative/oss/github_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import os
from typing import List, Optional

from matplotlib import pyplot as plt
from matplotlib import ticker
from matplotlib import (
pyplot as plt,
ticker,
)

from openbb_terminal.alternative.oss import github_model
from openbb_terminal.config_plot import PLOT_DPI
Expand Down
6 changes: 4 additions & 2 deletions openbb_terminal/alternative/oss/runa_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import os
from typing import List, Optional

from matplotlib import pyplot as plt
from matplotlib import ticker
from matplotlib import (
pyplot as plt,
ticker,
)

from openbb_terminal.alternative.oss import runa_model
from openbb_terminal.config_plot import PLOT_DPI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
from openbb_terminal.alternative.realestate import landRegistry_view
from openbb_terminal.custom_prompt_toolkit import NestedCompleter
from openbb_terminal.decorators import log_start_end
from openbb_terminal.helper_funcs import (
EXPORT_ONLY_RAW_DATA_ALLOWED,
check_positive,
)
from openbb_terminal.helper_funcs import EXPORT_ONLY_RAW_DATA_ALLOWED, check_positive
from openbb_terminal.menu import session
from openbb_terminal.parent_classes import BaseController
from openbb_terminal.rich_config import MenuText, console
Expand Down
6 changes: 1 addition & 5 deletions openbb_terminal/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# flake8: noqa
from . import (
behavioural_analysis,
quantitative_analysis,
technical_analysis,
)
from . import behavioural_analysis, quantitative_analysis, technical_analysis
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@

from openbb_terminal.common.behavioural_analysis import stocktwits_model
from openbb_terminal.decorators import log_start_end
from openbb_terminal.helper_funcs import (
print_rich_table,
)
from openbb_terminal.helper_funcs import print_rich_table
from openbb_terminal.rich_config import console

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion openbb_terminal/config_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import dotenv

from openbb_terminal.core.config.paths import USER_ENV_FILE, REPOSITORY_ENV_FILE
from openbb_terminal.base_helpers import load_env_vars
from openbb_terminal.core.config.paths import REPOSITORY_ENV_FILE, USER_ENV_FILE

dotenv.load_dotenv(USER_ENV_FILE)
dotenv.load_dotenv(REPOSITORY_ENV_FILE, override=True)
Expand Down
11 changes: 6 additions & 5 deletions openbb_terminal/config_terminal.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# IMPORTATION STANDARD
import os


# IMPORTATION THIRDPARTY
import dotenv

# IMPORTATION INTERNAL

from openbb_terminal.base_helpers import load_env_vars, strtobool
from openbb_terminal.core.config.paths import (
PACKAGE_ENV_FILE,
USER_ENV_FILE,
REPOSITORY_ENV_FILE,
USER_ENV_FILE,
)
from openbb_terminal.base_helpers import load_env_vars, strtobool

from .helper_classes import TerminalStyle as _TerminalStyle

# IMPORTATION INTERNAL


dotenv.load_dotenv(USER_ENV_FILE)
dotenv.load_dotenv(REPOSITORY_ENV_FILE, override=True)
dotenv.load_dotenv(PACKAGE_ENV_FILE, override=True)
Expand Down
5 changes: 1 addition & 4 deletions openbb_terminal/core/log/collection/s3_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
WITH_BOTO3 = True

# IMPORTATION INTERNAL
from openbb_terminal.core.log.constants import (
DEFAULT_API_URL,
DEFAULT_BUCKET,
)
from openbb_terminal.core.log.constants import DEFAULT_API_URL, DEFAULT_BUCKET
from openbb_terminal.core.log.generation.settings import AWSSettings

# DO NOT USE THE FILE LOGGER IN THIS MODULE
Expand Down
8 changes: 1 addition & 7 deletions openbb_terminal/cryptocurrency/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
# flake8: noqa
from . import (
defi,
discovery,
onchain,
overview,
technical_analysis,
)
from . import defi, discovery, onchain, overview, technical_analysis
20 changes: 5 additions & 15 deletions openbb_terminal/cryptocurrency/crypto_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ def find(

def _find_CoinGecko(key: str, query: str, limit: int) -> pd.DataFrame:
# pylint: disable=C0415
from openbb_terminal.cryptocurrency.discovery.pycoingecko_model import (
get_coin_list,
)
from openbb_terminal.cryptocurrency.discovery.pycoingecko_model import get_coin_list

coins_df = get_coin_list()
coins_list = coins_df[key].to_list()
Expand Down Expand Up @@ -107,12 +105,8 @@ def _find_CoinPaprika(key: str, query: str, limit: int) -> pd.DataFrame:

def _find_Binance(key: str, query: str, limit: int) -> pd.DataFrame:
# pylint: disable=C0415
from openbb_terminal.cryptocurrency.cryptocurrency_helpers import (
load_binance_map,
)
from openbb_terminal.cryptocurrency.discovery.pycoingecko_model import (
get_coin_list,
)
from openbb_terminal.cryptocurrency.cryptocurrency_helpers import load_binance_map
from openbb_terminal.cryptocurrency.discovery.pycoingecko_model import get_coin_list

# TODO: Fix it in future. Determine if user looks for symbol like ETH or ethereum
if len(query) > 5:
Expand All @@ -133,12 +127,8 @@ def _find_Binance(key: str, query: str, limit: int) -> pd.DataFrame:

def _find_Coinbase(key: str, query: str, limit: int) -> pd.DataFrame:
# pylint: disable=C0415
from openbb_terminal.cryptocurrency.cryptocurrency_helpers import (
load_coinbase_map,
)
from openbb_terminal.cryptocurrency.discovery.pycoingecko_model import (
get_coin_list,
)
from openbb_terminal.cryptocurrency.cryptocurrency_helpers import load_coinbase_map
from openbb_terminal.cryptocurrency.discovery.pycoingecko_model import get_coin_list

if len(query) > 5:
key = "id"
Expand Down
5 changes: 1 addition & 4 deletions openbb_terminal/cryptocurrency/defi/coindix_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@

from openbb_terminal.cryptocurrency.defi import coindix_model
from openbb_terminal.decorators import log_start_end
from openbb_terminal.helper_funcs import (
export_data,
print_rich_table,
)
from openbb_terminal.helper_funcs import export_data, print_rich_table

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
)
from openbb_terminal.custom_prompt_toolkit import NestedCompleter
from openbb_terminal.decorators import log_start_end
from openbb_terminal.helper_funcs import (
EXPORT_ONLY_RAW_DATA_ALLOWED,
check_positive,
)
from openbb_terminal.helper_funcs import EXPORT_ONLY_RAW_DATA_ALLOWED, check_positive
from openbb_terminal.menu import session
from openbb_terminal.parent_classes import BaseController
from openbb_terminal.rich_config import MenuText, console, get_ordered_list_sources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from typing import List, Optional

import pandas as pd
from matplotlib import pyplot as plt
from matplotlib import ticker
from matplotlib import (
pyplot as plt,
ticker,
)

from openbb_terminal import config_plot as cfgPlot
from openbb_terminal.config_terminal import theme
Expand Down
93 changes: 52 additions & 41 deletions openbb_terminal/cryptocurrency/due_diligence/due_diligence_api.py
Original file line number Diff line number Diff line change
@@ -1,55 +1,66 @@
"""Due Diligence API."""
import os

from openbb_terminal.helper_classes import ModelsNamespace as _models

# flake8: noqa
# pylint: disable=unused-import
from .binance_view import display_balance as balance, display_order_book as book
from .coinbase_view import (
display_order_book as cbbook,
display_stats as stats,
display_trades as trades,
)
from .coinglass_view import display_open_interest as oi
from .coinpaprika_view import (
display_basic as basic,
display_events as events,
display_exchanges as ex,
display_markets as mkt,
display_price_supply as ps,
display_twitter as twitter,
)
from .cryptopanic_view import display_news as news

# Menu commands
from .glassnode_view import display_non_zero_addresses as nonzero
from .glassnode_view import display_active_addresses as active
from .glassnode_view import display_exchange_net_position_change as change
from .glassnode_view import display_exchange_balances as eb
from .glassnode_view import display_hashrate as hr
from .coinglass_view import display_open_interest as oi
from .pycoingecko_view import display_info as info
from .pycoingecko_view import display_market as market
from .pycoingecko_view import display_web as web
from .pycoingecko_view import display_social as social
from .pycoingecko_view import display_dev as dev
from .pycoingecko_view import display_ath as ath
from .pycoingecko_view import display_atl as atl
from .pycoingecko_view import display_score as score
from .pycoingecko_view import display_bc as bc
from .binance_view import display_order_book as book
from .coinbase_view import display_order_book as cbbook
from .binance_view import display_balance as balance
from .coinbase_view import display_trades as trades
from .coinbase_view import display_stats as stats
from .coinpaprika_view import display_price_supply as ps
from .coinpaprika_view import display_basic as basic
from .coinpaprika_view import display_markets as mkt
from .coinpaprika_view import display_exchanges as ex
from .coinpaprika_view import display_events as events
from .coinpaprika_view import display_twitter as twitter
from .glassnode_view import (
display_active_addresses as active,
display_exchange_balances as eb,
display_exchange_net_position_change as change,
display_hashrate as hr,
display_non_zero_addresses as nonzero,
)
from .messari_view import (
display_fundraising as fr,
display_governance as gov,
display_investors as inv,
display_links as links,
display_marketcap_dominance as mcapdom,
display_messari_timeseries as mt,
display_messari_timeseries_list as get_mt,
display_project_info as pi,
display_roadmap as rm,
display_team as team,
display_tokenomics as tk,
)
from .pycoingecko_view import (
display_ath as ath,
display_atl as atl,
display_bc as bc,
display_dev as dev,
display_info as info,
display_market as market,
display_score as score,
display_social as social,
display_web as web,
)
from .santiment_view import display_github_activity as gh
from .cryptopanic_view import display_news as news
from .messari_view import display_messari_timeseries_list as get_mt
from .messari_view import display_messari_timeseries as mt
from .messari_view import display_marketcap_dominance as mcapdom
from .messari_view import display_links as links
from .messari_view import display_roadmap as rm
from .messari_view import display_tokenomics as tk
from .messari_view import display_project_info as pi
from .messari_view import display_investors as inv
from .messari_view import display_team as team
from .messari_view import display_governance as gov
from .messari_view import display_fundraising as fr
from .tokenterminal_view import (
display_fundamental_metric_from_project_over_time as funot,
display_description as desc,
display_fundamental_metric_from_project_over_time as funot,
)

# flake8: noqa
# pylint: disable=unused-import


# Models
models = _models(os.path.abspath(os.path.dirname(__file__)))
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
from typing import List, Optional

import numpy as np
from matplotlib import pyplot as plt
from matplotlib import ticker
from matplotlib import (
pyplot as plt,
ticker,
)
from matplotlib.lines import Line2D

from openbb_terminal import config_plot as cfgPlot
Expand Down
5 changes: 3 additions & 2 deletions openbb_terminal/cryptocurrency/due_diligence/messari_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
# pylint: disable=C0301,C0302

import logging
from typing import Any, Optional, Tuple
from datetime import datetime, timedelta
import re
from datetime import datetime, timedelta
from typing import Any, Optional, Tuple

import pandas as pd

from openbb_terminal import config_terminal as cfg
Expand Down
14 changes: 9 additions & 5 deletions openbb_terminal/cryptocurrency/due_diligence/messari_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@

import numpy as np
import pandas as pd
from matplotlib import dates as mdates
from matplotlib import pyplot as plt
from matplotlib import ticker
from matplotlib import (
dates as mdates,
pyplot as plt,
ticker,
)

from openbb_terminal import config_plot as cfgPlot
from openbb_terminal import feature_flags as obbff
from openbb_terminal import (
config_plot as cfgPlot,
feature_flags as obbff,
)
from openbb_terminal.config_terminal import theme
from openbb_terminal.cryptocurrency import cryptocurrency_helpers
from openbb_terminal.cryptocurrency.dataframe_helpers import prettify_paragraph
Expand Down
Loading