Merge branch 'develop' into feature/charting-obbject

This commit is contained in:
Henrique Joaquim
2024-01-29 13:44:36 +00:00
committed by GitHub
5 changed files with 7 additions and 4 deletions

View File

@@ -101,6 +101,7 @@ class CboeIndexHistoricalFetcher(
return CboeIndexHistoricalQueryParams(**transformed_params)
# pylint: disable=unused-argument
@staticmethod
async def aextract_data(
query: CboeIndexHistoricalQueryParams,
@@ -108,7 +109,6 @@ class CboeIndexHistoricalFetcher(
**kwargs: Any,
) -> List[Dict]:
"""Return the raw data from the Cboe endpoint."""
symbols = query.symbol.split(",")
INDEXES = await get_index_directory(use_cache=query.use_cache)
INDEXES = INDEXES.set_index("index_symbol")
@@ -156,6 +156,7 @@ class CboeIndexHistoricalFetcher(
return await amake_requests(urls, **kwargs)
# pylint: disable=unused-argument
@staticmethod
def transform_data(
query: CboeIndexHistoricalQueryParams, data: List[Dict], **kwargs: Any

View File

@@ -78,9 +78,10 @@ class FREDDiscountWindowPrimaryCreditRateFetcher(
return data
# pylint: disable=unused-argument
@staticmethod
def transform_data(
query: FREDDiscountWindowPrimaryCreditRateParams, data: list, **kwargs: Any
) -> List[FREDDiscountWindowPrimaryCreditRateData]:
"""Transform data"""
"""Transform data."""
return [FREDDiscountWindowPrimaryCreditRateData.model_validate(d) for d in data]

View File

@@ -122,7 +122,6 @@ class FredSeriesFetcher(
**kwargs: Any,
) -> Dict:
"""Extract data."""
api_key = credentials.get("fred_api_key") if credentials else ""
base_url = "https://api.stlouisfed.org/fred/series/observations"
@@ -186,6 +185,7 @@ class FredSeriesFetcher(
return data
# pylint: disable=unused-argument
@staticmethod
def transform_data(
query: FredSeriesQueryParams, data: Dict, **kwargs: Any

View File

@@ -38,6 +38,7 @@ class NasdaqSP500MultiplesFetcher(
@staticmethod
def transform_query(params: Dict[str, Any]) -> NasdaqSP500MultiplesQueryParams:
"""Transform the query."""
return NasdaqSP500MultiplesQueryParams(**params)
@staticmethod
@@ -71,6 +72,7 @@ class NasdaqSP500MultiplesFetcher(
return data.to_dict("records")
# pylint: disable=unused-argument
@staticmethod
def transform_data(
query: NasdaqSP500MultiplesQueryParams,

View File

@@ -310,7 +310,6 @@ class SecEtfHoldingsFetcher(
**kwargs: Any,
) -> Dict:
"""Return the raw data from the SEC endpoint."""
filing_candidates = pd.DataFrame.from_records(
get_nport_candidates(symbol=query.symbol, use_cache=query.use_cache)
)