Skip to content

Commit

Permalink
Rename function check_valid_range_or_valid_min_max_present
Browse files Browse the repository at this point in the history
Renames check function `check_valid_range_or_valid_min_max_present` to
`check_valid_range_and_valid_min_max_present` for clarity.  Existing compliance
checker plugins checked do not reference this function so this appears
to be a safe operation.
  • Loading branch information
benjwadams committed Apr 15, 2024
1 parent 584f896 commit dcd1edf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compliance_checker/cf/cf_1_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def check_fill_value_equal_missing_value(self, ds):
msgs=fails,
)

def check_valid_range_or_valid_min_max_present(self, ds):
def check_valid_range_and_valid_min_max_present(self, ds):
"""
The valid_range attribute must not be present if the valid_min
and/or valid_max attributes are present. This according to 2.5.1 Requirements.
Expand Down
4 changes: 2 additions & 2 deletions compliance_checker/tests/test_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def test_check_fill_value_equal_missing_value(self):

assert result.msgs == expected_msgs

def test_check_valid_range_or_valid_min_max_present(self):
def test_check_valid_range_and_valid_min_max_present(self):
"""
2.5.1 Missing data, valid and actual range of data
Requirements:
Expand Down Expand Up @@ -426,7 +426,7 @@ def test_check_valid_range_or_valid_min_max_present(self):
dataset.variables["c"][1] = 2
dataset.variables["c"].setncattr("valid_range", [-10, 10])

result = self.cf.check_valid_range_or_valid_min_max_present(dataset)
result = self.cf.check_valid_range_and_valid_min_max_present(dataset)

# check if the test fails when when variable "a" is checked.
expected_msgs = [
Expand Down

0 comments on commit dcd1edf

Please sign in to comment.