Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/cboe-async: Refactor Cboe for Async #5900

Merged
merged 47 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0a9915a
refactor cboe for async
deeleeramone Dec 18, 2023
de32b32
codespell
deeleeramone Dec 18, 2023
a6a4a8d
unused imports
deeleeramone Dec 18, 2023
3c007eb
Merge branch 'develop' into feature/cboe-async
deeleeramone Dec 18, 2023
e71bada
pylint
deeleeramone Dec 18, 2023
b2adba4
more pylint
deeleeramone Dec 18, 2023
c7adafa
platform metadata
deeleeramone Dec 18, 2023
8502f7b
classmethod decorator
deeleeramone Dec 18, 2023
84128d1
test params
deeleeramone Dec 18, 2023
21dd848
intrinio quote
deeleeramone Dec 18, 2023
f7b871a
test param names
deeleeramone Dec 18, 2023
77cd6ad
Merge branch 'develop' into feature/cboe-async
deeleeramone Dec 19, 2023
d007506
Merge branch 'develop' of https://github.com/OpenBB-finance/OpenBBTer…
deeleeramone Dec 19, 2023
c976830
date in test needs to be a datetime.date not string
deeleeramone Dec 19, 2023
cfe9224
Merge branch 'feature/cboe-async' of https://github.com/OpenBB-financ…
deeleeramone Dec 19, 2023
8346fd2
make fmp unix timestamp tz-aware and normalize percent change
deeleeramone Dec 21, 2023
e55fcf4
different way of parsing datetime string
deeleeramone Dec 21, 2023
83c447d
recapture cboe equity historical test
deeleeramone Dec 21, 2023
2d7576d
unused import
deeleeramone Dec 21, 2023
8303b00
index snapshot update
deeleeramone Dec 27, 2023
03a1a41
Merge branch 'develop' into feature/cboe-async
deeleeramone Dec 30, 2023
e2d8c97
black
deeleeramone Jan 2, 2024
ec780a5
extension map
deeleeramone Jan 2, 2024
c5c45a2
pylint
deeleeramone Jan 2, 2024
e5aa221
Merge branch 'develop' into feature/cboe-async
deeleeramone Jan 3, 2024
53cdf1b
merge branch develop
deeleeramone Jan 6, 2024
ab524db
cboe pyproject.toml
deeleeramone Jan 6, 2024
961b0e5
proposal to standardize equity_quote
deeleeramone Jan 6, 2024
023c134
one more file
deeleeramone Jan 6, 2024
476677d
merge branch develop
deeleeramone Jan 10, 2024
425b842
unused import
deeleeramone Jan 10, 2024
426db48
Merge branch 'develop' into feature/cboe-async
deeleeramone Jan 12, 2024
e6c4e64
Merge branch 'develop' into feature/cboe-async
deeleeramone Jan 14, 2024
f1a5d7b
Merge branch 'develop' into feature/cboe-async
deeleeramone Jan 16, 2024
364828b
removing changes on static assets
hjoaquim Jan 16, 2024
f711d5d
merge branch develop
deeleeramone Jan 19, 2024
96f5689
index_historical
deeleeramone Jan 19, 2024
2e53fbc
index_historical again
deeleeramone Jan 19, 2024
dbc91d0
last_time -> last_timestamp
deeleeramone Jan 19, 2024
0db7e4b
obsolete router path
deeleeramone Jan 19, 2024
5401548
fix tests
deeleeramone Jan 19, 2024
3e546ff
test param
deeleeramone Jan 19, 2024
84fee44
merge branch develop
deeleeramone Jan 21, 2024
51ec009
restore market index deprecation that I forgot about
deeleeramone Jan 21, 2024
92400f4
Merge branch 'develop' into feature/cboe-async
hjoaquim Jan 22, 2024
2a48b7e
fixing tests
hjoaquim Jan 22, 2024
7842930
Merge branch 'develop' into feature/cboe-async
hjoaquim Jan 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import List, Optional, Set, Union

from dateutil import parser
from pydantic import Field, PositiveFloat, field_validator
from pydantic import Field, field_validator

from openbb_core.provider.abstract.data import Data
from openbb_core.provider.abstract.query_params import QueryParams
Expand Down Expand Up @@ -47,17 +47,24 @@ def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
class EquityHistoricalData(Data):
"""Equity Historical Price Data."""

date: datetime = Field(description=DATA_DESCRIPTIONS.get("date", ""))
open: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("open", ""))
high: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("high", ""))
low: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("low", ""))
close: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("close", ""))
volume: Union[float, int] = Field(description=DATA_DESCRIPTIONS.get("volume", ""))
vwap: Optional[PositiveFloat] = Field(
date: Union[dateType, datetime] = Field(
description=DATA_DESCRIPTIONS.get("date", "")
)
open: float = Field(description=DATA_DESCRIPTIONS.get("open", ""))
high: float = Field(description=DATA_DESCRIPTIONS.get("high", ""))
low: float = Field(description=DATA_DESCRIPTIONS.get("low", ""))
close: float = Field(description=DATA_DESCRIPTIONS.get("close", ""))
volume: Optional[Union[float, int]] = Field(
default=None, description=DATA_DESCRIPTIONS.get("volume", "")
)
vwap: Optional[float] = Field(
default=None, description=DATA_DESCRIPTIONS.get("vwap", "")
)

@field_validator("date", mode="before", check_fields=False)
def date_validate(cls, v): # pylint: disable=E0213
"""Return formatted datetime."""
return parser.isoparse(str(v))
v = parser.isoparse(str(v))
if v.hour == 0 and v.minute == 0:
return v.date()
return v

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Index Constituents Standard Model."""


from datetime import date
from typing import List, Literal, Optional, Set, Union
from typing import List, Optional, Set, Union

from pydantic import Field, field_validator

Expand All @@ -14,37 +13,17 @@
class IndexConstituentsQueryParams(QueryParams):
"""Index Constituents Query."""

index: Literal["nasdaq", "sp500", "dowjones"] = Field(
default="dowjones",
description="Index for which we want to fetch the constituents.",
index: str = Field(
description="Index to fetch the constituents of.",
)


class IndexConstituentsData(Data):
"""Index Constituents Data."""

symbol: str = Field(description=DATA_DESCRIPTIONS.get("symbol", ""))
name: str = Field(description="Name of the constituent company in the index.")
sector: str = Field(
description="Sector the constituent company in the index belongs to."
)
sub_sector: Optional[str] = Field(
default=None,
description="Sub-sector the constituent company in the index belongs to.",
)
headquarter: Optional[str] = Field(
default=None,
description="Location of the headquarter of the constituent company in the index.",
)
date_first_added: Optional[Union[date, str]] = Field(
default=None, description="Date the constituent company was added to the index."
)
cik: int = Field(
description=DATA_DESCRIPTIONS.get("cik", ""),
)
founded: Optional[Union[date, str]] = Field(
default=None,
description="Founding year of the constituent company in the index.",
name: Optional[str] = Field(
default=None, description="Name of the constituent company in the index."
)

@field_validator("symbol", mode="before", check_fields=False)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Index Snapshots Standard Model."""

from typing import Literal, Optional
from typing import Optional

from pydantic import Field

Expand All @@ -12,8 +12,8 @@
class IndexSnapshotsQueryParams(QueryParams):
"""Index Snapshots Query."""

region: Optional[Literal["US", "EU"]] = Field(
description="The region to return. Currently supports US and EU.", default="US"
region: Optional[str] = Field(
default=None, description="The region to return data for - i.e. 'us' or 'eu'."
)


Expand All @@ -38,10 +38,16 @@ class IndexSnapshotsData(Data):
close: Optional[float] = Field(
default=None, description=DATA_DESCRIPTIONS.get("close", "")
)
volume: Optional[int] = Field(
default=None, description=DATA_DESCRIPTIONS.get("volume", "")
)
prev_close: Optional[float] = Field(
default=None, description="Previous closing price of the index."
default=None, description=DATA_DESCRIPTIONS.get("prev_close", "")
)
change: Optional[float] = Field(
default=None, description="Change in value of the index."
)
change: Optional[float] = Field(default=None, description="Change of the index.")
change_percent: Optional[float] = Field(
default=None, description="Change percent of the index."
default=None,
description="Change, in normalized percentage points, of the index.",
)
Loading
Loading