From 324d2abd664c7915222ee656844b32af5d8ae84a Mon Sep 17 00:00:00 2001 From: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:08:15 +0000 Subject: [PATCH] sync descriptions (#5893) --- .../openbb/package/crypto_price.py | 5 ++--- .../openbb/package/currency_price.py | 2 +- .../openbb/package/equity_calendar.py | 4 ++-- .../openbb/package/equity_fundamental.py | 6 ++---- .../openbb/package/equity_ownership.py | 2 +- .../openbb/package/equity_price.py | 2 +- .../openbb/package/fixedincome_corporate.py | 2 ++ openbb_platform/openbb/package/index.py | 9 +++++---- openbb_platform/openbb/package/news.py | 19 +++++++------------ .../openbb_benzinga/models/company_news.py | 6 +++--- .../openbb_benzinga/models/world_news.py | 2 +- .../openbb_fmp/models/crypto_historical.py | 3 ++- .../openbb_fmp/models/currency_historical.py | 3 ++- .../openbb_fmp/models/equity_historical.py | 3 ++- .../fmp/openbb_fmp/models/market_indices.py | 3 ++- .../fmp/openbb_fmp/models/world_news.py | 2 +- .../openbb_intrinio/models/company_news.py | 2 +- .../openbb_tiingo/models/company_news.py | 2 +- .../openbb_tiingo/models/crypto_historical.py | 4 +++- .../tiingo/openbb_tiingo/models/world_news.py | 2 +- 20 files changed, 42 insertions(+), 41 deletions(-) diff --git a/openbb_platform/openbb/package/crypto_price.py b/openbb_platform/openbb/package/crypto_price.py index ef6bf0fe6d6..0d89780fe04 100644 --- a/openbb_platform/openbb/package/crypto_price.py +++ b/openbb_platform/openbb/package/crypto_price.py @@ -105,7 +105,7 @@ class ROUTER_crypto_price(Container): vwap : Optional[Annotated[float, Gt(gt=0)]] Volume Weighted Average Price over the period. adj_close : Optional[float] - Adjusted Close Price of the symbol. (provider: fmp) + The adjusted close price. (provider: fmp) unadjusted_volume : Optional[float] Unadjusted volume of the symbol. (provider: fmp) change : Optional[float] @@ -117,8 +117,7 @@ class ROUTER_crypto_price(Container): change_over_time : Optional[float] Change % in the price of the symbol over a period of time. (provider: fmp) transactions : Optional[Union[Annotated[int, Gt(gt=0)], int]] - Number of transactions for the symbol in the time period. (provider: polygon); - Number of trades. (provider: tiingo) + Number of transactions for the symbol in the time period. (provider: polygon, tiingo) volume_notional : Optional[float] The last size done for the asset on the specific date in the quote currency. The volume of the asset on the specific date in the quote currency. (provider: tiingo) diff --git a/openbb_platform/openbb/package/currency_price.py b/openbb_platform/openbb/package/currency_price.py index 744c4acb925..0a92ae32dee 100644 --- a/openbb_platform/openbb/package/currency_price.py +++ b/openbb_platform/openbb/package/currency_price.py @@ -101,7 +101,7 @@ class ROUTER_currency_price(Container): vwap : Optional[Annotated[float, Gt(gt=0)]] Volume Weighted Average Price over the period. adj_close : Optional[float] - Adjusted Close Price of the symbol. (provider: fmp) + The adjusted close price. (provider: fmp) unadjusted_volume : Optional[float] Unadjusted volume of the symbol. (provider: fmp) change : Optional[float] diff --git a/openbb_platform/openbb/package/equity_calendar.py b/openbb_platform/openbb/package/equity_calendar.py index 1cbb2438ad1..42c0e0852e7 100644 --- a/openbb_platform/openbb/package/equity_calendar.py +++ b/openbb_platform/openbb/package/equity_calendar.py @@ -165,9 +165,9 @@ class ROUTER_equity_calendar(Container): The earnings-per-share from the same previously reported period. eps_consensus : Optional[float] The analyst conesus earnings-per-share estimate. - actual_eps : Optional[float] + eps_actual : Optional[float] The actual earnings per share announced. (provider: fmp) - actual_revenue : Optional[float] + revenue_actual : Optional[float] The actual reported revenue. (provider: fmp) revenue_consensus : Optional[float] The revenue forecast consensus. (provider: fmp) diff --git a/openbb_platform/openbb/package/equity_fundamental.py b/openbb_platform/openbb/package/equity_fundamental.py index ebc9cfad055..f5c6e74f897 100644 --- a/openbb_platform/openbb/package/equity_fundamental.py +++ b/openbb_platform/openbb/package/equity_fundamental.py @@ -1216,11 +1216,9 @@ class ROUTER_equity_fundamental(Container): Actual EPS from the earnings date. eps_estimated : Optional[float] Estimated EPS for the earnings date. - actual_eps : Optional[float] - The actual earnings per share announced. (provider: fmp) revenue_estimated : Optional[float] Estimated consensus revenue for the reporting period. (provider: fmp) - actual_revenue : Optional[float] + revenue_actual : Optional[float] The actual reported revenue. (provider: fmp) reporting_time : Optional[str] The reporting time - e.g. after market close. (provider: fmp) @@ -1759,7 +1757,7 @@ class ROUTER_equity_fundamental(Container): Name of the key executive. pay : Optional[int] Pay of the key executive. - currency_pay : str + currency_pay : Optional[str] Currency of the pay. gender : Optional[str] Gender of the key executive. diff --git a/openbb_platform/openbb/package/equity_ownership.py b/openbb_platform/openbb/package/equity_ownership.py index 93a9d994635..ecaede273ae 100644 --- a/openbb_platform/openbb/package/equity_ownership.py +++ b/openbb_platform/openbb/package/equity_ownership.py @@ -93,7 +93,7 @@ class ROUTER_equity_ownership(Container): Transaction type of the insider trading. acquisition_or_disposition : Optional[str] Acquisition or disposition of the insider trading. - security_type : str + security_type : Optional[str] Security type of the insider trading. securities_owned : Optional[float] Number of securities owned in the insider trading. diff --git a/openbb_platform/openbb/package/equity_price.py b/openbb_platform/openbb/package/equity_price.py index 62c141c9b11..7ecbb69b09b 100644 --- a/openbb_platform/openbb/package/equity_price.py +++ b/openbb_platform/openbb/package/equity_price.py @@ -113,7 +113,7 @@ class ROUTER_equity_price(Container): label : Optional[str] Human readable format of the date. (provider: fmp) adj_close : Optional[float] - Adjusted Close Price of the symbol. (provider: fmp); + The adjusted close price. (provider: fmp); Adjusted closing price during the period. (provider: intrinio); Adjusted closing price during the period. (provider: tiingo) unadjusted_volume : Optional[float] diff --git a/openbb_platform/openbb/package/fixedincome_corporate.py b/openbb_platform/openbb/package/fixedincome_corporate.py index a7598bf3687..9c6eef19c94 100644 --- a/openbb_platform/openbb/package/fixedincome_corporate.py +++ b/openbb_platform/openbb/package/fixedincome_corporate.py @@ -178,6 +178,8 @@ class ROUTER_fixedincome_corporate(Container): Maturity. yield_curve : Literal['spot', 'par'] The yield curve type. + series_id : Optional[str] + FRED series id. (provider: fred) Example ------- diff --git a/openbb_platform/openbb/package/index.py b/openbb_platform/openbb/package/index.py index b67239ffc65..d9ff49dfccd 100644 --- a/openbb_platform/openbb/package/index.py +++ b/openbb_platform/openbb/package/index.py @@ -189,13 +189,14 @@ class ROUTER_index(Container): Number of days to look back. (provider: fmp) interval : Literal['1min', '5min', '15min', '30min', '1hour', '4hour', '1day'] Data granularity. (provider: fmp) + sort : Literal['asc', 'desc'] + Sort the data in ascending or descending order. (provider: fmp); + Sort order. (provider: intrinio); + Sort order of the data. (provider: polygon) tag : Optional[str] Index tag. (provider: intrinio) type : Optional[str] Index type. (provider: intrinio) - sort : Literal['asc', 'desc'] - Sort order. (provider: intrinio); - Sort order of the data. (provider: polygon) limit : int The number of data entries to return. (provider: intrinio, polygon) timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] @@ -234,7 +235,7 @@ class ROUTER_index(Container): volume : Optional[int] The trading volume. adj_close : Optional[float] - Adjusted Close Price of the symbol. (provider: fmp) + The adjusted close price. (provider: fmp) unadjusted_volume : Optional[float] Unadjusted volume of the symbol. (provider: fmp) change : Optional[float] diff --git a/openbb_platform/openbb/package/news.py b/openbb_platform/openbb/package/news.py index a5c50873980..3047ee44630 100644 --- a/openbb_platform/openbb/package/news.py +++ b/openbb_platform/openbb/package/news.py @@ -115,17 +115,13 @@ class ROUTER_news(Container): url : str URL of the news. id : Optional[str] - ID of the news. (provider: benzinga); - Intrinio ID for the article. (provider: intrinio); - Article ID. (provider: polygon) + Article ID. (provider: benzinga, intrinio, polygon) author : Optional[str] - Author of the news. (provider: benzinga); - Author of the article. (provider: polygon) + Author of the article. (provider: benzinga, polygon) teaser : Optional[str] Teaser of the news. (provider: benzinga) images : Optional[Union[List[Dict[str, str]], List[str], str]] - Images associated with the news. (provider: benzinga); - URL to the images of the news. (provider: fmp) + URL to the images of the news. (provider: benzinga, fmp) channels : Optional[str] Channels associated with the news. (provider: benzinga) stocks : Optional[str] @@ -135,7 +131,8 @@ class ROUTER_news(Container): updated : Optional[datetime] Updated date of the news. (provider: benzinga) site : Optional[str] - Name of the news source. (provider: fmp, tiingo) + Name of the news source. (provider: fmp); + News source. (provider: tiingo) amp_url : Optional[str] AMP URL. (provider: polygon) image_url : Optional[str] @@ -249,8 +246,7 @@ class ROUTER_news(Container): url : Optional[str] URL of the news. id : Optional[str] - ID of the news. (provider: benzinga); - Article ID. (provider: intrinio) + Article ID. (provider: benzinga, intrinio) author : Optional[str] Author of the news. (provider: benzinga) teaser : Optional[str] @@ -264,8 +260,7 @@ class ROUTER_news(Container): updated : Optional[datetime] Updated date of the news. (provider: benzinga) site : Optional[str] - Site of the news. (provider: fmp); - Name of the news source. (provider: tiingo) + News source. (provider: fmp, tiingo) company : Optional[Dict[str, Any]] Company details related to the news article. (provider: intrinio) symbols : Optional[str] diff --git a/openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py b/openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py index df9d530d466..964e077af08 100644 --- a/openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py +++ b/openbb_platform/providers/benzinga/openbb_benzinga/models/company_news.py @@ -88,11 +88,11 @@ class BenzingaCompanyNewsData(CompanyNewsData): "images": "image", } - id: str = Field(description="ID of the news.") - author: Optional[str] = Field(default=None, description="Author of the news.") + id: str = Field(description="Article ID.") + author: Optional[str] = Field(default=None, description="Author of the article.") teaser: Optional[str] = Field(description="Teaser of the news.", default=None) images: Optional[List[Dict[str, str]]] = Field( - default=None, description="Images associated with the news." + default=None, description="URL to the images of the news." ) channels: Optional[str] = Field( default=None, diff --git a/openbb_platform/providers/benzinga/openbb_benzinga/models/world_news.py b/openbb_platform/providers/benzinga/openbb_benzinga/models/world_news.py index af4fbcd8e3d..52a34558cc2 100644 --- a/openbb_platform/providers/benzinga/openbb_benzinga/models/world_news.py +++ b/openbb_platform/providers/benzinga/openbb_benzinga/models/world_news.py @@ -81,7 +81,7 @@ class BenzingaWorldNewsData(WorldNewsData): __alias_dict__ = {"date": "created", "text": "body", "images": "image"} - id: str = Field(description="ID of the news.") + id: str = Field(description="Article ID.") author: Optional[str] = Field(default=None, description="Author of the news.") teaser: Optional[str] = Field(description="Teaser of the news.", default=None) channels: Optional[str] = Field( diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py index 9e348f9d4f1..90da913e00a 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py @@ -10,6 +10,7 @@ from openbb_core.provider.standard_models.crypto_historical import ( CryptoHistoricalData, CryptoHistoricalQueryParams, ) +from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS from openbb_core.provider.utils.helpers import get_querystring from openbb_fmp.utils.helpers import get_data_many from pydantic import Field, NonNegativeInt @@ -37,7 +38,7 @@ class FMPCryptoHistoricalData(CryptoHistoricalData): """FMP Crypto Historical Price Data.""" adj_close: Optional[float] = Field( - default=None, description="Adjusted Close Price of the symbol." + default=None, description=DATA_DESCRIPTIONS.get("adj_close", "") ) unadjusted_volume: Optional[float] = Field( default=None, description="Unadjusted volume of the symbol." diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py index b05e4086ebe..dbdd905f623 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py @@ -10,6 +10,7 @@ from openbb_core.provider.standard_models.currency_historical import ( CurrencyHistoricalData, CurrencyHistoricalQueryParams, ) +from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS from openbb_fmp.utils.helpers import get_data_many, get_querystring from pydantic import Field @@ -31,7 +32,7 @@ class FMPCurrencyHistoricalData(CurrencyHistoricalData): """FMP Currency Historical Price Data.""" adj_close: Optional[float] = Field( - default=None, description="Adjusted Close Price of the symbol." + default=None, description=DATA_DESCRIPTIONS.get("adj_close", "") ) unadjusted_volume: Optional[float] = Field( default=None, description="Unadjusted volume of the symbol." diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/equity_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/equity_historical.py index c42f8a74627..43b83d78e50 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/equity_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/equity_historical.py @@ -9,6 +9,7 @@ from openbb_core.provider.standard_models.equity_historical import ( EquityHistoricalData, EquityHistoricalQueryParams, ) +from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS from openbb_core.provider.utils.helpers import ( ClientResponse, amake_requests, @@ -43,7 +44,7 @@ class FMPEquityHistoricalData(EquityHistoricalData): default=None, description="Human readable format of the date." ) adj_close: Optional[float] = Field( - default=None, description="Adjusted Close Price of the symbol." + default=None, description=DATA_DESCRIPTIONS.get("adj_close", "") ) unadjusted_volume: Optional[float] = Field( default=None, description="Unadjusted volume of the symbol." diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/market_indices.py b/openbb_platform/providers/fmp/openbb_fmp/models/market_indices.py index 4a462b61ca9..f20cba581c9 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/market_indices.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/market_indices.py @@ -9,6 +9,7 @@ from openbb_core.provider.standard_models.market_indices import ( MarketIndicesData, MarketIndicesQueryParams, ) +from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS from openbb_core.provider.utils.helpers import get_querystring from openbb_fmp.utils.helpers import get_data_many from pydantic import Field, NonNegativeInt @@ -37,7 +38,7 @@ class FMPMarketIndicesData(MarketIndicesData): """FMP Market Indices Data.""" adj_close: Optional[float] = Field( - description="Adjusted Close Price of the symbol.", + description=DATA_DESCRIPTIONS.get("adj_close", ""), default=None, ) unadjusted_volume: Optional[float] = Field( diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/world_news.py b/openbb_platform/providers/fmp/openbb_fmp/models/world_news.py index f930238830b..388c614bc66 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/world_news.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/world_news.py @@ -25,7 +25,7 @@ class FMPWorldNewsData(WorldNewsData): __alias_dict__ = {"date": "publishedDate", "images": "image"} - site: str = Field(description="Site of the news.") + site: str = Field(description="News source.") @field_validator("date", mode="before", check_fields=False) def date_validate(cls, v): # pylint: disable=E0213 diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py index 14992aa872d..c54cbb766b3 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/company_news.py @@ -39,7 +39,7 @@ class IntrinioCompanyNewsData(CompanyNewsData): "text": "summary", } - id: str = Field(description="Intrinio ID for the article.") + id: str = Field(description="Article ID.") @field_validator("publication_date", mode="before", check_fields=False) def date_validate(cls, v): # pylint: disable=E0213 diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/company_news.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/company_news.py index 812964ec4d9..fa521554ec4 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/company_news.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/company_news.py @@ -37,7 +37,7 @@ class TiingoCompanyNewsData(CompanyNewsData): } article_id: int = Field(description="Unique ID of the news article.", alias="id") - site: str = Field(description="Name of the news source.", alias="source") + site: str = Field(description="News source.", alias="source") tags: str = Field(description="Tags associated with the news article.") crawl_date: datetime = Field(description="Date the news article was crawled.") diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py index fee11d8f399..15d16973e8c 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py @@ -43,7 +43,9 @@ class TiingoCryptoHistoricalData(CryptoHistoricalData): """Tiingo Crypto Historical Price Data.""" transactions: Optional[int] = Field( - default=None, description="Number of trades.", alias="tradesDone" + default=None, + description="Number of transactions for the symbol in the time period.", + alias="tradesDone", ) volume_notional: Optional[float] = Field( diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/world_news.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/world_news.py index 20b8bba356c..531c2cb3e6a 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/world_news.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/world_news.py @@ -38,7 +38,7 @@ class TiingoWorldNewsData(WorldNewsData): description="Ticker tagged in the fetched news.", alias="tickers" ) article_id: int = Field(description="Unique ID of the news article.", alias="id") - site: str = Field(description="Name of the news source.", alias="source") + site: str = Field(description="News source.", alias="source") tags: str = Field(description="Tags associated with the news article.") crawl_date: datetime = Field(description="Date the news article was crawled.")