[Feature] Add EIA Provider & Weekly Petroleum Status Report (#6693)

* add eia provider and weekly petroleum status report

* codespell

* sort imports

* lint and update lock

* move raise up in try block

* add STEO

* steo tests

* linting

* mypy

* readme and docstring grammar police

* fix test..?

* add symbol field to steo

* static files

* update integration test

* mypy

* pylint

* fix test..?

* undo attempt to fix test

* add empty init file

* add empty init file

* change package name so the tests don't fail

* some updates

* lint

---------

Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
This commit is contained in:
Danglewood
2024-10-31 06:46:04 -07:00
committed by GitHub
parent 246f3b0497
commit dd42f7aa5e
30 changed files with 21897 additions and 0 deletions

View File

@@ -40,3 +40,61 @@ def test_commodity_price_spot(params, obb):
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
@pytest.mark.parametrize(
"params",
[
(
{
"category": "balance_sheet",
"table": "stocks",
"start_date": None,
"end_date": None,
"provider": "eia",
"use_cache": True,
}
),
(
{
"category": "weekly_estimates",
"table": "crude_production",
"start_date": "2020-01-01",
"end_date": "2023-12-31",
"provider": "eia",
"use_cache": True,
}
),
],
)
@pytest.mark.integration
def test_commodity_petroleum_status_report(params, obb):
"""Test Commodity Petroleum Status Report endpoint."""
result = obb.commodity.petroleum_status_report(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
@pytest.mark.parametrize(
"params",
[
(
{
"table": "01",
"symbol": None,
"start_date": "2024-09-01",
"end_date": "2024-10-01",
"provider": "eia",
"frequency": "month",
}
),
],
)
@pytest.mark.integration
def test_commodity_short_term_energy_outlook(params, obb):
"""Test Commodity Short Term Energy Outlook endpoint."""
result = obb.commodity.short_term_energy_outlook(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0