diff --git a/forest/constants.py b/forest/constants.py index 8d95f4ce..420d8c8d 100644 --- a/forest/constants.py +++ b/forest/constants.py @@ -20,7 +20,7 @@ class Frequency(Enum): """This class enumerates possible frequencies for summary data.""" - MINUTELY = 1 + MINUTE = 1 HOURLY = 60 THREE_HOURLY = 3 * 60 SIX_HOURLY = 6 * 60 diff --git a/forest/jasmine/traj2stats.py b/forest/jasmine/traj2stats.py index ca13b384..e25f653c 100644 --- a/forest/jasmine/traj2stats.py +++ b/forest/jasmine/traj2stats.py @@ -1125,7 +1125,7 @@ def gps_summaries( ValueError: Frequency is not valid """ - if frequency in [Frequency.HOURLY_AND_DAILY, Frequency.MINUTELY]: + if frequency in [Frequency.HOURLY_AND_DAILY, Frequency.MINUTE]: raise ValueError(f"Frequency cannot be {frequency.name.lower()}.") if frequency != Frequency.DAILY: @@ -1600,7 +1600,7 @@ def gps_stats_main( """ # no minutely analysis on GPS data - if frequency == Frequency.MINUTELY: + if frequency == Frequency.MINUTE: raise ValueError("Frequency cannot be minutely.") os.makedirs(output_folder, exist_ok=True) diff --git a/forest/oak/base.py b/forest/oak/base.py index 2fbe1c8e..a2e484e6 100644 --- a/forest/oak/base.py +++ b/forest/oak/base.py @@ -602,7 +602,7 @@ def run(study_folder: str, output_folder: str, tz_str: Optional[str] = None, or frequency == Frequency.HOURLY ): freq = 'H' - elif frequency == Frequency.MINUTELY: + elif frequency == Frequency.MINUTE: freq = 'T' else: freq = str(frequency.value/60) + 'H' @@ -653,7 +653,7 @@ def run(study_folder: str, output_folder: str, tz_str: Optional[str] = None, ] # transform t to full hours t_series = pd.Series(t_datetime) - if frequency == Frequency.MINUTELY: + if frequency == Frequency.MINUTE: t_hours_pd = t_series.dt.floor('T') else: t_hours_pd = t_series.dt.floor('H')