From 74b9619cc6b565f85aef1e89fc01900b86c8b991 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Mon, 29 Jan 2024 12:41:33 +0000 Subject: [PATCH 1/4] format w new black --- .../core/openbb_core/app/model/preferences.py | 6 ++--- .../core/openbb_core/app/router.py | 6 ++--- .../standard_models/eu_yield_curve.py | 10 ++++---- .../biztoc/openbb_biztoc/models/world_news.py | 6 ++--- .../openbb_cboe/models/index_historical.py | 4 +--- .../openbb_fmp/models/crypto_historical.py | 6 ++--- .../openbb_fmp/models/currency_historical.py | 6 ++--- .../fmp/openbb_fmp/models/etf_search.py | 10 ++++---- .../fmp/openbb_fmp/models/index_historical.py | 6 ++--- .../fmp/openbb_fmp/models/market_indices.py | 6 ++--- .../fred/openbb_fred/models/dwpcr_rates.py | 6 ++--- .../fred/openbb_fred/models/series.py | 10 ++++---- .../models/equity_historical.py | 6 ++--- .../models/income_statement.py | 10 ++++---- .../openbb_nasdaq/models/sp500_multiples.py | 10 ++++---- .../models/crypto_historical.py | 6 ++--- .../models/currency_historical.py | 6 ++--- .../openbb_polygon/models/income_statement.py | 10 ++++---- .../openbb_polygon/models/index_historical.py | 6 ++--- .../openbb_polygon/models/market_indices.py | 6 ++--- .../sec/openbb_sec/models/etf_holdings.py | 24 +++++++++---------- .../openbb_tiingo/models/crypto_historical.py | 6 ++--- .../models/currency_historical.py | 6 ++--- .../openbb_tiingo/models/equity_historical.py | 6 ++--- openbb_terminal/core/sdk/sdk_helpers.py | 4 +++- .../overview/pycoingecko_view.py | 4 +++- .../dashboards/stream/pages/Indicators.py | 6 ++--- .../econometrics/econometrics_controller.py | 18 +++++++------- openbb_terminal/economy/economy_controller.py | 6 ++--- openbb_terminal/economy/fred_model.py | 8 +++---- openbb_terminal/economy/fred_view.py | 4 +++- openbb_terminal/fixedincome/fred_view.py | 4 +++- openbb_terminal/fixedincome/oecd_view.py | 4 +++- openbb_terminal/helper_classes.py | 18 +++++++------- openbb_terminal/helper_funcs.py | 4 +++- openbb_terminal/helpers_denomination.py | 4 +++- .../portfolio/attribution_model.py | 22 ++++++++--------- .../portfolio/portfolio_controller.py | 12 ++++++---- .../portfolio_optimization/po_model.py | 4 +++- openbb_terminal/reports/reports_controller.py | 6 ++--- .../stocks/dark_pool_shorts/sec_model.py | 6 ++--- .../dark_pool_shorts/shortinterest_model.py | 6 ++--- .../stocks/discovery/finviz_view.py | 4 +++- .../business_insider_model.py | 8 +++---- .../business_insider_view.py | 4 +++- .../stocks/fundamental_analysis/dcf_view.py | 4 +++- .../stocks/insider/openinsider_view.py | 16 ++++++------- 47 files changed, 191 insertions(+), 169 deletions(-) diff --git a/openbb_platform/core/openbb_core/app/model/preferences.py b/openbb_platform/core/openbb_core/app/model/preferences.py index 0fb2a555500b..c113e409d55e 100644 --- a/openbb_platform/core/openbb_core/app/model/preferences.py +++ b/openbb_platform/core/openbb_core/app/model/preferences.py @@ -27,9 +27,9 @@ class Preferences(BaseModel): field_order: bool = ( False # Whether to display the field order by which the data was defined ) - output_type: Literal["OBBject", "dataframe", "polars", "numpy", "dict", "chart"] = ( - Field(default="OBBject", description="Python default output type.") - ) + output_type: Literal[ + "OBBject", "dataframe", "polars", "numpy", "dict", "chart" + ] = Field(default="OBBject", description="Python default output type.") model_config = ConfigDict(validate_assignment=True) diff --git a/openbb_platform/core/openbb_core/app/router.py b/openbb_platform/core/openbb_core/app/router.py index 2426f2f6da97..4c2112b6c201 100644 --- a/openbb_platform/core/openbb_core/app/router.py +++ b/openbb_platform/core/openbb_core/app/router.py @@ -284,9 +284,9 @@ def command( if deprecation_message: kwargs["summary"] = deprecation_message else: - kwargs["summary"] = ( - "This functionality will be deprecated in the future releases." - ) + kwargs[ + "summary" + ] = "This functionality will be deprecated in the future releases." api_router.add_api_route(**kwargs) diff --git a/openbb_platform/core/openbb_core/provider/standard_models/eu_yield_curve.py b/openbb_platform/core/openbb_core/provider/standard_models/eu_yield_curve.py index f1de1e00b77d..937eed355cba 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/eu_yield_curve.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/eu_yield_curve.py @@ -16,11 +16,11 @@ class EUYieldCurveQueryParams(QueryParams): date: Optional[dateType] = Field( default=None, description=QUERY_DESCRIPTIONS.get("date", "") ) - yield_curve_type: Literal["spot_rate", "instantaneous_forward", "par_yield"] = ( - Field( - default="spot_rate", - description="The yield curve type.", - ) + yield_curve_type: Literal[ + "spot_rate", "instantaneous_forward", "par_yield" + ] = Field( + default="spot_rate", + description="The yield curve type.", ) diff --git a/openbb_platform/providers/biztoc/openbb_biztoc/models/world_news.py b/openbb_platform/providers/biztoc/openbb_biztoc/models/world_news.py index 31a080a87a0a..4c98abaf685c 100644 --- a/openbb_platform/providers/biztoc/openbb_biztoc/models/world_news.py +++ b/openbb_platform/providers/biztoc/openbb_biztoc/models/world_news.py @@ -16,9 +16,9 @@ class BiztocWorldNewsQueryParams(WorldNewsQueryParams): """Biztoc World News Query.""" - filter: Literal["crypto", "hot", "latest", "main", "media", "source", "tag"] = ( - Field(default="latest", description="Filter by type of news.") - ) + filter: Literal[ + "crypto", "hot", "latest", "main", "media", "source", "tag" + ] = Field(default="latest", description="Filter by type of news.") source: str = Field( description="Filter by a specific publisher. Only valid when filter is set to source.", default="bloomberg", diff --git a/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py b/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py index a45f44269d84..2da810d1acfb 100644 --- a/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py +++ b/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py @@ -137,9 +137,7 @@ def _generate_historical_prices_url( ) url += f"{symbol.replace('^', '')}.json" else: - base_url: str = ( - f"https://cdn.cboe.com/api/global/delayed_quotes/charts/{interval_type}" - ) + base_url: str = f"https://cdn.cboe.com/api/global/delayed_quotes/charts/{interval_type}" url = ( base_url + f"/_{symbol.replace('^', '')}.json" if symbol.replace("^", "") in TICKER_EXCEPTIONS 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 5dd814465e58..7134b17355fa 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py @@ -28,9 +28,9 @@ class FMPCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): timeseries: Optional[NonNegativeInt] = Field( default=None, description="Number of days to look back." ) - interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( - Field(default="1day", description="Data granularity.") - ) + interval: Literal[ + "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" + ] = Field(default="1day", description="Data granularity.") class FMPCryptoHistoricalData(CryptoHistoricalData): 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 e54de3b4fa02..56d12e51bc68 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py @@ -22,9 +22,9 @@ class FMPCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): __alias_dict__ = {"start_date": "from", "end_date": "to"} - interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( - Field(default="1day", description="Data granularity.") - ) + interval: Literal[ + "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" + ] = Field(default="1day", description="Data granularity.") class FMPCurrencyHistoricalData(CurrencyHistoricalData): diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/etf_search.py b/openbb_platform/providers/fmp/openbb_fmp/models/etf_search.py index 38ba113ff0e8..2e8f899a1623 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/etf_search.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/etf_search.py @@ -15,11 +15,11 @@ class FMPEtfSearchQueryParams(EtfSearchQueryParams): """FMP ETF Search Query.""" - exchange: Optional[Literal["AMEX", "NYSE", "NASDAQ", "ETF", "TSX", "EURONEXT"]] = ( - Field( - description="The exchange code the ETF trades on.", - default=None, - ) + exchange: Optional[ + Literal["AMEX", "NYSE", "NASDAQ", "ETF", "TSX", "EURONEXT"] + ] = Field( + description="The exchange code the ETF trades on.", + default=None, ) is_active: Optional[Literal[True, False]] = Field( description="Whether the ETF is actively trading.", diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py index d3b2210c1190..d3e067a56451 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py @@ -26,9 +26,9 @@ class FMPIndexHistoricalQueryParams(IndexHistoricalQueryParams): timeseries: Optional[NonNegativeInt] = Field( default=None, description="Number of days to look back." ) - interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( - Field(default="1day", description="Data granularity.") - ) + interval: Literal[ + "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" + ] = Field(default="1day", description="Data granularity.") sort: Literal["asc", "desc"] = Field( default="desc", description="Sort the data in ascending or descending order." ) 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 7d860c4955de..f20cba581c95 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/market_indices.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/market_indices.py @@ -26,9 +26,9 @@ class FMPMarketIndicesQueryParams(MarketIndicesQueryParams): timeseries: Optional[NonNegativeInt] = Field( default=None, description="Number of days to look back." ) - interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( - Field(default="1day", description="Data granularity.") - ) + interval: Literal[ + "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" + ] = Field(default="1day", description="Data granularity.") sort: Literal["asc", "desc"] = Field( default="desc", description="Sort the data in ascending or descending order." ) diff --git a/openbb_platform/providers/fred/openbb_fred/models/dwpcr_rates.py b/openbb_platform/providers/fred/openbb_fred/models/dwpcr_rates.py index 24c63ff94a4b..732c4347aa13 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/dwpcr_rates.py +++ b/openbb_platform/providers/fred/openbb_fred/models/dwpcr_rates.py @@ -22,9 +22,9 @@ class FREDDiscountWindowPrimaryCreditRateParams(DiscountWindowPrimaryCreditRateParams): """FRED Discount Window Primary Credit Rate Query.""" - parameter: Literal["daily_excl_weekend", "monthly", "weekly", "daily", "annual"] = ( - Field(default="daily_excl_weekend", description="FRED series ID of DWPCR data.") - ) + parameter: Literal[ + "daily_excl_weekend", "monthly", "weekly", "daily", "annual" + ] = Field(default="daily_excl_weekend", description="FRED series ID of DWPCR data.") class FREDDiscountWindowPrimaryCreditRateData(DiscountWindowPrimaryCreditRateData): diff --git a/openbb_platform/providers/fred/openbb_fred/models/series.py b/openbb_platform/providers/fred/openbb_fred/models/series.py index e9f88e5b7227..38af7f6be7f3 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/series.py +++ b/openbb_platform/providers/fred/openbb_fred/models/series.py @@ -78,10 +78,11 @@ class FredSeriesQueryParams(SeriesQueryParams): eop = End of Period """, ) - transform: Literal[None, "chg", "ch1", "pch", "pc1", "pca", "cch", "cca", "log"] = ( - Field( - default=None, - description=""" + transform: Literal[ + None, "chg", "ch1", "pch", "pc1", "pca", "cch", "cca", "log" + ] = Field( + default=None, + description=""" Transformation type None = No transformation chg = Change @@ -93,7 +94,6 @@ class FredSeriesQueryParams(SeriesQueryParams): cca = Continuously Compounded Annual Rate of Change log = Natural Log """, - ) ) limit: int = Field(description=QUERY_DESCRIPTIONS.get("limit", ""), default=100000) diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py index c4db7c181e5d..a129ae5abbb3 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py @@ -49,9 +49,9 @@ class IntrinioEquityHistoricalQueryParams(EquityHistoricalQueryParams): _interval_size: Literal["1m", "5m", "10m", "15m", "30m", "60m", "1h"] = PrivateAttr( default=None ) - _frequency: Literal["daily", "weekly", "monthly", "quarterly", "yearly"] = ( - PrivateAttr(default=None) - ) + _frequency: Literal[ + "daily", "weekly", "monthly", "quarterly", "yearly" + ] = PrivateAttr(default=None) # pylint: disable=protected-access @model_validator(mode="after") diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py index f23467392b48..004408b2b480 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py @@ -226,11 +226,11 @@ class IntrinioIncomeStatementData(IncomeStatementData): deposits_interest_expense: Optional[float] = Field( default=None, description="Deposits interest expense" ) - federal_funds_purchased_and_securities_sold_interest_expense: Optional[float] = ( - Field( - default=None, - description="Federal funds purchased and securities sold interest expense", - ) + federal_funds_purchased_and_securities_sold_interest_expense: Optional[ + float + ] = Field( + default=None, + description="Federal funds purchased and securities sold interest expense", ) other_interest_expense: Optional[float] = Field( default=None, description="Other interest expense" diff --git a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/sp500_multiples.py b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/sp500_multiples.py index 969359e7ad27..d62997b340f8 100644 --- a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/sp500_multiples.py +++ b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/sp500_multiples.py @@ -15,11 +15,11 @@ class NasdaqSP500MultiplesQueryParams(SP500MultiplesQueryParams): """Nasdaq SP500 Multiples Query.""" - collapse: Optional[Literal["daily", "weekly", "monthly", "quarterly", "annual"]] = ( - Field( - description="Collapse the frequency of the time series.", - default="monthly", - ) + collapse: Optional[ + Literal["daily", "weekly", "monthly", "quarterly", "annual"] + ] = Field( + description="Collapse the frequency of the time series.", + default="monthly", ) transform: Optional[Literal["diff", "rdiff", "cumul", "normalize"]] = Field( description="The transformation of the time series.", diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/crypto_historical.py b/openbb_platform/providers/polygon/openbb_polygon/models/crypto_historical.py index c7ae932f62c7..37a86a9c161e 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/crypto_historical.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/crypto_historical.py @@ -23,9 +23,9 @@ class PolygonCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): multiplier: PositiveInt = Field( default=1, description="Multiplier of the timespan." ) - timespan: Literal["minute", "hour", "day", "week", "month", "quarter", "year"] = ( - Field(default="day", description="Timespan of the data.") - ) + timespan: Literal[ + "minute", "hour", "day", "week", "month", "quarter", "year" + ] = Field(default="day", description="Timespan of the data.") sort: Literal["asc", "desc"] = Field( default="desc", description="Sort order of the data." ) diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/currency_historical.py b/openbb_platform/providers/polygon/openbb_polygon/models/currency_historical.py index b0b9611e1f2f..9e4f8838c192 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/currency_historical.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/currency_historical.py @@ -23,9 +23,9 @@ class PolygonCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): multiplier: PositiveInt = Field( default=1, description="Multiplier of the timespan." ) - timespan: Literal["minute", "hour", "day", "week", "month", "quarter", "year"] = ( - Field(default="day", description="Timespan of the data.") - ) + timespan: Literal[ + "minute", "hour", "day", "week", "month", "quarter", "year" + ] = Field(default="day", description="Timespan of the data.") sort: Literal["asc", "desc"] = Field( default="desc", description="Sort order of the data." ) diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py b/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py index 8f0ca05df7dd..493646633a37 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py @@ -219,11 +219,11 @@ class PolygonIncomeStatementData(IncomeStatementData): default=None, description="Participating Securities Distributed And Undistributed Earnings Loss Basic", ) - undistributed_earnings_allocated_to_participating_securities: Optional[float] = ( - Field( - default=None, - description="Undistributed Earnings Allocated To Participating Securities", - ) + undistributed_earnings_allocated_to_participating_securities: Optional[ + float + ] = Field( + default=None, + description="Undistributed Earnings Allocated To Participating Securities", ) common_stock_dividends: Optional[float] = Field( default=None, description="Common Stock Dividends" diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/index_historical.py b/openbb_platform/providers/polygon/openbb_polygon/models/index_historical.py index d2b3f83d4ebe..f666aae41a57 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/index_historical.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/index_historical.py @@ -20,9 +20,9 @@ class PolygonIndexHistoricalQueryParams(IndexHistoricalQueryParams): Source: https://polygon.io/docs/indices/getting-started """ - timespan: Literal["minute", "hour", "day", "week", "month", "quarter", "year"] = ( - Field(default="day", description="Timespan of the data.") - ) + timespan: Literal[ + "minute", "hour", "day", "week", "month", "quarter", "year" + ] = Field(default="day", description="Timespan of the data.") sort: Literal["asc", "desc"] = Field( default="desc", description="Sort order of the data." ) diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/market_indices.py b/openbb_platform/providers/polygon/openbb_polygon/models/market_indices.py index b473a42cffb7..a81718ac54f1 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/market_indices.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/market_indices.py @@ -20,9 +20,9 @@ class PolygonMarketIndicesQueryParams(MarketIndicesQueryParams): Source: https://polygon.io/docs/indices/getting-started """ - timespan: Literal["minute", "hour", "day", "week", "month", "quarter", "year"] = ( - Field(default="day", description="Timespan of the data.") - ) + timespan: Literal[ + "minute", "hour", "day", "week", "month", "quarter", "year" + ] = Field(default="day", description="Timespan of the data.") sort: Literal["asc", "desc"] = Field( default="desc", description="Sort order of the data." ) diff --git a/openbb_platform/providers/sec/openbb_sec/models/etf_holdings.py b/openbb_platform/providers/sec/openbb_sec/models/etf_holdings.py index e25853e296ec..80cb8b49ca5b 100644 --- a/openbb_platform/providers/sec/openbb_sec/models/etf_holdings.py +++ b/openbb_platform/providers/sec/openbb_sec/models/etf_holdings.py @@ -432,9 +432,9 @@ def transform_data( option_swaption_warrant_deriv = derivative_info[ "optionSwaptionWarrantDeriv" ] - df.loc[i, "derivative_category"] = ( - option_swaption_warrant_deriv.get("@derivCat") - ) + df.loc[ + i, "derivative_category" + ] = option_swaption_warrant_deriv.get("@derivCat") df.loc[i, "counterparty"] = option_swaption_warrant_deriv[ "counterparties" ].get("counterpartyName") @@ -462,21 +462,21 @@ def transform_data( df.loc[i, "option_type"] = option_swaption_warrant_deriv.get( "putOrCall" ) - df.loc[i, "derivative_payoff"] = ( - option_swaption_warrant_deriv.get("writtenOrPur") - ) + df.loc[ + i, "derivative_payoff" + ] = option_swaption_warrant_deriv.get("writtenOrPur") df.loc[i, "expiry_date"] = option_swaption_warrant_deriv.get( "expDt" ) df.loc[i, "exercise_price"] = option_swaption_warrant_deriv.get( "exercisePrice" ) - df.loc[i, "exercise_currency"] = ( - option_swaption_warrant_deriv.get("exercisePriceCurCd") - ) - df.loc[i, "shares_per_contract"] = ( - option_swaption_warrant_deriv.get("shareNo") - ) + df.loc[ + i, "exercise_currency" + ] = option_swaption_warrant_deriv.get("exercisePriceCurCd") + df.loc[ + i, "shares_per_contract" + ] = option_swaption_warrant_deriv.get("shareNo") if option_swaption_warrant_deriv.get("delta") != "XXXX": df.loc[i, "delta"] = option_swaption_warrant_deriv.get( "delta" 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 d0ae6599206b..9b34cc722930 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py @@ -26,9 +26,9 @@ class TiingoCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): "end_date": "endDate", } - interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( - Field(default="1day", description="Data granularity.", alias="resampleFreq") - ) + interval: Literal[ + "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" + ] = Field(default="1day", description="Data granularity.", alias="resampleFreq") exchanges: Optional[List[str]] = Field( default=None, diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py index 748f782c8034..290c519d0b12 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py @@ -26,9 +26,9 @@ class TiingoCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): "end_date": "endDate", } - interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( - Field(default="1day", description="Data granularity.", alias="resampleFreq") - ) + interval: Literal[ + "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" + ] = Field(default="1day", description="Data granularity.", alias="resampleFreq") class TiingoCurrencyHistoricalData(CurrencyHistoricalData): diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py index 0282fa945c62..9e69914aaa8b 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py @@ -28,9 +28,9 @@ class TiingoEquityHistoricalQueryParams(EquityHistoricalQueryParams): interval: Literal["1d", "1W", "1M", "1Y"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") ) - _frequency: Literal["daily", "weekly", "monthly", "quarterly", "yearly"] = ( - PrivateAttr(default=None) - ) + _frequency: Literal[ + "daily", "weekly", "monthly", "quarterly", "yearly" + ] = PrivateAttr(default=None) # pylint: disable=protected-access @model_validator(mode="after") # type: ignore[arg-type] diff --git a/openbb_terminal/core/sdk/sdk_helpers.py b/openbb_terminal/core/sdk/sdk_helpers.py index bc6ae8b3adb3..40dfd748ea22 100644 --- a/openbb_terminal/core/sdk/sdk_helpers.py +++ b/openbb_terminal/core/sdk/sdk_helpers.py @@ -48,7 +48,9 @@ def clean_attr_desc(attr: Optional[Any] = None) -> Optional[str]: return ( attr.__doc__.splitlines()[1].lstrip() if not attr.__doc__.splitlines()[0] - else attr.__doc__.splitlines()[0].lstrip() if attr.__doc__ else "" + else attr.__doc__.splitlines()[0].lstrip() + if attr.__doc__ + else "" ) diff --git a/openbb_terminal/cryptocurrency/overview/pycoingecko_view.py b/openbb_terminal/cryptocurrency/overview/pycoingecko_view.py index a7364a6a8f6e..d5cd95f8d746 100644 --- a/openbb_terminal/cryptocurrency/overview/pycoingecko_view.py +++ b/openbb_terminal/cryptocurrency/overview/pycoingecko_view.py @@ -158,7 +158,9 @@ def display_crypto_heatmap( ) fig.add_trace(treemap["data"][0], row=1, col=1) - fig.data[0].texttemplate = ( + fig.data[ + 0 + ].texttemplate = ( "

%{label}
%{customdata[0]:.2f}%



" ) fig.data[0].insidetextfont = dict( diff --git a/openbb_terminal/dashboards/stream/pages/Indicators.py b/openbb_terminal/dashboards/stream/pages/Indicators.py index e280bc170a31..4f45e55041e2 100644 --- a/openbb_terminal/dashboards/stream/pages/Indicators.py +++ b/openbb_terminal/dashboards/stream/pages/Indicators.py @@ -382,9 +382,9 @@ async def async_on_ticker_change(self): for ticker in tickers: if ticker not in st.session_state["indicators_dfs"]: - st.session_state["indicators_dfs"][ticker] = ( - await self.load_ticker_data(ticker, interval, start, end, source) - ) + st.session_state["indicators_dfs"][ + ticker + ] = await self.load_ticker_data(ticker, interval, start, end, source) if st.session_state["indicators_dfs"][ticker].empty: indicators_dfs = st.session_state["indicators_dfs"] del indicators_dfs[ticker] diff --git a/openbb_terminal/econometrics/econometrics_controller.py b/openbb_terminal/econometrics/econometrics_controller.py index c8c2cf30b12f..158096d61826 100644 --- a/openbb_terminal/econometrics/econometrics_controller.py +++ b/openbb_terminal/econometrics/econometrics_controller.py @@ -1743,15 +1743,15 @@ def call_panel(self, other_args: List[str]): self.regression[regression][ "independent" ] = independent_variables - self.regression[regression_name]["model"] = ( - regression_view.display_panel( - regression_df[dependent_variable], - regression_df[independent_variables], - regression, - ns_parser.entity_effects, - ns_parser.time_effects, - ns_parser.export, - ) + self.regression[regression_name][ + "model" + ] = regression_view.display_panel( + regression_df[dependent_variable], + regression_df[independent_variables], + regression, + ns_parser.entity_effects, + ns_parser.time_effects, + ns_parser.export, ) else: console.print( diff --git a/openbb_terminal/economy/economy_controller.py b/openbb_terminal/economy/economy_controller.py index 8aacd86b9750..68f87b968bb8 100644 --- a/openbb_terminal/economy/economy_controller.py +++ b/openbb_terminal/economy/economy_controller.py @@ -1436,9 +1436,9 @@ def call_fred(self, other_args: List[str]): if not df.empty: for series_id, data in detail.items(): - self.FRED_TITLES[series_id] = ( - f"{data['title']} ({data['units']})" - ) + self.FRED_TITLES[ + series_id + ] = f"{data['title']} ({data['units']})" # Making data available at the class level self.DATASETS["fred"][series_id] = df[series_id] diff --git a/openbb_terminal/economy/fred_model.py b/openbb_terminal/economy/fred_model.py index 933c7525c2c9..dc0b4b90acc8 100644 --- a/openbb_terminal/economy/fred_model.py +++ b/openbb_terminal/economy/fred_model.py @@ -374,10 +374,10 @@ def get_cpi( for series_id, country_value, frequency_value, unit_value in series[ ["series_id", "country", "frequency", "units"] ].values: - series_dictionary[f"{country_value}-{frequency_value}-{unit_value}"] = ( - get_series_data( - series_id=series_id, start_date=start_date, end_date=end_date - ) + series_dictionary[ + f"{country_value}-{frequency_value}-{unit_value}" + ] = get_series_data( + series_id=series_id, start_date=start_date, end_date=end_date ) df = pd.DataFrame.from_dict(series_dictionary) diff --git a/openbb_terminal/economy/fred_view.py b/openbb_terminal/economy/fred_view.py index 21fc2fa06249..403692ea1f35 100644 --- a/openbb_terminal/economy/fred_view.py +++ b/openbb_terminal/economy/fred_view.py @@ -265,7 +265,9 @@ def plot_cpi( title += ( " Indices" if len(df.columns) > 1 - else f" Index for {country}" if country else "" + else f" Index for {country}" + if country + else "" ) fig = OpenBBFigure(yaxis_title=ylabel_dict.get(units, "Index (2015=100)")) diff --git a/openbb_terminal/fixedincome/fred_view.py b/openbb_terminal/fixedincome/fred_view.py index 9c5cf7917587..a8cc37b2e876 100644 --- a/openbb_terminal/fixedincome/fred_view.py +++ b/openbb_terminal/fixedincome/fred_view.py @@ -1245,7 +1245,9 @@ def plot_icebofa( title = ( "" if df.empty - else "ICE BofA Bond Benchmark Indices" if len(df.columns) > 1 else df.columns[0] + else "ICE BofA Bond Benchmark Indices" + if len(df.columns) > 1 + else df.columns[0] ) fig = OpenBBFigure(yaxis_title="Yield (%)" if units == "percent" else "Index") diff --git a/openbb_terminal/fixedincome/oecd_view.py b/openbb_terminal/fixedincome/oecd_view.py index b273dda9c3fe..bbd28a74920e 100644 --- a/openbb_terminal/fixedincome/oecd_view.py +++ b/openbb_terminal/fixedincome/oecd_view.py @@ -83,7 +83,9 @@ def plot_treasuries( term = ( "Short and Long" if short_term and long_term - else "Long" if long_term else "Short" + else "Long" + if long_term + else "Short" ) title = f"{term} Term Interest Rates {' with forecasts' if forecast else ''}" fig.set_title(title) diff --git a/openbb_terminal/helper_classes.py b/openbb_terminal/helper_classes.py index d64a13378739..4eee377d9376 100644 --- a/openbb_terminal/helper_classes.py +++ b/openbb_terminal/helper_classes.py @@ -202,17 +202,17 @@ def load_available_styles_from_folder(self, folder: Path) -> None: continue if stf.name.endswith(".mplstyle"): - self.mpl_styles_available[stf.name.replace(".mplstyle", "")] = ( - os.path.join(folder, stf) - ) + self.mpl_styles_available[ + stf.name.replace(".mplstyle", "") + ] = os.path.join(folder, stf) elif stf.name.endswith(".mplrc.json"): - self.mpl_rcparams_available[stf.name.replace(".mplrc.json", "")] = ( - os.path.join(folder, stf) - ) + self.mpl_rcparams_available[ + stf.name.replace(".mplrc.json", "") + ] = os.path.join(folder, stf) elif stf.name.endswith(".mpfstyle.json"): - self.mpf_styles_available[stf.name.replace(".mpfstyle.json", "")] = ( - os.path.join(folder, stf) - ) + self.mpf_styles_available[ + stf.name.replace(".mpfstyle.json", "") + ] = os.path.join(folder, stf) elif stf.name.endswith(".richstyle.json"): self.console_styles_available[ stf.name.replace(".richstyle.json", "") diff --git a/openbb_terminal/helper_funcs.py b/openbb_terminal/helper_funcs.py index 0de3f3cb2cb6..640b17f822e3 100644 --- a/openbb_terminal/helper_funcs.py +++ b/openbb_terminal/helper_funcs.py @@ -1159,7 +1159,9 @@ def text_adjustment_justify(self, texts, max_len, mode="right"): justify = ( str.ljust if (mode == "left") - else str.rjust if (mode == "right") else str.center + else str.rjust + if (mode == "right") + else str.center ) out = [] for s in texts: diff --git a/openbb_terminal/helpers_denomination.py b/openbb_terminal/helpers_denomination.py index 2516eb2e83d5..8b6c5c4db25a 100644 --- a/openbb_terminal/helpers_denomination.py +++ b/openbb_terminal/helpers_denomination.py @@ -45,7 +45,9 @@ def apply( lambda series: ( series if skipPredicate is not None and skipPredicate(series) - else series * multiplier if isinstance(series, (float, int)) else series + else series * multiplier + if isinstance(series, (float, int)) + else series ), axis, ) diff --git a/openbb_terminal/portfolio/attribution_model.py b/openbb_terminal/portfolio/attribution_model.py index 068b90451812..57d36b90a16e 100644 --- a/openbb_terminal/portfolio/attribution_model.py +++ b/openbb_terminal/portfolio/attribution_model.py @@ -383,16 +383,16 @@ def get_daily_sector_prices(start_date, end_date) -> dict: sector_ticker, ) in sp500_tickers.items(): # iterate thru the sectors # load the data required from yfinance - sp500_tickers_data[sector] = ( - { # builds a dictionary entry for the sector with adj close data - "sector_data": yf.download( - sector_ticker, - start=start_date, - end=end_date, - progress=False, - ignore_tz=True, - )["Adj Close"] - } - ) # stores the data here + sp500_tickers_data[ + sector + ] = { # builds a dictionary entry for the sector with adj close data + "sector_data": yf.download( + sector_ticker, + start=start_date, + end=end_date, + progress=False, + ignore_tz=True, + )["Adj Close"] + } # stores the data here return sp500_tickers_data diff --git a/openbb_terminal/portfolio/portfolio_controller.py b/openbb_terminal/portfolio/portfolio_controller.py index 1f2a0fa978ee..f0a3a077700d 100644 --- a/openbb_terminal/portfolio/portfolio_controller.py +++ b/openbb_terminal/portfolio/portfolio_controller.py @@ -261,11 +261,13 @@ def call_po(self, _): categories["COUNTRY"][transaction["Ticker"]] = transaction[ "Country" ] - categories["CURRENT_INVESTED_AMOUNT"][transaction["Ticker"]] = ( - transactions[ - transactions["Ticker"] == transaction["Ticker"] - ]["Investment"].sum() - ) + categories["CURRENT_INVESTED_AMOUNT"][ + transaction["Ticker"] + ] = transactions[ + transactions["Ticker"] == transaction["Ticker"] + ][ + "Investment" + ].sum() categories["CURRENCY"][transaction["Ticker"]] = transaction[ "Currency" ] diff --git a/openbb_terminal/portfolio/portfolio_optimization/po_model.py b/openbb_terminal/portfolio/portfolio_optimization/po_model.py index c35f1b346fe0..2b2cf440bcbd 100644 --- a/openbb_terminal/portfolio/portfolio_optimization/po_model.py +++ b/openbb_terminal/portfolio/portfolio_optimization/po_model.py @@ -1191,7 +1191,9 @@ def get_blacklitterman( @log_start_end(log=logger) -def get_ef(portfolio_engine: Optional[PoEngine] = None, **kwargs) -> Tuple[ +def get_ef( + portfolio_engine: Optional[PoEngine] = None, **kwargs +) -> Tuple[ pd.DataFrame, pd.DataFrame, pd.DataFrame, diff --git a/openbb_terminal/reports/reports_controller.py b/openbb_terminal/reports/reports_controller.py index 1cc5f408ba40..d37e0c0dcbdb 100644 --- a/openbb_terminal/reports/reports_controller.py +++ b/openbb_terminal/reports/reports_controller.py @@ -74,9 +74,9 @@ def update_choices(self): self.choices[report_name] = {} for arg in self.PARAMETERS_DICT[report_name]: if report_name in reports_model.REPORT_CHOICES: - self.choices[report_name]["--" + arg] = ( - reports_model.REPORT_CHOICES[report_name]["--" + arg] - ) + self.choices[report_name][ + "--" + arg + ] = reports_model.REPORT_CHOICES[report_name]["--" + arg] self.choices["support"] = self.SUPPORT_CHOICES self.choices["about"] = self.ABOUT_CHOICES diff --git a/openbb_terminal/stocks/dark_pool_shorts/sec_model.py b/openbb_terminal/stocks/dark_pool_shorts/sec_model.py index 3a122ac9a3a7..5f1bdd784796 100644 --- a/openbb_terminal/stocks/dark_pool_shorts/sec_model.py +++ b/openbb_terminal/stocks/dark_pool_shorts/sec_model.py @@ -50,9 +50,9 @@ def catching_diff_url_formats(ftd_urls: list) -> list: ftd_url == "https://www.sec.gov/files/data/fails-deliver-data/cnsfails201910a.zip" ): - ftd_urls[i] = ( - "https://www.sec.gov/files/data/fails-deliver-data/cnsfails201910a_0.zip" - ) + ftd_urls[ + i + ] = "https://www.sec.gov/files/data/fails-deliver-data/cnsfails201910a_0.zip" return ftd_urls diff --git a/openbb_terminal/stocks/dark_pool_shorts/shortinterest_model.py b/openbb_terminal/stocks/dark_pool_shorts/shortinterest_model.py index db884a43ecb5..56de4d898d0f 100644 --- a/openbb_terminal/stocks/dark_pool_shorts/shortinterest_model.py +++ b/openbb_terminal/stocks/dark_pool_shorts/shortinterest_model.py @@ -58,9 +58,9 @@ def get_high_short_interest() -> DataFrame: shorted_stock_data = a_stock_txt.split("\n") if len(shorted_stock_data) == 8: - df_high_short_interest.loc[len(df_high_short_interest.index)] = ( - shorted_stock_data[:-1] - ) + df_high_short_interest.loc[ + len(df_high_short_interest.index) + ] = shorted_stock_data[:-1] shorted_stock_data = [] diff --git a/openbb_terminal/stocks/discovery/finviz_view.py b/openbb_terminal/stocks/discovery/finviz_view.py index 1fb46d8419d4..64cd06b63a30 100644 --- a/openbb_terminal/stocks/discovery/finviz_view.py +++ b/openbb_terminal/stocks/discovery/finviz_view.py @@ -81,7 +81,9 @@ def display_heatmap( ) fig.add_trace(treemap["data"][0], row=1, col=1) - fig.data[0].texttemplate = ( + fig.data[ + 0 + ].texttemplate = ( "

%{label}
%{customdata[0]:.2f}%



" ) fig.data[0].insidetextfont = dict(family="Arial Black", size=20, color="white") diff --git a/openbb_terminal/stocks/fundamental_analysis/business_insider_model.py b/openbb_terminal/stocks/fundamental_analysis/business_insider_model.py index f83e57c89e60..7fa641b153fe 100644 --- a/openbb_terminal/stocks/fundamental_analysis/business_insider_model.py +++ b/openbb_terminal/stocks/fundamental_analysis/business_insider_model.py @@ -95,10 +95,10 @@ def get_management(symbol: str) -> pd.DataFrame: df_management = df_management.set_index("Name") for s_name in df_management.index: - df_management.loc[s_name]["Info"] = ( - f"http://www.google.com/search?q={s_name} {symbol.upper()}".replace( - " ", "%20" - ) + df_management.loc[s_name][ + "Info" + ] = f"http://www.google.com/search?q={s_name} {symbol.upper()}".replace( + " ", "%20" ) return df_management diff --git a/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py b/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py index 6c9620878d3e..3422a49ef538 100644 --- a/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py +++ b/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py @@ -163,7 +163,9 @@ def adjust_splits(row, splits: pd.DataFrame): lambda x: ( theme.up_color if x == "BUY" - else theme.down_color if x == "SELL" else "#b3a8a8" + else theme.down_color + if x == "SELL" + else "#b3a8a8" ) ) diff --git a/openbb_terminal/stocks/fundamental_analysis/dcf_view.py b/openbb_terminal/stocks/fundamental_analysis/dcf_view.py index 53cdf5fa9b1d..9b4eeca68d6f 100644 --- a/openbb_terminal/stocks/fundamental_analysis/dcf_view.py +++ b/openbb_terminal/stocks/fundamental_analysis/dcf_view.py @@ -988,7 +988,9 @@ def title_to_row(self, title: str) -> int: df = ( self.df["IS"] if title in self.df["IS"].index - else self.df["BS"] if title in self.df["BS"].index else self.df["CF"] + else self.df["BS"] + if title in self.df["BS"].index + else self.df["CF"] ) ind = ( df.index.get_loc(title) diff --git a/openbb_terminal/stocks/insider/openinsider_view.py b/openbb_terminal/stocks/insider/openinsider_view.py index e86cf2f7b092..50fe746002cd 100644 --- a/openbb_terminal/stocks/insider/openinsider_view.py +++ b/openbb_terminal/stocks/insider/openinsider_view.py @@ -213,20 +213,20 @@ def print_insider_filter( new_df_insider["Trade Type"] == "S - Sale" ].apply(lambda_red_highlight) if not new_df_insider[new_df_insider["Trade Type"] == "S - Sale+OE"].empty: - new_df_insider[new_df_insider["Trade Type"] == "S - Sale+OE"] = ( - new_df_insider[new_df_insider["Trade Type"] == "S - Sale+OE"].apply( - lambda_yellow_highlight - ) + new_df_insider[ + new_df_insider["Trade Type"] == "S - Sale+OE" + ] = new_df_insider[new_df_insider["Trade Type"] == "S - Sale+OE"].apply( + lambda_yellow_highlight ) if not new_df_insider[new_df_insider["Trade Type"] == "F - Tax"].empty: new_df_insider[new_df_insider["Trade Type"] == "F - Tax"] = new_df_insider[ new_df_insider["Trade Type"] == "F - Tax" ].apply(lambda_magenta_highlight) if not new_df_insider[new_df_insider["Trade Type"] == "P - Purchase"].empty: - new_df_insider[new_df_insider["Trade Type"] == "P - Purchase"] = ( - new_df_insider[new_df_insider["Trade Type"] == "P - Purchase"].apply( - lambda_green_highlight - ) + new_df_insider[ + new_df_insider["Trade Type"] == "P - Purchase" + ] = new_df_insider[new_df_insider["Trade Type"] == "P - Purchase"].apply( + lambda_green_highlight ) patch_pandas_text_adjustment() From f8a7151d08ed9be9037e1bfd649041331cd0cd76 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Mon, 29 Jan 2024 12:42:04 +0000 Subject: [PATCH 2/4] Revert "format w new black" This reverts commit 74b9619cc6b565f85aef1e89fc01900b86c8b991. --- .../core/openbb_core/app/model/preferences.py | 6 ++--- .../core/openbb_core/app/router.py | 6 ++--- .../standard_models/eu_yield_curve.py | 10 ++++---- .../biztoc/openbb_biztoc/models/world_news.py | 6 ++--- .../openbb_cboe/models/index_historical.py | 4 +++- .../openbb_fmp/models/crypto_historical.py | 6 ++--- .../openbb_fmp/models/currency_historical.py | 6 ++--- .../fmp/openbb_fmp/models/etf_search.py | 10 ++++---- .../fmp/openbb_fmp/models/index_historical.py | 6 ++--- .../fmp/openbb_fmp/models/market_indices.py | 6 ++--- .../fred/openbb_fred/models/dwpcr_rates.py | 6 ++--- .../fred/openbb_fred/models/series.py | 10 ++++---- .../models/equity_historical.py | 6 ++--- .../models/income_statement.py | 10 ++++---- .../openbb_nasdaq/models/sp500_multiples.py | 10 ++++---- .../models/crypto_historical.py | 6 ++--- .../models/currency_historical.py | 6 ++--- .../openbb_polygon/models/income_statement.py | 10 ++++---- .../openbb_polygon/models/index_historical.py | 6 ++--- .../openbb_polygon/models/market_indices.py | 6 ++--- .../sec/openbb_sec/models/etf_holdings.py | 24 +++++++++---------- .../openbb_tiingo/models/crypto_historical.py | 6 ++--- .../models/currency_historical.py | 6 ++--- .../openbb_tiingo/models/equity_historical.py | 6 ++--- openbb_terminal/core/sdk/sdk_helpers.py | 4 +--- .../overview/pycoingecko_view.py | 4 +--- .../dashboards/stream/pages/Indicators.py | 6 ++--- .../econometrics/econometrics_controller.py | 18 +++++++------- openbb_terminal/economy/economy_controller.py | 6 ++--- openbb_terminal/economy/fred_model.py | 8 +++---- openbb_terminal/economy/fred_view.py | 4 +--- openbb_terminal/fixedincome/fred_view.py | 4 +--- openbb_terminal/fixedincome/oecd_view.py | 4 +--- openbb_terminal/helper_classes.py | 18 +++++++------- openbb_terminal/helper_funcs.py | 4 +--- openbb_terminal/helpers_denomination.py | 4 +--- .../portfolio/attribution_model.py | 22 ++++++++--------- .../portfolio/portfolio_controller.py | 12 ++++------ .../portfolio_optimization/po_model.py | 4 +--- openbb_terminal/reports/reports_controller.py | 6 ++--- .../stocks/dark_pool_shorts/sec_model.py | 6 ++--- .../dark_pool_shorts/shortinterest_model.py | 6 ++--- .../stocks/discovery/finviz_view.py | 4 +--- .../business_insider_model.py | 8 +++---- .../business_insider_view.py | 4 +--- .../stocks/fundamental_analysis/dcf_view.py | 4 +--- .../stocks/insider/openinsider_view.py | 16 ++++++------- 47 files changed, 169 insertions(+), 191 deletions(-) diff --git a/openbb_platform/core/openbb_core/app/model/preferences.py b/openbb_platform/core/openbb_core/app/model/preferences.py index c113e409d55e..0fb2a555500b 100644 --- a/openbb_platform/core/openbb_core/app/model/preferences.py +++ b/openbb_platform/core/openbb_core/app/model/preferences.py @@ -27,9 +27,9 @@ class Preferences(BaseModel): field_order: bool = ( False # Whether to display the field order by which the data was defined ) - output_type: Literal[ - "OBBject", "dataframe", "polars", "numpy", "dict", "chart" - ] = Field(default="OBBject", description="Python default output type.") + output_type: Literal["OBBject", "dataframe", "polars", "numpy", "dict", "chart"] = ( + Field(default="OBBject", description="Python default output type.") + ) model_config = ConfigDict(validate_assignment=True) diff --git a/openbb_platform/core/openbb_core/app/router.py b/openbb_platform/core/openbb_core/app/router.py index 4c2112b6c201..2426f2f6da97 100644 --- a/openbb_platform/core/openbb_core/app/router.py +++ b/openbb_platform/core/openbb_core/app/router.py @@ -284,9 +284,9 @@ def command( if deprecation_message: kwargs["summary"] = deprecation_message else: - kwargs[ - "summary" - ] = "This functionality will be deprecated in the future releases." + kwargs["summary"] = ( + "This functionality will be deprecated in the future releases." + ) api_router.add_api_route(**kwargs) diff --git a/openbb_platform/core/openbb_core/provider/standard_models/eu_yield_curve.py b/openbb_platform/core/openbb_core/provider/standard_models/eu_yield_curve.py index 937eed355cba..f1de1e00b77d 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/eu_yield_curve.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/eu_yield_curve.py @@ -16,11 +16,11 @@ class EUYieldCurveQueryParams(QueryParams): date: Optional[dateType] = Field( default=None, description=QUERY_DESCRIPTIONS.get("date", "") ) - yield_curve_type: Literal[ - "spot_rate", "instantaneous_forward", "par_yield" - ] = Field( - default="spot_rate", - description="The yield curve type.", + yield_curve_type: Literal["spot_rate", "instantaneous_forward", "par_yield"] = ( + Field( + default="spot_rate", + description="The yield curve type.", + ) ) diff --git a/openbb_platform/providers/biztoc/openbb_biztoc/models/world_news.py b/openbb_platform/providers/biztoc/openbb_biztoc/models/world_news.py index 4c98abaf685c..31a080a87a0a 100644 --- a/openbb_platform/providers/biztoc/openbb_biztoc/models/world_news.py +++ b/openbb_platform/providers/biztoc/openbb_biztoc/models/world_news.py @@ -16,9 +16,9 @@ class BiztocWorldNewsQueryParams(WorldNewsQueryParams): """Biztoc World News Query.""" - filter: Literal[ - "crypto", "hot", "latest", "main", "media", "source", "tag" - ] = Field(default="latest", description="Filter by type of news.") + filter: Literal["crypto", "hot", "latest", "main", "media", "source", "tag"] = ( + Field(default="latest", description="Filter by type of news.") + ) source: str = Field( description="Filter by a specific publisher. Only valid when filter is set to source.", default="bloomberg", diff --git a/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py b/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py index 2da810d1acfb..a45f44269d84 100644 --- a/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py +++ b/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py @@ -137,7 +137,9 @@ def _generate_historical_prices_url( ) url += f"{symbol.replace('^', '')}.json" else: - base_url: str = f"https://cdn.cboe.com/api/global/delayed_quotes/charts/{interval_type}" + base_url: str = ( + f"https://cdn.cboe.com/api/global/delayed_quotes/charts/{interval_type}" + ) url = ( base_url + f"/_{symbol.replace('^', '')}.json" if symbol.replace("^", "") in TICKER_EXCEPTIONS 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 7134b17355fa..5dd814465e58 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py @@ -28,9 +28,9 @@ class FMPCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): timeseries: Optional[NonNegativeInt] = Field( default=None, description="Number of days to look back." ) - interval: Literal[ - "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" - ] = Field(default="1day", description="Data granularity.") + interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( + Field(default="1day", description="Data granularity.") + ) class FMPCryptoHistoricalData(CryptoHistoricalData): 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 56d12e51bc68..e54de3b4fa02 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py @@ -22,9 +22,9 @@ class FMPCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): __alias_dict__ = {"start_date": "from", "end_date": "to"} - interval: Literal[ - "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" - ] = Field(default="1day", description="Data granularity.") + interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( + Field(default="1day", description="Data granularity.") + ) class FMPCurrencyHistoricalData(CurrencyHistoricalData): diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/etf_search.py b/openbb_platform/providers/fmp/openbb_fmp/models/etf_search.py index 2e8f899a1623..38ba113ff0e8 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/etf_search.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/etf_search.py @@ -15,11 +15,11 @@ class FMPEtfSearchQueryParams(EtfSearchQueryParams): """FMP ETF Search Query.""" - exchange: Optional[ - Literal["AMEX", "NYSE", "NASDAQ", "ETF", "TSX", "EURONEXT"] - ] = Field( - description="The exchange code the ETF trades on.", - default=None, + exchange: Optional[Literal["AMEX", "NYSE", "NASDAQ", "ETF", "TSX", "EURONEXT"]] = ( + Field( + description="The exchange code the ETF trades on.", + default=None, + ) ) is_active: Optional[Literal[True, False]] = Field( description="Whether the ETF is actively trading.", diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py index d3e067a56451..d3b2210c1190 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py @@ -26,9 +26,9 @@ class FMPIndexHistoricalQueryParams(IndexHistoricalQueryParams): timeseries: Optional[NonNegativeInt] = Field( default=None, description="Number of days to look back." ) - interval: Literal[ - "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" - ] = Field(default="1day", description="Data granularity.") + interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( + Field(default="1day", description="Data granularity.") + ) sort: Literal["asc", "desc"] = Field( default="desc", description="Sort the data in ascending or descending order." ) 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 f20cba581c95..7d860c4955de 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/market_indices.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/market_indices.py @@ -26,9 +26,9 @@ class FMPMarketIndicesQueryParams(MarketIndicesQueryParams): timeseries: Optional[NonNegativeInt] = Field( default=None, description="Number of days to look back." ) - interval: Literal[ - "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" - ] = Field(default="1day", description="Data granularity.") + interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( + Field(default="1day", description="Data granularity.") + ) sort: Literal["asc", "desc"] = Field( default="desc", description="Sort the data in ascending or descending order." ) diff --git a/openbb_platform/providers/fred/openbb_fred/models/dwpcr_rates.py b/openbb_platform/providers/fred/openbb_fred/models/dwpcr_rates.py index 732c4347aa13..24c63ff94a4b 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/dwpcr_rates.py +++ b/openbb_platform/providers/fred/openbb_fred/models/dwpcr_rates.py @@ -22,9 +22,9 @@ class FREDDiscountWindowPrimaryCreditRateParams(DiscountWindowPrimaryCreditRateParams): """FRED Discount Window Primary Credit Rate Query.""" - parameter: Literal[ - "daily_excl_weekend", "monthly", "weekly", "daily", "annual" - ] = Field(default="daily_excl_weekend", description="FRED series ID of DWPCR data.") + parameter: Literal["daily_excl_weekend", "monthly", "weekly", "daily", "annual"] = ( + Field(default="daily_excl_weekend", description="FRED series ID of DWPCR data.") + ) class FREDDiscountWindowPrimaryCreditRateData(DiscountWindowPrimaryCreditRateData): diff --git a/openbb_platform/providers/fred/openbb_fred/models/series.py b/openbb_platform/providers/fred/openbb_fred/models/series.py index 38af7f6be7f3..e9f88e5b7227 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/series.py +++ b/openbb_platform/providers/fred/openbb_fred/models/series.py @@ -78,11 +78,10 @@ class FredSeriesQueryParams(SeriesQueryParams): eop = End of Period """, ) - transform: Literal[ - None, "chg", "ch1", "pch", "pc1", "pca", "cch", "cca", "log" - ] = Field( - default=None, - description=""" + transform: Literal[None, "chg", "ch1", "pch", "pc1", "pca", "cch", "cca", "log"] = ( + Field( + default=None, + description=""" Transformation type None = No transformation chg = Change @@ -94,6 +93,7 @@ class FredSeriesQueryParams(SeriesQueryParams): cca = Continuously Compounded Annual Rate of Change log = Natural Log """, + ) ) limit: int = Field(description=QUERY_DESCRIPTIONS.get("limit", ""), default=100000) diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py index a129ae5abbb3..c4db7c181e5d 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py @@ -49,9 +49,9 @@ class IntrinioEquityHistoricalQueryParams(EquityHistoricalQueryParams): _interval_size: Literal["1m", "5m", "10m", "15m", "30m", "60m", "1h"] = PrivateAttr( default=None ) - _frequency: Literal[ - "daily", "weekly", "monthly", "quarterly", "yearly" - ] = PrivateAttr(default=None) + _frequency: Literal["daily", "weekly", "monthly", "quarterly", "yearly"] = ( + PrivateAttr(default=None) + ) # pylint: disable=protected-access @model_validator(mode="after") diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py index 004408b2b480..f23467392b48 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py @@ -226,11 +226,11 @@ class IntrinioIncomeStatementData(IncomeStatementData): deposits_interest_expense: Optional[float] = Field( default=None, description="Deposits interest expense" ) - federal_funds_purchased_and_securities_sold_interest_expense: Optional[ - float - ] = Field( - default=None, - description="Federal funds purchased and securities sold interest expense", + federal_funds_purchased_and_securities_sold_interest_expense: Optional[float] = ( + Field( + default=None, + description="Federal funds purchased and securities sold interest expense", + ) ) other_interest_expense: Optional[float] = Field( default=None, description="Other interest expense" diff --git a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/sp500_multiples.py b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/sp500_multiples.py index d62997b340f8..969359e7ad27 100644 --- a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/sp500_multiples.py +++ b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/sp500_multiples.py @@ -15,11 +15,11 @@ class NasdaqSP500MultiplesQueryParams(SP500MultiplesQueryParams): """Nasdaq SP500 Multiples Query.""" - collapse: Optional[ - Literal["daily", "weekly", "monthly", "quarterly", "annual"] - ] = Field( - description="Collapse the frequency of the time series.", - default="monthly", + collapse: Optional[Literal["daily", "weekly", "monthly", "quarterly", "annual"]] = ( + Field( + description="Collapse the frequency of the time series.", + default="monthly", + ) ) transform: Optional[Literal["diff", "rdiff", "cumul", "normalize"]] = Field( description="The transformation of the time series.", diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/crypto_historical.py b/openbb_platform/providers/polygon/openbb_polygon/models/crypto_historical.py index 37a86a9c161e..c7ae932f62c7 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/crypto_historical.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/crypto_historical.py @@ -23,9 +23,9 @@ class PolygonCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): multiplier: PositiveInt = Field( default=1, description="Multiplier of the timespan." ) - timespan: Literal[ - "minute", "hour", "day", "week", "month", "quarter", "year" - ] = Field(default="day", description="Timespan of the data.") + timespan: Literal["minute", "hour", "day", "week", "month", "quarter", "year"] = ( + Field(default="day", description="Timespan of the data.") + ) sort: Literal["asc", "desc"] = Field( default="desc", description="Sort order of the data." ) diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/currency_historical.py b/openbb_platform/providers/polygon/openbb_polygon/models/currency_historical.py index 9e4f8838c192..b0b9611e1f2f 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/currency_historical.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/currency_historical.py @@ -23,9 +23,9 @@ class PolygonCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): multiplier: PositiveInt = Field( default=1, description="Multiplier of the timespan." ) - timespan: Literal[ - "minute", "hour", "day", "week", "month", "quarter", "year" - ] = Field(default="day", description="Timespan of the data.") + timespan: Literal["minute", "hour", "day", "week", "month", "quarter", "year"] = ( + Field(default="day", description="Timespan of the data.") + ) sort: Literal["asc", "desc"] = Field( default="desc", description="Sort order of the data." ) diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py b/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py index 493646633a37..8f0ca05df7dd 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py @@ -219,11 +219,11 @@ class PolygonIncomeStatementData(IncomeStatementData): default=None, description="Participating Securities Distributed And Undistributed Earnings Loss Basic", ) - undistributed_earnings_allocated_to_participating_securities: Optional[ - float - ] = Field( - default=None, - description="Undistributed Earnings Allocated To Participating Securities", + undistributed_earnings_allocated_to_participating_securities: Optional[float] = ( + Field( + default=None, + description="Undistributed Earnings Allocated To Participating Securities", + ) ) common_stock_dividends: Optional[float] = Field( default=None, description="Common Stock Dividends" diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/index_historical.py b/openbb_platform/providers/polygon/openbb_polygon/models/index_historical.py index f666aae41a57..d2b3f83d4ebe 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/index_historical.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/index_historical.py @@ -20,9 +20,9 @@ class PolygonIndexHistoricalQueryParams(IndexHistoricalQueryParams): Source: https://polygon.io/docs/indices/getting-started """ - timespan: Literal[ - "minute", "hour", "day", "week", "month", "quarter", "year" - ] = Field(default="day", description="Timespan of the data.") + timespan: Literal["minute", "hour", "day", "week", "month", "quarter", "year"] = ( + Field(default="day", description="Timespan of the data.") + ) sort: Literal["asc", "desc"] = Field( default="desc", description="Sort order of the data." ) diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/market_indices.py b/openbb_platform/providers/polygon/openbb_polygon/models/market_indices.py index a81718ac54f1..b473a42cffb7 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/market_indices.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/market_indices.py @@ -20,9 +20,9 @@ class PolygonMarketIndicesQueryParams(MarketIndicesQueryParams): Source: https://polygon.io/docs/indices/getting-started """ - timespan: Literal[ - "minute", "hour", "day", "week", "month", "quarter", "year" - ] = Field(default="day", description="Timespan of the data.") + timespan: Literal["minute", "hour", "day", "week", "month", "quarter", "year"] = ( + Field(default="day", description="Timespan of the data.") + ) sort: Literal["asc", "desc"] = Field( default="desc", description="Sort order of the data." ) diff --git a/openbb_platform/providers/sec/openbb_sec/models/etf_holdings.py b/openbb_platform/providers/sec/openbb_sec/models/etf_holdings.py index 80cb8b49ca5b..e25853e296ec 100644 --- a/openbb_platform/providers/sec/openbb_sec/models/etf_holdings.py +++ b/openbb_platform/providers/sec/openbb_sec/models/etf_holdings.py @@ -432,9 +432,9 @@ def transform_data( option_swaption_warrant_deriv = derivative_info[ "optionSwaptionWarrantDeriv" ] - df.loc[ - i, "derivative_category" - ] = option_swaption_warrant_deriv.get("@derivCat") + df.loc[i, "derivative_category"] = ( + option_swaption_warrant_deriv.get("@derivCat") + ) df.loc[i, "counterparty"] = option_swaption_warrant_deriv[ "counterparties" ].get("counterpartyName") @@ -462,21 +462,21 @@ def transform_data( df.loc[i, "option_type"] = option_swaption_warrant_deriv.get( "putOrCall" ) - df.loc[ - i, "derivative_payoff" - ] = option_swaption_warrant_deriv.get("writtenOrPur") + df.loc[i, "derivative_payoff"] = ( + option_swaption_warrant_deriv.get("writtenOrPur") + ) df.loc[i, "expiry_date"] = option_swaption_warrant_deriv.get( "expDt" ) df.loc[i, "exercise_price"] = option_swaption_warrant_deriv.get( "exercisePrice" ) - df.loc[ - i, "exercise_currency" - ] = option_swaption_warrant_deriv.get("exercisePriceCurCd") - df.loc[ - i, "shares_per_contract" - ] = option_swaption_warrant_deriv.get("shareNo") + df.loc[i, "exercise_currency"] = ( + option_swaption_warrant_deriv.get("exercisePriceCurCd") + ) + df.loc[i, "shares_per_contract"] = ( + option_swaption_warrant_deriv.get("shareNo") + ) if option_swaption_warrant_deriv.get("delta") != "XXXX": df.loc[i, "delta"] = option_swaption_warrant_deriv.get( "delta" 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 9b34cc722930..d0ae6599206b 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py @@ -26,9 +26,9 @@ class TiingoCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): "end_date": "endDate", } - interval: Literal[ - "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" - ] = Field(default="1day", description="Data granularity.", alias="resampleFreq") + interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( + Field(default="1day", description="Data granularity.", alias="resampleFreq") + ) exchanges: Optional[List[str]] = Field( default=None, diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py index 290c519d0b12..748f782c8034 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py @@ -26,9 +26,9 @@ class TiingoCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): "end_date": "endDate", } - interval: Literal[ - "1min", "5min", "15min", "30min", "1hour", "4hour", "1day" - ] = Field(default="1day", description="Data granularity.", alias="resampleFreq") + interval: Literal["1min", "5min", "15min", "30min", "1hour", "4hour", "1day"] = ( + Field(default="1day", description="Data granularity.", alias="resampleFreq") + ) class TiingoCurrencyHistoricalData(CurrencyHistoricalData): diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py index 9e69914aaa8b..0282fa945c62 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py @@ -28,9 +28,9 @@ class TiingoEquityHistoricalQueryParams(EquityHistoricalQueryParams): interval: Literal["1d", "1W", "1M", "1Y"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") ) - _frequency: Literal[ - "daily", "weekly", "monthly", "quarterly", "yearly" - ] = PrivateAttr(default=None) + _frequency: Literal["daily", "weekly", "monthly", "quarterly", "yearly"] = ( + PrivateAttr(default=None) + ) # pylint: disable=protected-access @model_validator(mode="after") # type: ignore[arg-type] diff --git a/openbb_terminal/core/sdk/sdk_helpers.py b/openbb_terminal/core/sdk/sdk_helpers.py index 40dfd748ea22..bc6ae8b3adb3 100644 --- a/openbb_terminal/core/sdk/sdk_helpers.py +++ b/openbb_terminal/core/sdk/sdk_helpers.py @@ -48,9 +48,7 @@ def clean_attr_desc(attr: Optional[Any] = None) -> Optional[str]: return ( attr.__doc__.splitlines()[1].lstrip() if not attr.__doc__.splitlines()[0] - else attr.__doc__.splitlines()[0].lstrip() - if attr.__doc__ - else "" + else attr.__doc__.splitlines()[0].lstrip() if attr.__doc__ else "" ) diff --git a/openbb_terminal/cryptocurrency/overview/pycoingecko_view.py b/openbb_terminal/cryptocurrency/overview/pycoingecko_view.py index d5cd95f8d746..a7364a6a8f6e 100644 --- a/openbb_terminal/cryptocurrency/overview/pycoingecko_view.py +++ b/openbb_terminal/cryptocurrency/overview/pycoingecko_view.py @@ -158,9 +158,7 @@ def display_crypto_heatmap( ) fig.add_trace(treemap["data"][0], row=1, col=1) - fig.data[ - 0 - ].texttemplate = ( + fig.data[0].texttemplate = ( "

%{label}
%{customdata[0]:.2f}%



" ) fig.data[0].insidetextfont = dict( diff --git a/openbb_terminal/dashboards/stream/pages/Indicators.py b/openbb_terminal/dashboards/stream/pages/Indicators.py index 4f45e55041e2..e280bc170a31 100644 --- a/openbb_terminal/dashboards/stream/pages/Indicators.py +++ b/openbb_terminal/dashboards/stream/pages/Indicators.py @@ -382,9 +382,9 @@ async def async_on_ticker_change(self): for ticker in tickers: if ticker not in st.session_state["indicators_dfs"]: - st.session_state["indicators_dfs"][ - ticker - ] = await self.load_ticker_data(ticker, interval, start, end, source) + st.session_state["indicators_dfs"][ticker] = ( + await self.load_ticker_data(ticker, interval, start, end, source) + ) if st.session_state["indicators_dfs"][ticker].empty: indicators_dfs = st.session_state["indicators_dfs"] del indicators_dfs[ticker] diff --git a/openbb_terminal/econometrics/econometrics_controller.py b/openbb_terminal/econometrics/econometrics_controller.py index 158096d61826..c8c2cf30b12f 100644 --- a/openbb_terminal/econometrics/econometrics_controller.py +++ b/openbb_terminal/econometrics/econometrics_controller.py @@ -1743,15 +1743,15 @@ def call_panel(self, other_args: List[str]): self.regression[regression][ "independent" ] = independent_variables - self.regression[regression_name][ - "model" - ] = regression_view.display_panel( - regression_df[dependent_variable], - regression_df[independent_variables], - regression, - ns_parser.entity_effects, - ns_parser.time_effects, - ns_parser.export, + self.regression[regression_name]["model"] = ( + regression_view.display_panel( + regression_df[dependent_variable], + regression_df[independent_variables], + regression, + ns_parser.entity_effects, + ns_parser.time_effects, + ns_parser.export, + ) ) else: console.print( diff --git a/openbb_terminal/economy/economy_controller.py b/openbb_terminal/economy/economy_controller.py index 68f87b968bb8..8aacd86b9750 100644 --- a/openbb_terminal/economy/economy_controller.py +++ b/openbb_terminal/economy/economy_controller.py @@ -1436,9 +1436,9 @@ def call_fred(self, other_args: List[str]): if not df.empty: for series_id, data in detail.items(): - self.FRED_TITLES[ - series_id - ] = f"{data['title']} ({data['units']})" + self.FRED_TITLES[series_id] = ( + f"{data['title']} ({data['units']})" + ) # Making data available at the class level self.DATASETS["fred"][series_id] = df[series_id] diff --git a/openbb_terminal/economy/fred_model.py b/openbb_terminal/economy/fred_model.py index dc0b4b90acc8..933c7525c2c9 100644 --- a/openbb_terminal/economy/fred_model.py +++ b/openbb_terminal/economy/fred_model.py @@ -374,10 +374,10 @@ def get_cpi( for series_id, country_value, frequency_value, unit_value in series[ ["series_id", "country", "frequency", "units"] ].values: - series_dictionary[ - f"{country_value}-{frequency_value}-{unit_value}" - ] = get_series_data( - series_id=series_id, start_date=start_date, end_date=end_date + series_dictionary[f"{country_value}-{frequency_value}-{unit_value}"] = ( + get_series_data( + series_id=series_id, start_date=start_date, end_date=end_date + ) ) df = pd.DataFrame.from_dict(series_dictionary) diff --git a/openbb_terminal/economy/fred_view.py b/openbb_terminal/economy/fred_view.py index 403692ea1f35..21fc2fa06249 100644 --- a/openbb_terminal/economy/fred_view.py +++ b/openbb_terminal/economy/fred_view.py @@ -265,9 +265,7 @@ def plot_cpi( title += ( " Indices" if len(df.columns) > 1 - else f" Index for {country}" - if country - else "" + else f" Index for {country}" if country else "" ) fig = OpenBBFigure(yaxis_title=ylabel_dict.get(units, "Index (2015=100)")) diff --git a/openbb_terminal/fixedincome/fred_view.py b/openbb_terminal/fixedincome/fred_view.py index a8cc37b2e876..9c5cf7917587 100644 --- a/openbb_terminal/fixedincome/fred_view.py +++ b/openbb_terminal/fixedincome/fred_view.py @@ -1245,9 +1245,7 @@ def plot_icebofa( title = ( "" if df.empty - else "ICE BofA Bond Benchmark Indices" - if len(df.columns) > 1 - else df.columns[0] + else "ICE BofA Bond Benchmark Indices" if len(df.columns) > 1 else df.columns[0] ) fig = OpenBBFigure(yaxis_title="Yield (%)" if units == "percent" else "Index") diff --git a/openbb_terminal/fixedincome/oecd_view.py b/openbb_terminal/fixedincome/oecd_view.py index bbd28a74920e..b273dda9c3fe 100644 --- a/openbb_terminal/fixedincome/oecd_view.py +++ b/openbb_terminal/fixedincome/oecd_view.py @@ -83,9 +83,7 @@ def plot_treasuries( term = ( "Short and Long" if short_term and long_term - else "Long" - if long_term - else "Short" + else "Long" if long_term else "Short" ) title = f"{term} Term Interest Rates {' with forecasts' if forecast else ''}" fig.set_title(title) diff --git a/openbb_terminal/helper_classes.py b/openbb_terminal/helper_classes.py index 4eee377d9376..d64a13378739 100644 --- a/openbb_terminal/helper_classes.py +++ b/openbb_terminal/helper_classes.py @@ -202,17 +202,17 @@ def load_available_styles_from_folder(self, folder: Path) -> None: continue if stf.name.endswith(".mplstyle"): - self.mpl_styles_available[ - stf.name.replace(".mplstyle", "") - ] = os.path.join(folder, stf) + self.mpl_styles_available[stf.name.replace(".mplstyle", "")] = ( + os.path.join(folder, stf) + ) elif stf.name.endswith(".mplrc.json"): - self.mpl_rcparams_available[ - stf.name.replace(".mplrc.json", "") - ] = os.path.join(folder, stf) + self.mpl_rcparams_available[stf.name.replace(".mplrc.json", "")] = ( + os.path.join(folder, stf) + ) elif stf.name.endswith(".mpfstyle.json"): - self.mpf_styles_available[ - stf.name.replace(".mpfstyle.json", "") - ] = os.path.join(folder, stf) + self.mpf_styles_available[stf.name.replace(".mpfstyle.json", "")] = ( + os.path.join(folder, stf) + ) elif stf.name.endswith(".richstyle.json"): self.console_styles_available[ stf.name.replace(".richstyle.json", "") diff --git a/openbb_terminal/helper_funcs.py b/openbb_terminal/helper_funcs.py index 640b17f822e3..0de3f3cb2cb6 100644 --- a/openbb_terminal/helper_funcs.py +++ b/openbb_terminal/helper_funcs.py @@ -1159,9 +1159,7 @@ def text_adjustment_justify(self, texts, max_len, mode="right"): justify = ( str.ljust if (mode == "left") - else str.rjust - if (mode == "right") - else str.center + else str.rjust if (mode == "right") else str.center ) out = [] for s in texts: diff --git a/openbb_terminal/helpers_denomination.py b/openbb_terminal/helpers_denomination.py index 8b6c5c4db25a..2516eb2e83d5 100644 --- a/openbb_terminal/helpers_denomination.py +++ b/openbb_terminal/helpers_denomination.py @@ -45,9 +45,7 @@ def apply( lambda series: ( series if skipPredicate is not None and skipPredicate(series) - else series * multiplier - if isinstance(series, (float, int)) - else series + else series * multiplier if isinstance(series, (float, int)) else series ), axis, ) diff --git a/openbb_terminal/portfolio/attribution_model.py b/openbb_terminal/portfolio/attribution_model.py index 57d36b90a16e..068b90451812 100644 --- a/openbb_terminal/portfolio/attribution_model.py +++ b/openbb_terminal/portfolio/attribution_model.py @@ -383,16 +383,16 @@ def get_daily_sector_prices(start_date, end_date) -> dict: sector_ticker, ) in sp500_tickers.items(): # iterate thru the sectors # load the data required from yfinance - sp500_tickers_data[ - sector - ] = { # builds a dictionary entry for the sector with adj close data - "sector_data": yf.download( - sector_ticker, - start=start_date, - end=end_date, - progress=False, - ignore_tz=True, - )["Adj Close"] - } # stores the data here + sp500_tickers_data[sector] = ( + { # builds a dictionary entry for the sector with adj close data + "sector_data": yf.download( + sector_ticker, + start=start_date, + end=end_date, + progress=False, + ignore_tz=True, + )["Adj Close"] + } + ) # stores the data here return sp500_tickers_data diff --git a/openbb_terminal/portfolio/portfolio_controller.py b/openbb_terminal/portfolio/portfolio_controller.py index f0a3a077700d..1f2a0fa978ee 100644 --- a/openbb_terminal/portfolio/portfolio_controller.py +++ b/openbb_terminal/portfolio/portfolio_controller.py @@ -261,13 +261,11 @@ def call_po(self, _): categories["COUNTRY"][transaction["Ticker"]] = transaction[ "Country" ] - categories["CURRENT_INVESTED_AMOUNT"][ - transaction["Ticker"] - ] = transactions[ - transactions["Ticker"] == transaction["Ticker"] - ][ - "Investment" - ].sum() + categories["CURRENT_INVESTED_AMOUNT"][transaction["Ticker"]] = ( + transactions[ + transactions["Ticker"] == transaction["Ticker"] + ]["Investment"].sum() + ) categories["CURRENCY"][transaction["Ticker"]] = transaction[ "Currency" ] diff --git a/openbb_terminal/portfolio/portfolio_optimization/po_model.py b/openbb_terminal/portfolio/portfolio_optimization/po_model.py index 2b2cf440bcbd..c35f1b346fe0 100644 --- a/openbb_terminal/portfolio/portfolio_optimization/po_model.py +++ b/openbb_terminal/portfolio/portfolio_optimization/po_model.py @@ -1191,9 +1191,7 @@ def get_blacklitterman( @log_start_end(log=logger) -def get_ef( - portfolio_engine: Optional[PoEngine] = None, **kwargs -) -> Tuple[ +def get_ef(portfolio_engine: Optional[PoEngine] = None, **kwargs) -> Tuple[ pd.DataFrame, pd.DataFrame, pd.DataFrame, diff --git a/openbb_terminal/reports/reports_controller.py b/openbb_terminal/reports/reports_controller.py index d37e0c0dcbdb..1cc5f408ba40 100644 --- a/openbb_terminal/reports/reports_controller.py +++ b/openbb_terminal/reports/reports_controller.py @@ -74,9 +74,9 @@ def update_choices(self): self.choices[report_name] = {} for arg in self.PARAMETERS_DICT[report_name]: if report_name in reports_model.REPORT_CHOICES: - self.choices[report_name][ - "--" + arg - ] = reports_model.REPORT_CHOICES[report_name]["--" + arg] + self.choices[report_name]["--" + arg] = ( + reports_model.REPORT_CHOICES[report_name]["--" + arg] + ) self.choices["support"] = self.SUPPORT_CHOICES self.choices["about"] = self.ABOUT_CHOICES diff --git a/openbb_terminal/stocks/dark_pool_shorts/sec_model.py b/openbb_terminal/stocks/dark_pool_shorts/sec_model.py index 5f1bdd784796..3a122ac9a3a7 100644 --- a/openbb_terminal/stocks/dark_pool_shorts/sec_model.py +++ b/openbb_terminal/stocks/dark_pool_shorts/sec_model.py @@ -50,9 +50,9 @@ def catching_diff_url_formats(ftd_urls: list) -> list: ftd_url == "https://www.sec.gov/files/data/fails-deliver-data/cnsfails201910a.zip" ): - ftd_urls[ - i - ] = "https://www.sec.gov/files/data/fails-deliver-data/cnsfails201910a_0.zip" + ftd_urls[i] = ( + "https://www.sec.gov/files/data/fails-deliver-data/cnsfails201910a_0.zip" + ) return ftd_urls diff --git a/openbb_terminal/stocks/dark_pool_shorts/shortinterest_model.py b/openbb_terminal/stocks/dark_pool_shorts/shortinterest_model.py index 56de4d898d0f..db884a43ecb5 100644 --- a/openbb_terminal/stocks/dark_pool_shorts/shortinterest_model.py +++ b/openbb_terminal/stocks/dark_pool_shorts/shortinterest_model.py @@ -58,9 +58,9 @@ def get_high_short_interest() -> DataFrame: shorted_stock_data = a_stock_txt.split("\n") if len(shorted_stock_data) == 8: - df_high_short_interest.loc[ - len(df_high_short_interest.index) - ] = shorted_stock_data[:-1] + df_high_short_interest.loc[len(df_high_short_interest.index)] = ( + shorted_stock_data[:-1] + ) shorted_stock_data = [] diff --git a/openbb_terminal/stocks/discovery/finviz_view.py b/openbb_terminal/stocks/discovery/finviz_view.py index 64cd06b63a30..1fb46d8419d4 100644 --- a/openbb_terminal/stocks/discovery/finviz_view.py +++ b/openbb_terminal/stocks/discovery/finviz_view.py @@ -81,9 +81,7 @@ def display_heatmap( ) fig.add_trace(treemap["data"][0], row=1, col=1) - fig.data[ - 0 - ].texttemplate = ( + fig.data[0].texttemplate = ( "

%{label}
%{customdata[0]:.2f}%



" ) fig.data[0].insidetextfont = dict(family="Arial Black", size=20, color="white") diff --git a/openbb_terminal/stocks/fundamental_analysis/business_insider_model.py b/openbb_terminal/stocks/fundamental_analysis/business_insider_model.py index 7fa641b153fe..f83e57c89e60 100644 --- a/openbb_terminal/stocks/fundamental_analysis/business_insider_model.py +++ b/openbb_terminal/stocks/fundamental_analysis/business_insider_model.py @@ -95,10 +95,10 @@ def get_management(symbol: str) -> pd.DataFrame: df_management = df_management.set_index("Name") for s_name in df_management.index: - df_management.loc[s_name][ - "Info" - ] = f"http://www.google.com/search?q={s_name} {symbol.upper()}".replace( - " ", "%20" + df_management.loc[s_name]["Info"] = ( + f"http://www.google.com/search?q={s_name} {symbol.upper()}".replace( + " ", "%20" + ) ) return df_management diff --git a/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py b/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py index 3422a49ef538..6c9620878d3e 100644 --- a/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py +++ b/openbb_terminal/stocks/fundamental_analysis/business_insider_view.py @@ -163,9 +163,7 @@ def adjust_splits(row, splits: pd.DataFrame): lambda x: ( theme.up_color if x == "BUY" - else theme.down_color - if x == "SELL" - else "#b3a8a8" + else theme.down_color if x == "SELL" else "#b3a8a8" ) ) diff --git a/openbb_terminal/stocks/fundamental_analysis/dcf_view.py b/openbb_terminal/stocks/fundamental_analysis/dcf_view.py index 9b4eeca68d6f..53cdf5fa9b1d 100644 --- a/openbb_terminal/stocks/fundamental_analysis/dcf_view.py +++ b/openbb_terminal/stocks/fundamental_analysis/dcf_view.py @@ -988,9 +988,7 @@ def title_to_row(self, title: str) -> int: df = ( self.df["IS"] if title in self.df["IS"].index - else self.df["BS"] - if title in self.df["BS"].index - else self.df["CF"] + else self.df["BS"] if title in self.df["BS"].index else self.df["CF"] ) ind = ( df.index.get_loc(title) diff --git a/openbb_terminal/stocks/insider/openinsider_view.py b/openbb_terminal/stocks/insider/openinsider_view.py index 50fe746002cd..e86cf2f7b092 100644 --- a/openbb_terminal/stocks/insider/openinsider_view.py +++ b/openbb_terminal/stocks/insider/openinsider_view.py @@ -213,20 +213,20 @@ def print_insider_filter( new_df_insider["Trade Type"] == "S - Sale" ].apply(lambda_red_highlight) if not new_df_insider[new_df_insider["Trade Type"] == "S - Sale+OE"].empty: - new_df_insider[ - new_df_insider["Trade Type"] == "S - Sale+OE" - ] = new_df_insider[new_df_insider["Trade Type"] == "S - Sale+OE"].apply( - lambda_yellow_highlight + new_df_insider[new_df_insider["Trade Type"] == "S - Sale+OE"] = ( + new_df_insider[new_df_insider["Trade Type"] == "S - Sale+OE"].apply( + lambda_yellow_highlight + ) ) if not new_df_insider[new_df_insider["Trade Type"] == "F - Tax"].empty: new_df_insider[new_df_insider["Trade Type"] == "F - Tax"] = new_df_insider[ new_df_insider["Trade Type"] == "F - Tax" ].apply(lambda_magenta_highlight) if not new_df_insider[new_df_insider["Trade Type"] == "P - Purchase"].empty: - new_df_insider[ - new_df_insider["Trade Type"] == "P - Purchase" - ] = new_df_insider[new_df_insider["Trade Type"] == "P - Purchase"].apply( - lambda_green_highlight + new_df_insider[new_df_insider["Trade Type"] == "P - Purchase"] = ( + new_df_insider[new_df_insider["Trade Type"] == "P - Purchase"].apply( + lambda_green_highlight + ) ) patch_pandas_text_adjustment() From ca3f6b09bc4fe09970685bc11bba262da7c42d5c Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Wed, 31 Jan 2024 11:05:40 +0000 Subject: [PATCH 3/4] better pr templates --- .../obb_developer_pull_request_template.md | 1 + .github/platform_pull_request_template.md | 40 +++++++++ .github/pull_request_template.md | 81 +------------------ .github/terminal_pull_request_template.md | 29 +++++++ 4 files changed, 74 insertions(+), 77 deletions(-) create mode 100644 .github/obb_developer_pull_request_template.md create mode 100644 .github/platform_pull_request_template.md create mode 100644 .github/terminal_pull_request_template.md diff --git a/.github/obb_developer_pull_request_template.md b/.github/obb_developer_pull_request_template.md new file mode 100644 index 000000000000..9fc178541cfd --- /dev/null +++ b/.github/obb_developer_pull_request_template.md @@ -0,0 +1 @@ +# Pull Request Template for OpenBB Developers diff --git a/.github/platform_pull_request_template.md b/.github/platform_pull_request_template.md new file mode 100644 index 000000000000..0755c9b14e36 --- /dev/null +++ b/.github/platform_pull_request_template.md @@ -0,0 +1,40 @@ +# Pull Request the OpenBB Platform + +## Description + +- [ ] Summary of the change/ bug fix. +- [ ] Link # issue, if applicable. +- [ ] Screenshot of the feature or the bug before/after fix, if applicable. +- [ ] Relevant motivation and context. +- [ ] List any dependencies that are required for this change. + +## How has this been tested? + +- Please describe the tests that you ran to verify your changes. +- Please provide instructions so we can reproduce. +- Please also list any relevant details for your test configuration. + +- [ ] Ensure all unit and integration tests pass. +- If you modified/added command(s): + - [ ] Ensure the command(s) execute with the expected output. + - [ ] API. + - [ ] Python Interface. + - [ ] If applicable, please add new tests for the command (see [CONTRIBUTING.md](/openbb_platform/CONTRIBUTING.md) to leverage semi-automated testing). +- If a new provider was introduced or a new fetcher was added to an existing provider: + - [ ] Ensure the existing tests pass. + - [ ] Ensure the new provider and/or fetcher is stable and usable. + - [ ] If applicable, please add new tests for the provider and/or fetcher (see [CONTRIBUTING.md](/openbb_platform/CONTRIBUTING.md) to leverage semi-automated testing). +- If a new provider or extension was added: + - [ ] Update the list of [Extensions](/openbb_platform/EXTENSIONS.md). + - [ ] Update the list of [Providers](/openbb_platform/PROVIDERS.md). + - [ ] If it's a community extension or provider, update the [integration tests GitHub Action workflow](/.github/workflows/platform-api-integration-test.yml). + +## Checklist + +- [ ] I have performed a self-review of my own code. +- [ ] I have commented my code, particularly in hard-to-understand areas. +- [ ] I have adhered to the GitFlow naming convention and my branch name is in the format of `feature/feature-name` or `hotfix/hotfix-name`. +- [ ] I ensure that I am following the [CONTRIBUTING guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/blob/main/CONTRIBUTING.md). + - [ ] (If applicable) I have updated tests following [these guidelines](/openbb_platform/CONTRIBUTING.md#qa-your-extension). + + diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3df72068a852..fb04004546a6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,80 +1,7 @@ # Pull Request OpenBB -## The OpenBBTerminal +Please go the the `Preview` tab and select the appropriate PR sub-template: -
- Pull Request for the OpenBBTerminal - -### Description - -- [ ] Summary of the change/ bug fix. -- [ ] Link # issue, if applicable. -- [ ] Screenshot of the feature or the bug before/after fix, if applicable. -- [ ] Relevant motivation and context. -- [ ] List any dependencies that are required for this change. - -### How has this been tested? - -- Please describe the tests that you ran to verify your changes. -- Please provide instructions so we can reproduce. -- Please also list any relevant details for your test configuration. - -- [ ] Ensure the affected commands still execute in the OpenBB Terminal. -- [ ] Ensure the Platform (previously named SDK) is working as intended. -- [ ] Check any related reports. - -### Checklist - -- [ ] I ensure I have self-reviewed my code. -- [ ] I have commented/documented my code, particularly in hard-to-understand sections. -- [ ] I have adhered to the GitFlow naming convention and my branch name is in the format of `feature/feature-name` or `hotfix/hotfix-name`. -- [ ] Update [our documentation](https://openbb-finance.github.io/OpenBBTerminal/) following [these guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/website). Update any user guides that are affected by the changes. -- [ ] Update our tests following [these guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/tests). -- [ ] Make sure you are following our [CONTRIBUTING guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/blob/main/CONTRIBUTING.md). -- [ ] If a feature was added make sure to add it to the corresponding [integration test script](https://github.com/OpenBB-finance/OpenBBTerminal/tree/develop/openbb_terminal/miscellaneous/integration_tests_scripts). - -
- -## The OpenBB Platform - -
- Pull Request for the OpenBB Platform - -### Description - -- [ ] Summary of the change/ bug fix. -- [ ] Link # issue, if applicable. -- [ ] Screenshot of the feature or the bug before/after fix, if applicable. -- [ ] Relevant motivation and context. -- [ ] List any dependencies that are required for this change. - -### How has this been tested? - -- Please describe the tests that you ran to verify your changes. -- Please provide instructions so we can reproduce. -- Please also list any relevant details for your test configuration. - -- [ ] Ensure all unit and integration tests pass. -- If you modified/added command(s): - - [ ] Ensure the command(s) execute with the expected output. - - [ ] API. - - [ ] Python Interface. - - [ ] If applicable, please add new tests for the command (see [CONTRIBUTING.md](/openbb_platform/CONTRIBUTING.md) to leverage semi-automated testing). -- If a new provider was introduced or a new fetcher was added to an existing provider: - - [ ] Ensure the existing tests pass. - - [ ] Ensure the new provider and/or fetcher is stable and usable. - - [ ] If applicable, please add new tests for the provider and/or fetcher (see [CONTRIBUTING.md](/openbb_platform/CONTRIBUTING.md) to leverage semi-automated testing). -- If a new provider or extension was added: - - [ ] Update the list of [Extensions](/openbb_platform/EXTENSIONS.md). - - [ ] Update the list of [Providers](/openbb_platform/PROVIDERS.md). - - [ ] If it's a community extension or provider, update the [integration tests GitHub Action workflow](/.github/workflows/platform-api-integration-test.yml). - -### Checklist - -- [ ] I have performed a self-review of my own code. -- [ ] I have commented my code, particularly in hard-to-understand areas. -- [ ] I have adhered to the GitFlow naming convention and my branch name is in the format of `feature/feature-name` or `hotfix/hotfix-name`. -- [ ] I ensure that I am following the [CONTRIBUTING guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/blob/main/CONTRIBUTING.md). - - [ ] (If applicable) I have updated tests following [these guidelines](/openbb_platform/CONTRIBUTING.md#qa-your-extension). - -
+* [OpenBB Platform](?expand=1&template=platform_pull_request_template.md) +* [OpenBB Terminal](?expand=1&template=terminal_pull_request_template.md) +* [OpenBB Developers](?expand=1&template=obb_developer_pull_request_template.md) diff --git a/.github/terminal_pull_request_template.md b/.github/terminal_pull_request_template.md new file mode 100644 index 000000000000..351d7049307a --- /dev/null +++ b/.github/terminal_pull_request_template.md @@ -0,0 +1,29 @@ +# Pull Request the OpenBBTerminal + +## Description + +- [ ] Summary of the change/ bug fix. +- [ ] Link # issue, if applicable. +- [ ] Screenshot of the feature or the bug before/after fix, if applicable. +- [ ] Relevant motivation and context. +- [ ] List any dependencies that are required for this change. + +## How has this been tested? + +- Please describe the tests that you ran to verify your changes. +- Please provide instructions so we can reproduce. +- Please also list any relevant details for your test configuration. + +- [ ] Ensure the affected commands still execute in the OpenBB Terminal. +- [ ] Ensure the Platform (previously named SDK) is working as intended. +- [ ] Check any related reports. + +## Checklist + +- [ ] I ensure I have self-reviewed my code. +- [ ] I have commented/documented my code, particularly in hard-to-understand sections. +- [ ] I have adhered to the GitFlow naming convention and my branch name is in the format of `feature/feature-name` or `hotfix/hotfix-name`. +- [ ] Update [our documentation](https://openbb-finance.github.io/OpenBBTerminal/) following [these guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/website). Update any user guides that are affected by the changes. +- [ ] Update our tests following [these guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/tests). +- [ ] Make sure you are following our [CONTRIBUTING guidelines](https://github.com/OpenBB-finance/OpenBBTerminal/blob/main/CONTRIBUTING.md). +- [ ] If a feature was added make sure to add it to the corresponding [integration test script](https://github.com/OpenBB-finance/OpenBBTerminal/tree/develop/openbb_terminal/miscellaneous/integration_tests_scripts). From 54828dbf8bdf37c0cf0a072d136d6d34f5868280 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Wed, 31 Jan 2024 11:25:52 +0000 Subject: [PATCH 4/4] developer template --- .../obb_developer_pull_request_template.md | 40 +++++++++++++++++++ .../platform_pull_request_template.md | 0 .../terminal_pull_request_template.md | 0 .../obb_developer_pull_request_template.md | 1 - 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/obb_developer_pull_request_template.md rename .github/{ => PULL_REQUEST_TEMPLATE}/platform_pull_request_template.md (100%) rename .github/{ => PULL_REQUEST_TEMPLATE}/terminal_pull_request_template.md (100%) delete mode 100644 .github/obb_developer_pull_request_template.md diff --git a/.github/PULL_REQUEST_TEMPLATE/obb_developer_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/obb_developer_pull_request_template.md new file mode 100644 index 000000000000..e72cb7d66ae1 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/obb_developer_pull_request_template.md @@ -0,0 +1,40 @@ +# Pull Request Template for OpenBB Developers + +0. **Title**: + + - Format: [Type] - Brief Description (e.g., [Hotfix] - Improve Calculation Accuracy). + +1. **Why**? (1-3 sentences or a bullet point list): + + - State the primary reason for this change. + + - Example: "To enhance the accuracy of our risk calculation in response to recent market volatility." + +2. **What**? (1-3 sentences or a bullet point list): + + - Describe what has been done in simple terms. + + - Example: "Updated the risk calculation algorithm to factor in real-time market fluctuations." + +3. **Impact** (1-2 sentences or a bullet point list): + + - Briefly note the expected outcome or any potential risks and share the Impact Analysis score. + + - Example: "Expected to improve risk assessment accuracy by 15%, with minimal performance impact. Impact score: 10" + + > [!TIP] + > Refer to the Impact Analysis confluence (internal) document for more information. + +4. **Testing Done**: + + - A quick note on how it was tested. + + - Example: "Validated with historical market data and simulated scenarios." + +5. **Reviewer Notes** (optional): + + - Any specific focus areas for review? + + - Example: "Please check algorithm compatibility with existing data models." + +6. **Any other information** (optional) diff --git a/.github/platform_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/platform_pull_request_template.md similarity index 100% rename from .github/platform_pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE/platform_pull_request_template.md diff --git a/.github/terminal_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/terminal_pull_request_template.md similarity index 100% rename from .github/terminal_pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE/terminal_pull_request_template.md diff --git a/.github/obb_developer_pull_request_template.md b/.github/obb_developer_pull_request_template.md deleted file mode 100644 index 9fc178541cfd..000000000000 --- a/.github/obb_developer_pull_request_template.md +++ /dev/null @@ -1 +0,0 @@ -# Pull Request Template for OpenBB Developers