mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 13:32:08 +00:00
[Feature] Add support for multiple tags in historical_attributes and latest_attributes (#6013)
* historical attributes standard model - * add support multiple tags * add `tag` field in data * add support for multiple tags in historical attributes * set correct return type in `callback` function * latest attributes standard model - * add support for multiple tags * add `tag` field in data * add support for multiple tags in latest attributes * add test params for the attributes endpoints * add support for multiple `symbol` and add `symbol` field in the data * modified code to fetch data from multiple symbols and throw warning as per @deeleeramone * add params for testing multiple symbols * linting * fix test params * fixed condition to check if its a `Dict` type * updated intrinio fetcher tests for the statements * updated static
This commit is contained in:
@@ -999,7 +999,59 @@ def test_equity_fundamental_search_attributes(params, obb):
|
||||
"tag": "ebit",
|
||||
"frequency": "yearly",
|
||||
"limit": 1000,
|
||||
"type": None,
|
||||
"tag_type": None,
|
||||
"start_date": "2013-01-01",
|
||||
"end_date": "2023-01-01",
|
||||
"sort": "desc",
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": "AAPL",
|
||||
"tag": "ebit,ebitda,marketcap",
|
||||
"frequency": "yearly",
|
||||
"limit": 1000,
|
||||
"tag_type": None,
|
||||
"start_date": "2013-01-01",
|
||||
"end_date": "2023-01-01",
|
||||
"sort": "desc",
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": "AAPL",
|
||||
"tag": ["ebit", "ebitda", "marketcap"],
|
||||
"frequency": "yearly",
|
||||
"limit": 1000,
|
||||
"tag_type": None,
|
||||
"start_date": "2013-01-01",
|
||||
"end_date": "2023-01-01",
|
||||
"sort": "desc",
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": "AAPL,MSFT",
|
||||
"tag": "ebit,ebitda,marketcap",
|
||||
"frequency": "yearly",
|
||||
"limit": 1000,
|
||||
"tag_type": None,
|
||||
"start_date": "2013-01-01",
|
||||
"end_date": "2023-01-01",
|
||||
"sort": "desc",
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": ["AAPL", "MSFT"],
|
||||
"tag": ["ebit", "ebitda", "marketcap"],
|
||||
"frequency": "yearly",
|
||||
"limit": 1000,
|
||||
"tag_type": None,
|
||||
"start_date": "2013-01-01",
|
||||
"end_date": "2023-01-01",
|
||||
"sort": "desc",
|
||||
@@ -1018,12 +1070,6 @@ def test_equity_fundamental_historical_attributes(params, obb):
|
||||
@parametrize(
|
||||
"params",
|
||||
[
|
||||
(
|
||||
{
|
||||
"symbol": "AAPL",
|
||||
"tag": "ceo",
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
@@ -1034,10 +1080,38 @@ def test_equity_fundamental_historical_attributes(params, obb):
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": "MSFT",
|
||||
"symbol": "AAPL",
|
||||
"tag": "ebitda",
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": "AAPL",
|
||||
"tag": "ceo,ebitda",
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": "AAPL",
|
||||
"tag": ["ceo", "ebitda"],
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": "AAPL,MSFT",
|
||||
"tag": ["ceo", "ebitda"],
|
||||
}
|
||||
),
|
||||
(
|
||||
{
|
||||
"provider": "intrinio",
|
||||
"symbol": ["AAPL", "MSFT"],
|
||||
"tag": ["ceo", "ebitda"],
|
||||
}
|
||||
),
|
||||
],
|
||||
)
|
||||
@pytest.mark.integration
|
||||
|
||||
Reference in New Issue
Block a user