Skip to content

Commit

Permalink
Feature 404 v3.0.0 beta6 (#407)
Browse files Browse the repository at this point in the history
* Per #404, modifying version and dates

* Per #404, updating release notes

* Adding self as an argument to calculate_statistic to attempt to resolve error with METplotpy run

* 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

* 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.

* Logging message is referencing an error alias that doesn't exist.

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
  • Loading branch information
bikegeek and jprestop authored Oct 17, 2024
1 parent 469c624 commit fe89f2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metcalcpy/util/ctc_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit fe89f2b

Please sign in to comment.