-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 <[email protected]>
- Loading branch information
1 parent
246f3b0
commit dd42f7a
Showing
30 changed files
with
21,897 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
openbb_platform/core/openbb_core/provider/standard_models/petroleum_status_report.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""Petroleum Status Report Standard Model.""" | ||
|
||
from datetime import date as dateType | ||
from typing import Optional, Union | ||
|
||
from pydantic import Field | ||
|
||
from openbb_core.provider.abstract.data import Data | ||
from openbb_core.provider.abstract.query_params import QueryParams | ||
from openbb_core.provider.utils.descriptions import ( | ||
DATA_DESCRIPTIONS, | ||
QUERY_DESCRIPTIONS, | ||
) | ||
|
||
|
||
class PetroleumStatusReportQueryParams(QueryParams): | ||
"""Petroleum Status Report Query.""" | ||
|
||
start_date: Optional[dateType] = Field( | ||
default=None, | ||
description=QUERY_DESCRIPTIONS.get("start_date", ""), | ||
) | ||
end_date: Optional[dateType] = Field( | ||
default=None, | ||
description=QUERY_DESCRIPTIONS.get("end_date", ""), | ||
) | ||
|
||
|
||
class PetroleumStatusReportData(Data): | ||
"""Petroleum Status Report Data.""" | ||
|
||
date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", "")) | ||
table: Optional[str] = Field(description="Table name for the data.") | ||
symbol: str = Field(description=DATA_DESCRIPTIONS.get("symbol", "")) | ||
order: Optional[int] = Field( | ||
default=None, description="Presented order of the data, relative to the table." | ||
) | ||
title: Optional[str] = Field(default=None, description="Title of the data.") | ||
value: Union[int, float] = Field(description="Value of the data.") | ||
unit: Optional[str] = Field(default=None, description="Unit or scale of the data.") |
40 changes: 40 additions & 0 deletions
40
openbb_platform/core/openbb_core/provider/standard_models/short_term_energy_outlook.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""Short Term Energy Outlook Standard Model.""" | ||
|
||
from datetime import date as dateType | ||
from typing import Optional, Union | ||
|
||
from pydantic import Field | ||
|
||
from openbb_core.provider.abstract.data import Data | ||
from openbb_core.provider.abstract.query_params import QueryParams | ||
from openbb_core.provider.utils.descriptions import ( | ||
DATA_DESCRIPTIONS, | ||
QUERY_DESCRIPTIONS, | ||
) | ||
|
||
|
||
class ShortTermEnergyOutlookQueryParams(QueryParams): | ||
"""Short Term Energy Outlook Query.""" | ||
|
||
start_date: Optional[dateType] = Field( | ||
default=None, | ||
description=QUERY_DESCRIPTIONS.get("start_date", ""), | ||
) | ||
end_date: Optional[dateType] = Field( | ||
default=None, | ||
description=QUERY_DESCRIPTIONS.get("end_date", ""), | ||
) | ||
|
||
|
||
class ShortTermEnergyOutlookData(Data): | ||
"""Short Term Energy Outlook Data.""" | ||
|
||
date: dateType = Field(description=DATA_DESCRIPTIONS.get("date", "")) | ||
table: Optional[str] = Field(default=None, description="Table name for the data.") | ||
symbol: str = Field(description=DATA_DESCRIPTIONS.get("symbol", "")) | ||
order: Optional[int] = Field( | ||
default=None, description="Presented order of the data, relative to the table." | ||
) | ||
title: Optional[str] = Field(default=None, description="Title of the data.") | ||
value: Union[int, float] = Field(description="Value of the data.") | ||
unit: Optional[str] = Field(default=None, description="Unit or scale of the data.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.