From 34c525658917cac81d34e1d6e59ebce1d2502d4d Mon Sep 17 00:00:00 2001 From: Anand Inguva Date: Wed, 4 Oct 2023 23:35:51 -0400 Subject: [PATCH] Fix formatting and lint issues --- sdks/python/apache_beam/testing/analyzers/perf_analysis.py | 3 +-- .../apache_beam/testing/analyzers/perf_analysis_utils.py | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdks/python/apache_beam/testing/analyzers/perf_analysis.py b/sdks/python/apache_beam/testing/analyzers/perf_analysis.py index 5c4eec22b5f8..c86ecb2c4e20 100644 --- a/sdks/python/apache_beam/testing/analyzers/perf_analysis.py +++ b/sdks/python/apache_beam/testing/analyzers/perf_analysis.py @@ -162,7 +162,7 @@ def run_change_point_analysis( def run( big_query_metrics_fetcher: MetricsFetcher = BigQueryMetricsFetcher(), config_file_path: Optional[str] = None, - ) -> None: +) -> None: """ run is the entry point to run change point analysis on test metric data, which is read from config file, and if there is a performance @@ -182,7 +182,6 @@ def run( tests_config: Dict[str, Dict[str, Any]] = read_test_config(config_file_path) - for test_id, params in tests_config.items(): run_change_point_analysis( params=params, diff --git a/sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py b/sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py index 3ccf2c14b554..e8db128ba9f1 100644 --- a/sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py +++ b/sdks/python/apache_beam/testing/analyzers/perf_analysis_utils.py @@ -231,7 +231,7 @@ def filter_change_points_by_median_threshold( return valid_change_points -class MetricsFetcher: +class MetricsFetcher(metaclass=abc.ABCMeta): @abc.abstractmethod def fetch_metric_data( self, @@ -244,9 +244,10 @@ def fetch_metric_data( Define SQL query and fetch the timestamp values and metric values from BigQuery tables. """ + raise NotImplementedError -class BigQueryMetricsFetcher: +class BigQueryMetricsFetcher(MetricsFetcher): def fetch_metric_data( self, *,