[Feature] Add EIA Daily Spot Prices Data via FRED (#6677)

* add EIA daily spot prices data via FRED

* line too long

* comment out the test skipped test

* fix test?

* delete commented out sections

* unused argument

* name things like Minh says

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
This commit is contained in:
Danglewood
2024-10-03 12:47:44 -07:00
committed by GitHub
parent c786852080
commit b9de848bc3
17 changed files with 1273 additions and 518 deletions

View File

@@ -20,32 +20,23 @@ def obb(pytestconfig): # pylint: disable=inconsistent-return-statements
[
(
{
"asset": "gold",
"commodity": "all",
"start_date": None,
"end_date": None,
"collapse": None,
"frequency": None,
"transform": None,
"provider": "nasdaq",
}
),
(
{
"asset": "silver",
"start_date": "1990-01-01",
"end_date": "2023-01-01",
"collapse": "monthly",
"transform": "diff",
"provider": "nasdaq",
"aggregation_method": None,
"provider": "fred",
}
),
],
)
@pytest.mark.integration
def test_commodity_lbma_fixing(params, obb):
"""Test the LBMA fixing endpoint."""
def test_commodity_price_spot(params, obb):
"""Test the commodity spot prices endpoint."""
params = {p: v for p, v in params.items() if v}
result = obb.commodity.lbma_fixing(**params)
result = obb.commodity.price.spot(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0