From 4b4eedb2f783b0c080c8dcbdf0e9782ab785b2d2 Mon Sep 17 00:00:00 2001 From: Julie Prestopnik Date: Wed, 16 Oct 2024 12:55:39 -0600 Subject: [PATCH 1/6] Per #404, modifying version and dates --- docs/conf.py | 2 +- docs/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c6879204..709a0f27 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ verinfo = version release = f'{version}' release_year = '2024' -release_date = f'{release_year}-06-28' +release_date = f'{release_year}-10-17' copyright = f'{release_year}, {author}' # if set, adds "Last updated on " followed by diff --git a/docs/version b/docs/version index c2d90939..6fffb732 100644 --- a/docs/version +++ b/docs/version @@ -1 +1 @@ -__version__="3.0.0-beta6-dev" +__version__="3.0.0-beta6" From 64a5436b9fed0d36b716860e16020fbf6bdf9cfe Mon Sep 17 00:00:00 2001 From: Julie Prestopnik Date: Wed, 16 Oct 2024 13:22:42 -0600 Subject: [PATCH 2/6] Per #404, updating release notes --- docs/Users_Guide/release-notes.rst | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/Users_Guide/release-notes.rst b/docs/Users_Guide/release-notes.rst index 3d765b1e..bf9d4d8f 100644 --- a/docs/Users_Guide/release-notes.rst +++ b/docs/Users_Guide/release-notes.rst @@ -8,8 +8,27 @@ describes the bugfix, enhancement, or new feature: `METcalcpy GitHub issues. `_) + + .. dropdown:: Internal + + None + + .. dropdown:: Bugfixes + + * Bugfix: MODE CSI calculations result in spurious results (`#360 `_) + -METcalcpy Velsion 3.0.0-beta5 release notes (20230628) +METcalcpy Velsion 3.0.0-beta5 release notes (20240628) ------------------------------------------------------ @@ -31,7 +50,7 @@ METcalcpy Velsion 3.0.0-beta5 release notes (20230628) .. dropdown:: Bugfixes -METcalcpy Velsion 3.0.0-beta4 release notes (20230417) +METcalcpy Velsion 3.0.0-beta4 release notes (20240417) ------------------------------------------------------ @@ -57,7 +76,7 @@ METcalcpy Velsion 3.0.0-beta4 release notes (20230417) * Address negative values returned by calculate_bcmse() and calculate_bcrmse() in sl1l2_statistics module (`#329 `_) -METcalcpy Velsion 3.0.0-beta3 release notes (20230207) +METcalcpy Velsion 3.0.0-beta3 release notes (20240207) ------------------------------------------------------ From 5b9775c21ba4b7d9f1ee3151d2f6480d917f7852 Mon Sep 17 00:00:00 2001 From: Julie Prestopnik Date: Wed, 16 Oct 2024 15:09:48 -0600 Subject: [PATCH 3/6] Adding self as an argument to calculate_statistic to attempt to resolve error with METplotpy run --- metcalcpy/sum_stat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metcalcpy/sum_stat.py b/metcalcpy/sum_stat.py index 91974682..20b23903 100644 --- a/metcalcpy/sum_stat.py +++ b/metcalcpy/sum_stat.py @@ -295,7 +295,7 @@ def process_rows(self): # return self.parallelize(data, partial(self.run_on_subset, func), num_of_processes) -def calculate_statistic(values, columns_names, stat_name, aggregation=False): +def calculate_statistic(self, values, columns_names, stat_name, aggregation=False): """Calculate the statistic of values Args: values: a np.array of values we want to calculate the statistic on From d5d5e37c303aeab9c3290cf22ec7f1fb939e72b9 Mon Sep 17 00:00:00 2001 From: Julie Prestopnik Date: Wed, 16 Oct 2024 15:11:37 -0600 Subject: [PATCH 4/6] Removing self as an argument to calculate_statistic to attempt to resolve error with METplotpy run because this would need to be done in the develop branch --- metcalcpy/sum_stat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metcalcpy/sum_stat.py b/metcalcpy/sum_stat.py index 20b23903..91974682 100644 --- a/metcalcpy/sum_stat.py +++ b/metcalcpy/sum_stat.py @@ -295,7 +295,7 @@ def process_rows(self): # return self.parallelize(data, partial(self.run_on_subset, func), num_of_processes) -def calculate_statistic(self, values, columns_names, stat_name, aggregation=False): +def calculate_statistic(values, columns_names, stat_name, aggregation=False): """Calculate the statistic of values Args: values: a np.array of values we want to calculate the statistic on From 612379210fc84e039733c5710307db50c42f62d9 Mon Sep 17 00:00:00 2001 From: bikegeek Date: Thu, 17 Oct 2024 13:16:36 -0600 Subject: [PATCH 5/6] calculate_statistic() is not a SumStat class method. Remove the logging, which requires the logger that is created in the constructor of the SumStat class. Instead, raise an exception with a detailed message. --- metcalcpy/sum_stat.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/metcalcpy/sum_stat.py b/metcalcpy/sum_stat.py index 20b23903..583a6e32 100644 --- a/metcalcpy/sum_stat.py +++ b/metcalcpy/sum_stat.py @@ -295,7 +295,7 @@ def process_rows(self): # return self.parallelize(data, partial(self.run_on_subset, func), num_of_processes) -def calculate_statistic(self, values, columns_names, stat_name, aggregation=False): +def calculate_statistic(values, columns_names, stat_name, aggregation=False): """Calculate the statistic of values Args: values: a np.array of values we want to calculate the statistic on @@ -307,19 +307,17 @@ def calculate_statistic(self, values, columns_names, stat_name, aggregation=Fals Raises: an error """ - logger = self.logger - safe_log(logger, "debug", f"Calculating statistic '{stat_name}' with aggregation: {aggregation}.") try: func_name = f'calculate_{stat_name}' num_parameters = len(signature(globals()[func_name]).parameters) if num_parameters == 2: - stat = globals()[func_name](values, columns_names, logger=logger) + stat = globals()[func_name](values, columns_names) else: - stat = globals()[func_name](values, columns_names, aggregation, logger=logger) - safe_log(logger, "info", f"Successfully calculated statistic '{stat_name}'.") - except Exception as e: - safe_log(logger, "error", f"An error occurred while calculating statistic '{stat_name}': {e}") - raise + stat = globals()[func_name](values, columns_names, aggregation) + except Exception: + raise RuntimeError( + "Error occurred while calculating statistic using METcalcpy sum_stat module's calculate_statistic(): " + + stat_name) return stat From 9a418775e40c9766f796653d2b8c59eaa92b883d Mon Sep 17 00:00:00 2001 From: bikegeek Date: Thu, 17 Oct 2024 15:21:03 -0600 Subject: [PATCH 6/6] Logging message is referencing an error alias that doesn't exist. --- metcalcpy/util/ctc_statistics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metcalcpy/util/ctc_statistics.py b/metcalcpy/util/ctc_statistics.py index da289b1e..5d2fb317 100644 --- a/metcalcpy/util/ctc_statistics.py +++ b/metcalcpy/util/ctc_statistics.py @@ -218,7 +218,7 @@ def calculate_pofd(input_data, columns_names, logger=None): result = fy_on / oy result = round_half_up(result, PRECISION) safe_log(logger, "info", f"POFD calculation successful: {result}") - except (TypeError, ZeroDivisionError, Warning, ValueError): + except (TypeError, ZeroDivisionError, Warning, ValueError) as e: safe_log(logger, "error", f"Error in POFD calculation: {e}") result = None warnings.filterwarnings('ignore')