From fc67481fb47d2865e16a25df92930af8370e654a Mon Sep 17 00:00:00 2001 From: lucifer4073 Date: Sat, 14 Dec 2024 22:23:28 +0530 Subject: [PATCH] Made enum_tags a public file to fix circular imports --- aeon/clustering/_elastic_som.py | 2 +- aeon/clustering/_k_means.py | 2 +- aeon/clustering/_k_medoids.py | 2 +- aeon/clustering/_k_sc.py | 2 +- aeon/clustering/_k_shape.py | 2 +- aeon/clustering/compose/_pipeline.py | 2 +- aeon/clustering/deep_learning/base.py | 2 +- aeon/clustering/feature_based/_catch22.py | 2 +- aeon/clustering/feature_based/_summary.py | 2 +- aeon/clustering/feature_based/_tsfresh.py | 2 +- aeon/utils/tags/{_enum_tags.py => enum_tags.py} | 2 ++ 11 files changed, 12 insertions(+), 10 deletions(-) rename aeon/utils/tags/{_enum_tags.py => enum_tags.py} (95%) diff --git a/aeon/clustering/_elastic_som.py b/aeon/clustering/_elastic_som.py index 104b66644b..08180c2811 100644 --- a/aeon/clustering/_elastic_som.py +++ b/aeon/clustering/_elastic_som.py @@ -6,7 +6,7 @@ from aeon.clustering.base import BaseClusterer from aeon.distances import get_alignment_path_function, pairwise_distance -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType VALID_ELASTIC_SOM_METRICS = [ "dtw", diff --git a/aeon/clustering/_k_means.py b/aeon/clustering/_k_means.py index 5dd6c52ba4..f2c6bb3a7c 100644 --- a/aeon/clustering/_k_means.py +++ b/aeon/clustering/_k_means.py @@ -2,7 +2,7 @@ from typing import Optional -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType __maintainer__ = [] diff --git a/aeon/clustering/_k_medoids.py b/aeon/clustering/_k_medoids.py index 9b2606d48f..c6003c4251 100644 --- a/aeon/clustering/_k_medoids.py +++ b/aeon/clustering/_k_medoids.py @@ -2,7 +2,7 @@ from typing import Optional -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType __maintainer__ = [] diff --git a/aeon/clustering/_k_sc.py b/aeon/clustering/_k_sc.py index b5d65d969c..f243b6a9b9 100644 --- a/aeon/clustering/_k_sc.py +++ b/aeon/clustering/_k_sc.py @@ -6,7 +6,7 @@ from numpy.random import RandomState from aeon.clustering import TimeSeriesKMeans -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class KSpectralCentroid(TimeSeriesKMeans): diff --git a/aeon/clustering/_k_shape.py b/aeon/clustering/_k_shape.py index 5ba6ccdb52..b1b53084b1 100644 --- a/aeon/clustering/_k_shape.py +++ b/aeon/clustering/_k_shape.py @@ -6,7 +6,7 @@ from numpy.random import RandomState from aeon.clustering.base import BaseClusterer -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class TimeSeriesKShape(BaseClusterer): diff --git a/aeon/clustering/compose/_pipeline.py b/aeon/clustering/compose/_pipeline.py index 6de3b019d7..be76dc61a5 100644 --- a/aeon/clustering/compose/_pipeline.py +++ b/aeon/clustering/compose/_pipeline.py @@ -6,7 +6,7 @@ from aeon.base._estimators.compose.collection_pipeline import BaseCollectionPipeline from aeon.clustering import BaseClusterer -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class ClustererPipeline(BaseCollectionPipeline, BaseClusterer): diff --git a/aeon/clustering/deep_learning/base.py b/aeon/clustering/deep_learning/base.py index d339907614..f946ed9f4d 100644 --- a/aeon/clustering/deep_learning/base.py +++ b/aeon/clustering/deep_learning/base.py @@ -8,7 +8,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering._k_means import TimeSeriesKMeans from aeon.clustering.base import BaseClusterer -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class BaseDeepClusterer(BaseClusterer): diff --git a/aeon/clustering/feature_based/_catch22.py b/aeon/clustering/feature_based/_catch22.py index 3b63e0a63b..03d142fbb1 100644 --- a/aeon/clustering/feature_based/_catch22.py +++ b/aeon/clustering/feature_based/_catch22.py @@ -12,7 +12,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer from aeon.transformations.collection.feature_based import Catch22 -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class Catch22Clusterer(BaseClusterer): diff --git a/aeon/clustering/feature_based/_summary.py b/aeon/clustering/feature_based/_summary.py index 6aa4484ee8..7299edccbd 100644 --- a/aeon/clustering/feature_based/_summary.py +++ b/aeon/clustering/feature_based/_summary.py @@ -12,7 +12,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer from aeon.transformations.collection.feature_based import SevenNumberSummary -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class SummaryClusterer(BaseClusterer): diff --git a/aeon/clustering/feature_based/_tsfresh.py b/aeon/clustering/feature_based/_tsfresh.py index d9bfd48004..ad61efe0ce 100644 --- a/aeon/clustering/feature_based/_tsfresh.py +++ b/aeon/clustering/feature_based/_tsfresh.py @@ -15,7 +15,7 @@ from aeon.base._base import _clone_estimator from aeon.clustering import BaseClusterer from aeon.transformations.collection.feature_based import TSFresh -from aeon.utils.tags._enum_tags import AlgorithmType +from aeon.utils.tags.enum_tags import AlgorithmType class TSFreshClusterer(BaseClusterer): diff --git a/aeon/utils/tags/_enum_tags.py b/aeon/utils/tags/enum_tags.py similarity index 95% rename from aeon/utils/tags/_enum_tags.py rename to aeon/utils/tags/enum_tags.py index 21202b39a1..adbf87852c 100644 --- a/aeon/utils/tags/_enum_tags.py +++ b/aeon/utils/tags/enum_tags.py @@ -1,3 +1,5 @@ +"""Apply Enumeration in module.""" + from enum import Enum