From 87a8810eb962a1770b1ef432c13ec1a964c93afe Mon Sep 17 00:00:00 2001 From: Stavros Theocharis Date: Wed, 14 Feb 2024 16:11:41 +0100 Subject: [PATCH] Generalised args in functions --- setup.py | 4 ++-- timepulse/data/data_collection.py | 13 +++++++------ timepulse/models/lstm.py | 1 - 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 81a317b..e66cc3d 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="timepulse", version="0.2.0", - description="A set of tools to help with timeseries flow", + description="A set of algorithms to help with timeseries flow", long_description=long_description, long_description_content_type="text/markdown", author="SQUAREDEV BV", @@ -39,7 +39,7 @@ "Programming Language :: Python :: 3.11", ], python_requires=">=3.9", # Minimum version requirement of the package - keywords="timeseries tools ml flow python machine learning", # Short descriptors for your package + keywords="timeseries algorithms ml flow ai python machine learning", # Short descriptors for your package package_data={}, entry_points={ "console_scripts": [ diff --git a/timepulse/data/data_collection.py b/timepulse/data/data_collection.py index 9ffcbff..95ea537 100644 --- a/timepulse/data/data_collection.py +++ b/timepulse/data/data_collection.py @@ -5,15 +5,16 @@ def fetch_stringency_index( - country: Literal["Italy", "Spain"], period: Literal["D", "M"] = "M" + country: str, period: Literal["D", "M"] = "M" ) -> pd.DataFrame: """ Fetches and processes stringency index data for the specified country and period. Parameters: - - country (Literal["Italy", "Spain"]): The name of the country for which the stringency index data is fetched. - - period (Literal["D", "M"], optional): The time period for data resampling, either "D" for daily or "M" for monthly. - Defaults to "M". + - country (str): The name of the country for which the + stringency index data is fetched. + - period (Literal["D", "M"], optional): The time period for data resampling, + either "D" for daily or "M" for monthly. Defaults to "M". Returns: - pd.DataFrame: Processed DataFrame containing the stringency index data with date-wise categories. @@ -65,14 +66,14 @@ def fetch_stringency_index( def fetch_holidays( - years: List, country_code: Literal["IT", "ES"], period: Literal["D", "M"] = "M" + years: List[int], country_code: str, period: Literal["D", "M"] = "M" ) -> pd.DataFrame: """ Fetches and processes holidays data for the specified country and period. Parameters: - years (List): A list of years for which holidays data is fetched. - - country_code (Literal["IT", "ES"]): The country code for the country of interest. + - country_code (str): The country code for the country of interest. - period (Literal["D", "M"], optional): The time period for data resampling, either "D" for daily or "M" for monthly. Defaults to "M". diff --git a/timepulse/models/lstm.py b/timepulse/models/lstm.py index dab6bc6..2ff828b 100644 --- a/timepulse/models/lstm.py +++ b/timepulse/models/lstm.py @@ -1,7 +1,6 @@ from timepulse.utils.models import create_early_stopping from timepulse.processing.min_max_scaler import MinMaxScalerWrapper import tensorflow as tf -import pandas as pd import numpy as np from typing import List, Optional, Tuple, Type