[Enhancement]: Add TMX data provider extension. (#5913)

* dev install

* add TMX provider extension

* normalize ytm and coupopn_rate values

* black

* codespell

* ruff

* black again

* pylint

* ftw

* undo what Pylint thinks is best

* more black

* renovate insider_trading standard model

* fix tests

* typo

* tests

* empty string

* pylint unused argument

* nans for some reason

* black

* static files

* static files with openbb-tmx installed this time

* yfinance TypeError..?

* NA -> N/A

* update for version bump

* list exchange-calendars as tmx dependency

* eod chains date -> eod_date

* new line

* not that file

* more black

* one more black

* fix weird merge thing

* ruff

* index constituents params

* insider trading

* fixing things

* black

* black AGAIN

* news integration params

* the other missing param

* ruff

* historical dividends field update

* add json_schema_extra

* gainers

* symbols -> symbol

* company news symbol

* unit test param

* review items

* wrangle a rogue field

* index router example

* company news thing - symbols -> symbol

* field name map

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
Danglewood
2024-02-20 06:41:26 -08:00
committed by GitHub
parent 7d84690316
commit fe3fa6af8e
90 changed files with 256717 additions and 483 deletions

View File

@@ -22,6 +22,15 @@ def obb(pytestconfig): # pylint: disable=inconsistent-return-statements
"params",
[
({"query": None, "provider": "fmp"}),
(
{
"query": "vanguard",
"provider": "tmx",
"div_freq": "quarterly",
"sort_by": "return_1y",
"use_cache": False,
}
),
],
)
@pytest.mark.integration
@@ -69,7 +78,7 @@ def test_etf_historical(params, obb):
"params",
[
({"symbol": "IOO", "provider": "fmp"}),
({"symbol": "MISL", "provider": "fmp"}),
({"symbol": "XIU", "provider": "tmx", "use_cache": False}),
({"symbol": "QQQ", "provider": "yfinance"}),
],
)
@@ -87,7 +96,7 @@ def test_etf_info(params, obb):
"params",
[
({"symbol": "IOO", "provider": "fmp"}),
({"symbol": "MISL", "provider": "fmp"}),
({"symbol": "XIU", "provider": "tmx", "use_cache": False}),
],
)
@pytest.mark.integration
@@ -151,6 +160,13 @@ def test_etf_holdings_date(params, obb):
"use_cache": False,
}
),
(
{
"symbol": "XIU",
"provider": "tmx",
"use_cache": False,
}
),
],
)
@pytest.mark.integration
@@ -182,7 +198,10 @@ def test_etf_price_performance(params, obb):
@parametrize(
"params",
[({"symbol": "IOO"})],
[
({"symbol": "IOO", "provider": "fmp"}),
({"symbol": "XIU", "provider": "tmx", "use_cache": False}),
],
)
@pytest.mark.integration
def test_etf_countries(params, obb):