summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChavithra PARANA <chavithra@gmail.com>2022-11-28 18:19:07 +0100
committerChavithra PARANA <chavithra@gmail.com>2022-11-28 18:19:07 +0100
commita4fce79bf7f151f25d32ac4f26c10430f888e22d (patch)
tree2112bfda7241b13b5929640d17c06893518ea1d1
parent69cb64d24f937911dde7b245a23faa3458decd82 (diff)
parentd2622528e596430358ec55b61c5e003d1416e49f (diff)
Merge branch 'main' of github.com:OpenBB-finance/OpenBBTerminal
-rw-r--r--.github/workflows/test.yml21
-rw-r--r--README.md9
-rw-r--r--openbb_terminal/dashboards/dashboards_controller.py4
-rw-r--r--openbb_terminal/economy/economy_controller.py4
-rw-r--r--openbb_terminal/economy/fred_model.py18
-rw-r--r--openbb_terminal/economy/fred_view.py23
-rw-r--r--openbb_terminal/feature_flags.py2
-rw-r--r--openbb_terminal/terminal_helper.py24
-rw-r--r--package-lock.json6
-rw-r--r--poetry.lock229
-rw-r--r--pyproject.toml8
-rw-r--r--requirements-full.txt56
-rw-r--r--requirements.txt18
-rw-r--r--tests/README.md2
-rw-r--r--tests/conftest.py2
-rw-r--r--tests/openbb_terminal/economy/test_fred_model.py9
-rw-r--r--tests/openbb_terminal/portfolio/portfolio_optimization/test_optimizer_view.py77
-rw-r--r--tests/openbb_terminal/portfolio/portfolio_optimization/test_po_controller.py5
-rw-r--r--tests/openbb_terminal/portfolio/test_portfolio_controller.py7
-rw-r--r--tests/website/__init__.py0
-rw-r--r--tests/website/test_generate_docs.py13
-rw-r--r--website/content/sdk/guides/advanced/api-keys.md (renamed from website/content/sdk/guides/basics/api-keys.md)2
-rw-r--r--website/content/sdk/guides/advanced/changing-sources.md2
-rw-r--r--website/content/sdk/guides/advanced/chart-styling.md (renamed from website/content/sdk/guides/advanced/chart_styling.md)2
-rw-r--r--website/content/sdk/guides/advanced/data.md (renamed from website/content/sdk/guides/basics/data.md)4
-rw-r--r--website/content/sdk/guides/basics/_category_.json2
-rw-r--r--website/content/sdk/guides/basics/index.md (renamed from website/content/sdk/guides/basics/using.md)78
-rw-r--r--website/content/sdk/guides/basics/structure.md53
-rw-r--r--website/content/sdk/guides/intros/econometrics.md2
-rw-r--r--website/content/sdk/guides/intros/forecast.md34
-rw-r--r--website/content/sdk/guides/intros/portfolio/po.md4
-rw-r--r--website/content/sdk/guides/intros/quantitative-analysis.md5
-rw-r--r--website/content/sdk/guides/intros/stocks/dark-pool-shorts.md5
-rw-r--r--website/content/sdk/guides/intros/stocks/due-diligence.md2
-rw-r--r--website/content/sdk/guides/intros/stocks/options.md84
-rw-r--r--website/content/sdk/index.md2
-rw-r--r--website/content/sdk/quickstart/faq.md53
-rw-r--r--website/content/sdk/quickstart/installation.md8
-rw-r--r--website/content/sdk/quickstart/requirements.md36
-rw-r--r--website/content/terminal/guides/advanced/api-keys.md (renamed from website/content/terminal/guides/basics/keys.md)4
-rw-r--r--website/content/terminal/guides/advanced/changing-sources.md (renamed from website/content/terminal/guides/advanced/changing_sources.md)8
-rw-r--r--website/content/terminal/guides/advanced/customizing-the-terminal.md (renamed from website/content/terminal/guides/advanced/customizing_the_terminal.md)4
-rw-r--r--website/content/terminal/guides/advanced/data.md (renamed from website/content/terminal/guides/basics/data.md)6
-rw-r--r--website/content/terminal/guides/advanced/scripts-and-routines.md (renamed from website/content/terminal/guides/advanced/scripts_and_routines.md)8
-rw-r--r--website/content/terminal/guides/basics/index.md (renamed from website/content/terminal/guides/basics/menus_commands.md)42
-rw-r--r--website/content/terminal/guides/basics/structure.md19
-rw-r--r--website/content/terminal/guides/intros/common/ba.md16
-rw-r--r--website/content/terminal/guides/intros/common/qa.md6
-rw-r--r--website/content/terminal/guides/intros/common/ta.md4
-rw-r--r--website/content/terminal/guides/intros/crypto/dd.md4
-rw-r--r--website/content/terminal/guides/intros/crypto/defi.md2
-rw-r--r--website/content/terminal/guides/intros/crypto/disc.md2
-rw-r--r--website/content/terminal/guides/intros/crypto/index.md6
-rw-r--r--website/content/terminal/guides/intros/crypto/nft.md2
-rw-r--r--website/content/terminal/guides/intros/crypto/onchain.md6
-rw-r--r--website/content/terminal/guides/intros/crypto/ov.md2
-rw-r--r--website/content/terminal/guides/intros/economy.md6
-rw-r--r--website/content/terminal/guides/intros/etf.md83
-rw-r--r--website/content/terminal/guides/intros/forecast.md (renamed from website/content/terminal/guides/intros/forecasting.md)4
-rw-r--r--website/content/terminal/guides/intros/forex.md2
-rw-r--r--website/content/terminal/guides/intros/stocks/index.md36
-rw-r--r--website/content/terminal/guides/intros/stocks/sia.md9
-rw-r--r--website/content/terminal/index.md22
-rw-r--r--website/content/terminal/quickstart/faq.md47
-rw-r--r--website/content/terminal/quickstart/installation.md60
-rw-r--r--website/content/terminal/quickstart/requirements.md6
-rw-r--r--website/src/css/custom.css2
-rw-r--r--website/src/theme/Details/index.js15
-rw-r--r--website/src/theme/Details/styles.module.css19
-rw-r--r--website/src/theme/MDXComponents/Details.js16
-rw-r--r--website/src/theme/Tabs/index.js29
-rw-r--r--website/yarn.lock12822
72 files changed, 7115 insertions, 7119 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 8013f9608c6..74b41db9548 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -69,23 +69,14 @@ jobs:
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- run: poetry install --no-interaction --no-root
-
- - name: Install Extra Doc
- run: poetry install --no-interaction -E doc
-
- - name: Install Extra Optimization
run: poetry install --no-interaction -E optimization
- - name: Run Extra prediction
- run: poetry install --no-interaction -E prediction
-
- name: Run tests
env:
MPLBACKEND: Agg
run: |
source $VENV
- pytest tests/ --autodoc
+ pytest tests/ --optimization
- name: Start Terminal and exit
run: |
@@ -141,10 +132,7 @@ jobs:
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- run: poetry install --no-interaction --no-root
-
- - name: Install Package
- run: poetry install --no-interaction -E doc
+ run: poetry install --no-interaction -E optimization
- name: List installed packages
shell: bash -l {0}
@@ -157,7 +145,7 @@ jobs:
MPLBACKEND: Agg
run: |
source $VENV
- pytest tests/
+ pytest tests/ --optimization
- name: Start Terminal and exit
run: |
@@ -251,7 +239,6 @@ jobs:
shell: bash -l {0}
run: |
pip install --requirement requirements-full.txt
- pip install docstring_parser
- name: List installed packages (Bash)
shell: bash -l {0}
@@ -263,7 +250,7 @@ jobs:
env:
MPLBACKEND: Agg
shell: bash -l {0}
- run: pytest tests/ -m "not linux"
+ run: pytest tests/ -m "not linux" --optimization
- name: Start Terminal and exit
shell: bash -l {0}
diff --git a/README.md b/README.md
index 8433c9c75c4..d0492f8044e 100644
--- a/README.md
+++ b/README.md
@@ -98,14 +98,15 @@ If you wish to install the OpenBB Terminal or the OpenBB SDK, please use one of
|**OpenBB Terminal**|**Usage**|
|:-|:-|
-|[Installer](https://docs.openbb.co/terminal/quickstart/installation)|Recommended way if you just want to use the OpenBB Terminal|
-|[Docker](https://docs.openbb.co/terminal/quickstart/installation)|An alternative way if you just want to use the OpenBB Terminal|
-|[Python](https://docs.openbb.co/terminal/quickstart/installation)|If you wish to contribute to the development of the OpenBB Terminal|
+|[Windows Installer](https://docs.openbb.co/terminal/quickstart/installation?tab=windows)|Recommended way for Windows if you just want to use the OpenBB Terminal|
+|[MacOS Installer](https://docs.openbb.co/terminal/quickstart/installation?tab=mac)|Recommended way for MacOS if you just want to use the OpenBB Terminal|
+|[Docker](https://docs.openbb.co/terminal/quickstart/installation?tab=docker)|An alternative way if you just want to use the OpenBB Terminal|
+|[Python](https://docs.openbb.co/terminal/quickstart/installation?tab=python)|If you wish to contribute to the development of the OpenBB Terminal|
|**OpenBB SDK** &nbsp; &nbsp; &nbsp; &nbsp; |**Usage**|
|:-|:-|
|[PyPi](https://docs.openbb.co/sdk/quickstart/installation)|Recommended way if you just want to use the OpenBB SDK|
-|[Python](https://docs.openbb.co/sdk/quickstart/installation)|If you wish to contribute to the development of the OpenBB SDK &nbsp; &nbsp; &nbsp; &nbsp;|
+|[Python](https://docs.openbb.co/terminal/quickstart/installation?tab=python)|If you wish to contribute to the development of the OpenBB SDK &nbsp; &nbsp; &nbsp; &nbsp;|
## 3. Contributing
diff --git a/openbb_terminal/dashboards/dashboards_controller.py b/openbb_terminal/dashboards/dashboards_controller.py
index e81b7dd9d16..0b657707457 100644
--- a/openbb_terminal/dashboards/dashboards_controller.py
+++ b/openbb_terminal/dashboards/dashboards_controller.py
@@ -155,7 +155,7 @@ def create_call_voila(other_args: List[str], name: str, filename: str = None) ->
console.print(
f"Warning: opens a port on your computer to run a {cmd} server."
)
- response = input("Would you like us to run the server for you? y/n\n")
+ response = input("Would you like us to run the server for you [yn]? ")
args = ""
if ns_parser.dark and not ns_parser.jupyter:
args += "--theme=dark"
@@ -201,7 +201,7 @@ def create_call_streamlit(
console.print(
f"Warning: opens a port on your computer to run a {cmd} server."
)
- response = input("Would you like us to run the server for you? y/n\n")
+ response = input("Would you like us to run the server for you [yn]? ")
args = ""
if ns_parser.input or response.lower() == "y":
subprocess.Popen(
diff --git a/openbb_terminal/economy/economy_controller.py b/openbb_terminal/economy/economy_controller.py
index aed486baece..152a705de89 100644
--- a/openbb_terminal/economy/economy_controller.py
+++ b/openbb_terminal/economy/economy_controller.py
@@ -1034,7 +1034,9 @@ class EconomyController(BaseController):
if country == "united states":
fred_view.display_yield_curve(
- ns_parser.date,
+ date=ns_parser.date.strftime("%Y-%m-%d")
+ if ns_parser.date
+ else None,
raw=ns_parser.raw,
export=ns_parser.export,
)
diff --git a/openbb_terminal/economy/fred_model.py b/openbb_terminal/economy/fred_model.py
index 0f2b44bbe53..3f8dc3fba90 100644
--- a/openbb_terminal/economy/fred_model.py
+++ b/openbb_terminal/economy/fred_model.py
@@ -256,18 +256,18 @@ def get_aggregated_series_data(
@log_start_end(log=logger)
@check_api_key(["API_FRED_KEY"])
def get_yield_curve(
- date: datetime = None,
-) -> Tuple[pd.DataFrame, datetime]:
+ date: str = None,
+) -> Tuple[pd.DataFrame, str]:
"""Gets yield curve data from FRED
Parameters
----------
- date: datetime
- Date to get curve for. If None, gets most recent date
+ date: str
+ Date to get curve for. If None, gets most recent date (format yyyy-mm-dd)
Returns
-------
- Tuple[pd.DataFrame, datetime]
+ Tuple[pd.DataFrame, str]
Dataframe of yields and maturities,
Date for which the yield curve is obtained
@@ -300,17 +300,13 @@ def get_yield_curve(
df = pd.DataFrame()
if date is None:
- date_to_get = (datetime.now() - timedelta(days=7)).strftime("%Y-%m-%d")
- else:
- date_to_get = date.strftime("%Y-%m-%d")
+ date = (datetime.now() - timedelta(days=7)).strftime("%Y-%m-%d")
for key, s_id in fred_series.items():
df = pd.concat(
[
df,
- pd.DataFrame(
- fredapi_client.get_series(s_id, date_to_get), columns=[key]
- ),
+ pd.DataFrame(fredapi_client.get_series(s_id, date), columns=[key]),
],
axis=1,
)
diff --git a/openbb_terminal/economy/fred_view.py b/openbb_terminal/economy/fred_view.py
index c362d726eec..033a74b5bee 100644
--- a/openbb_terminal/economy/fred_view.py
+++ b/openbb_terminal/economy/fred_view.py
@@ -5,7 +5,6 @@ import logging
import os
import textwrap
from typing import Optional, List, Tuple
-from datetime import datetime
import matplotlib.pyplot as plt
import numpy as np
@@ -186,7 +185,7 @@ def format_data_to_plot(data: pd.DataFrame, detail: dict) -> Tuple[pd.DataFrame,
@log_start_end(log=logger)
@check_api_key(["API_FRED_KEY"])
def display_yield_curve(
- date: datetime = None,
+ date: str = None,
external_axes: Optional[List[plt.Axes]] = None,
raw: bool = False,
export: str = "",
@@ -195,16 +194,18 @@ def display_yield_curve(
Parameters
----------
- date: datetime
- Date to get