mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-07 01:41:17 +00:00
[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:
@@ -21,8 +21,9 @@ def obb(pytestconfig): # pylint: disable=inconsistent-return-statements
|
||||
@parametrize(
|
||||
"params",
|
||||
[
|
||||
({"index": "dowjones", "provider": "fmp"}),
|
||||
({"index": "BUKBUS", "provider": "cboe"}),
|
||||
({"symbol": "dowjones", "provider": "fmp"}),
|
||||
({"symbol": "BUKBUS", "provider": "cboe"}),
|
||||
({"symbol": "^TX60", "provider": "tmx", "use_cache": False}),
|
||||
],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
@@ -275,6 +276,7 @@ def test_index_market(params, obb):
|
||||
({"provider": "cboe", "use_cache": False}),
|
||||
({"provider": "fmp"}),
|
||||
({"provider": "yfinance"}),
|
||||
({"provider": "tmx", "use_cache": False}),
|
||||
],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
@@ -288,7 +290,14 @@ def test_index_available(params, obb):
|
||||
@parametrize(
|
||||
"params",
|
||||
[
|
||||
({"query": "D", "is_symbol": True, "use_cache": False, "provider": "cboe"}),
|
||||
(
|
||||
{
|
||||
"query": "D",
|
||||
"is_symbol": True,
|
||||
"provider": "cboe",
|
||||
"use_cache": False,
|
||||
}
|
||||
),
|
||||
],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
@@ -303,6 +312,7 @@ def test_index_search(params, obb):
|
||||
"params",
|
||||
[
|
||||
({"region": "us", "provider": "cboe"}),
|
||||
({"provider": "tmx", "region": "ca", "use_cache": False}),
|
||||
],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
@@ -334,3 +344,17 @@ def test_index_sp500_multiples(params, obb):
|
||||
assert result
|
||||
assert isinstance(result, OBBject)
|
||||
assert len(result.results) > 0
|
||||
|
||||
|
||||
@parametrize(
|
||||
"params",
|
||||
[
|
||||
({"symbol": "^TX60", "provider": "tmx"}),
|
||||
],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
def test_index_sectors(params, obb):
|
||||
result = obb.index.sectors(**params)
|
||||
assert result
|
||||
assert isinstance(result, OBBject)
|
||||
assert len(result.results) > 0
|
||||
|
||||
Reference in New Issue
Block a user