Repository: ioos/compliance-checker
Pull request #990 (2023-01-27 16:59:17)

Fix calendar crossing 1582 issue on some builds
@mhidas, should address issue mentioned in #986 by using an alternative implementation for excluding _FillValue time data.


Patch:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 563dd9b..0000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-# See https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
-
-version: 2
-updates:
-
-  - package-ecosystem: "github-actions"
-    directory: "/"
-    schedule:
-      interval: "daily"
-    labels:
-      - "Bot"
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
index 946ca04..21a106e 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/codecov.yml
@@ -17,7 +17,7 @@ jobs:
       fail-fast: false
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v2
 
     - name: Setup Conda
       uses: s-weigand/setup-conda@v1
@@ -50,6 +50,6 @@ jobs:
       continue-on-error: true
 
     - name: Upload to codecov
-      uses: codecov/codecov-action@v3
+      uses: codecov/codecov-action@v2
       with:
         files: coverage.xml
diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml
index 9107f72..ec452e1 100644
--- a/.github/workflows/pypi.yml
+++ b/.github/workflows/pypi.yml
@@ -27,7 +27,7 @@ jobs:
       run: git fetch origin 'refs/tags/*:refs/tags/*'
 
     - name: Set up Python
-      uses: actions/setup-python@v4
+      uses: actions/setup-python@v2
       with:
         # no cf_untis wheels for 3.10 yet
         python-version: "3.9"
@@ -50,7 +50,7 @@ jobs:
 
     - name: Publish a Python distribution to PyPI
       if: success() && github.event_name == 'release'
-      uses: pypa/gh-action-pypi-publish@v1.6.4
+      uses: pypa/gh-action-pypi-publish@v1.5.0
       with:
         user: __token__
         password: ${{ secrets.PYPI_ACCESS_TOKEN }}
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 096f4f6..613a198 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
 repos:
 - repo: https://github.com/pre-commit/pre-commit-hooks
-  rev: v4.4.0
+  rev: v4.3.0
   hooks:
     - id: trailing-whitespace
       exclude: compliance_checker/tests/data
@@ -13,31 +13,31 @@ repos:
     - id: requirements-txt-fixer
 
 - repo: https://github.com/PyCQA/flake8
-  rev: 6.0.0
+  rev: 4.0.1
   hooks:
     - id: flake8
       exclude: docs/source/conf.py
       args: [--max-line-length=200, "--ignore=E203,E501,W503", "--select=select=C,E,F,W,B,B950"]
 
 - repo: https://github.com/pycqa/isort
-  rev: 5.11.4
+  rev: 5.10.1
   hooks:
   - id: isort
     additional_dependencies: [toml]
     args: ["--profile", "black", "--filter-files"]
 
 - repo: https://github.com/psf/black
-  rev: 22.12.0
+  rev: 22.6.0
   hooks:
   - id: black
     language_version: python3
 
 - repo: https://github.com/codespell-project/codespell
-  rev: v2.2.2
+  rev: v2.1.0
   hooks:
     - id: codespell
       args:
-        - --ignore-words-list=degreee,varn,poit,uint,sur,herat,claus,dedent,dedenting,dedents,dedented
+        - --ignore-words-list=degreee,varn,poit,uint,sur,herat,claus
       exclude: >
           (?x)^(
               .*\.xml|
diff --git a/compliance_checker/cf/appendix_d.py b/compliance_checker/cf/appendix_d.py
index c11c5d9..5e80ca5 100644
--- a/compliance_checker/cf/appendix_d.py
+++ b/compliance_checker/cf/appendix_d.py
@@ -73,7 +73,7 @@ dimless_vertical_coordinates_1_6 = {  # only for CF-1.6
         ocean_computed_standard_names,
     ),
     "ocean_sigma_z_coordinate": (
-        {"sigma", "eta", "depth", "depth_c", "zlev"},
+        {"sigma", "eta", "depth", "depth_c", "nsigma", "zlev"},
         ocean_computed_standard_names,
     ),
     "ocean_double_sigma_coordinate": (
diff --git a/compliance_checker/cf/cf_1_6.py b/compliance_checker/cf/cf_1_6.py
index 4778ca2..0801732 100644
--- a/compliance_checker/cf/cf_1_6.py
+++ b/compliance_checker/cf/cf_1_6.py
@@ -156,7 +156,8 @@ class CF1_6Check(CFNCCheck):
                 att.dtype == variable.dtype
             ) or (  # will short-circuit or if first condition is true
                 isinstance(att, (np.float32, np.float64, float))
-                and variable.dtype in (np.byte, np.short, np.int16, np.int32, int)
+                and variable.dtype
+                in (np.byte, np.short, np.int16, np.int, np.int32, int)
             )
         if not val:
             msgs.append(error_msg)
@@ -405,71 +406,6 @@ class CF1_6Check(CFNCCheck):
                 )
         return valid_dimension_order.to_result()
 
-    def check_fill_value_equal_missing_value(self, ds):
-        """
-        If both missing_value and _FillValue be used, they should have the same value.
-        This according to CF §2.5.1 Recommendations:
-
-        :param netCDF4.Dataset ds: An open netCDF dataset
-        :rtype: list
-        :return: List of Results
-        """
-        fails = []
-        total = 0
-
-        for name, variable in ds.variables.items():
-            # If the variable have a defined _FillValue a defined missing_value check it.
-
-            if hasattr(variable, "_FillValue") and hasattr(variable, "missing_value"):
-                total = total + 1
-                if variable._FillValue != variable.missing_value:
-                    fails.append(
-                        "For the variable {} the missing_value must be equal to the _FillValue".format(
-                            variable.name
-                        )
-                    )
-
-        return Result(
-            BaseCheck.MEDIUM,
-            (len(fails), total),
-            self.section_titles["2.5"],
-            msgs=fails,
-        )
-
-    def check_valid_range_or_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.
-
-        :param netCDF4.Dataset ds: An open netCDF dataset
-        :rtype: list
-        :return: List of Results
-        """
-        fails = []
-        total = 0
-
-        for name, variable in ds.variables.items():
-
-            if hasattr(variable, "valid_max") and (
-                hasattr(variable, "valid_min") or hasattr(variable, "valid_range")
-            ):
-
-                total = total + 1
-
-                fails.append(
-                    "For the variable {} the valid_range attribute must not be present "
-                    "if the valid_min and/or valid_max attributes are present".format(
-                        variable.name
-                    )
-                )
-
-        return Result(
-            BaseCheck.MEDIUM,
-            (len(fails), total),
-            self.section_titles["2.5"],
-            msgs=fails,
-        )
-
     def check_fill_value_outside_valid_range(self, ds):
         """
         Checks each variable's _FillValue to ensure that it's in valid_range or
@@ -903,9 +839,6 @@ class CF1_6Check(CFNCCheck):
             # number_of_observations should short circuit and not continue
             # on to further units checks
             return valid_standard_units.to_result()
-        elif standard_name_modifier == "status_flag":
-            # no units required - skip further checks
-            return valid_standard_units.to_result()
 
         # This section represents the different cases where simple udunits
         # comparison isn't comprehensive enough to determine if the units are
@@ -1898,22 +1831,19 @@ class CF1_6Check(CFNCCheck):
             # should be made for time coordinate variables anyways, so errors
             # should be caught where implemented there
             crossover_date = cftime.DatetimeGregorian(1582, 10, 15)
-            times = cftime.num2date(time_var[:], time_var.units)
+            times = cftime.num2date(time_var[:].compressed(), time_var.units)
 
-            # appears to be necessary to override supplied _FillValue of "?"
-            # FillValues shouldn't fail, so set to crossover date to pass
-            times.set_fill_value(crossover_date)
             no_cross_1582 = ~np.any(times < crossover_date)
             if no_cross_1582:
                 reasoning = (
-                    f"Variable {time_var.name} has standard/gregorian "
+                    f"Variable {time_var.name} has standard or Gregorian "
                     "calendar and does not cross 1582-10-15T00:00Z"
                 )
             else:
                 reasoning = (
                     f"Variable {time_var.name} has time values "
                     "prior to 1582-10-15T00:00Z and utilizes "
-                    "the standard/gregorian calendar"
+                    "the standard or Gregorian calendar"
                 )
 
             return Result(
@@ -1926,7 +1856,7 @@ class CF1_6Check(CFNCCheck):
         for time_var in ds.get_variables_by_attributes(
             calendar=lambda c: c is not None
         ):
-            if time_var.calendar.lower() == "gregorian":
+            if time_var.calendar == "gregorian":
                 reasoning = (
                     f"For time variable {time_var.name}, when using "
                     "the standard Gregorian calendar, the value "
@@ -1944,7 +1874,7 @@ class CF1_6Check(CFNCCheck):
                 ret_val.append(check_standard_calendar_no_cross(time_var))
             # if a nonstandard calendar, then leap_years and leap_months must
             # must be present
-            if time_var.calendar.lower() not in valid_calendars:
+            if time_var.calendar not in valid_calendars:
                 result = self._check_leap_time(time_var)
             # passes if the calendar is valid, otherwise notify of invalid
             # calendar
@@ -2774,22 +2704,6 @@ class CF1_6Check(CFNCCheck):
                                 cell_meas_var_name
                             )
                         )
-                    else:
-                        # IMPLEMENTATION CONFORMANCE REQUIRED 2/2
-                        # verify this combination {area: 'm2', volume: 'm3'}
-                        dic_expected = {"area": "m2", "volume": "m3"}
-                        dic_to_be_verified = {
-                            (var.cell_measures).split(":")[0]: cell_meas_var.units
-                        }
-                        print(dic_to_be_verified, "\n")
-                        if not set(dic_to_be_verified).issubset(dic_expected):
-                            valid = False
-                            reasoning.append(
-                                "Cell measure variable {} must have "
-                                "units that are consistent with the measure type."
-                                "i.e. {}.".format(cell_meas_var_name, dic_expected)
-                            )
-
                     if not set(cell_meas_var.dimensions).issubset(var.dimensions):
                         valid = False
                         reasoning.append(
@@ -3284,6 +3198,7 @@ class CF1_6Check(CFNCCheck):
                 else:
                     # Check variable type is byte, short or int
                     if var.dtype.type not in [
+                        np.int,
                         np.int8,
                         np.int16,
                         np.int32,
@@ -3416,29 +3331,7 @@ class CF1_6Check(CFNCCheck):
                         compress_var.name, not_in_dims
                     )
                 )
-            # IMPLEMENTATION CONFORMANCE 8.2 REQUIRED 3/3
-            # The values of the associated coordinate variable must be in the range
-            # starting with 0 and going up to the product of the compressed dimension
-            # sizes minus 1 (CDL index conventions).
-
-            # Put the the values of the associated coordinate variable into a list
-            coord_list_size = [
-                item.size
-                for item in ds.dimensions.values()
-                if item.name in compress_set
-            ]
-            # get the upper limt of the dimenssion size
-            upper_limit_size = np.prod(coord_list_size) - 1
 
-            for coord_size in coord_list_size:
-                if coord_size not in range(0, upper_limit_size):
-                    valid = False
-                    reasoning.append(
-                        "The dimenssion size {} referenced by the compress attribute is not "
-                        "in the range (0, The product of the compressed dimension sizes minus 1)".format(
-                            coord_size
-                        )
-                    )
             result = Result(
                 BaseCheck.MEDIUM, valid, self.section_titles["8.2"], reasoning
             )
diff --git a/compliance_checker/cf/cf_1_7.py b/compliance_checker/cf/cf_1_7.py
index d77796f..0729dac 100644
--- a/compliance_checker/cf/cf_1_7.py
+++ b/compliance_checker/cf/cf_1_7.py
@@ -243,10 +243,6 @@ class CF1_7Check(CF1_6Check):
             variable = ds.variables[variable_name]
             valid = True
             reasoning = []
-
-            # 7.1 Required 1/5:
-            # The type of the bounds attribute is a string whose value is a single variable name.
-            # The specified variable must exist in the file.
             if boundary_variable_name not in ds.variables:
                 valid = False
                 reasoning.append(
@@ -257,8 +253,6 @@ class CF1_7Check(CF1_6Check):
                 )
             else:
                 boundary_variable = ds.variables[boundary_variable_name]
-
-            # 7.1 Required 2/5:
             # The number of dimensions in the bounds variable should always be
             # the number of dimensions in the referring variable + 1
             if boundary_variable.ndim < 2:
@@ -291,8 +285,7 @@ class CF1_7Check(CF1_6Check):
                     "".format(variable.name, boundary_variable.dimensions)
                 )
 
-            # 7.1 Required 2/5: continue
-            # Ensure p vertices form a valid simplex given previous a...n
+            # ensure p vertices form a valid simplex given previous a...n
             # previous auxiliary coordinates
             if (
                 ds.dimensions[boundary_variable.dimensions[-1]].size
@@ -308,38 +301,6 @@ class CF1_7Check(CF1_6Check):
                     )
                 )
 
-            # 7.1 Required 3/5:
-            # A boundary variable must be a numeric data type
-            if boundary_variable.dtype.kind not in "biufc":
-                valid = False
-                reasoning.append(
-                    "Boundary variable {} specified by {}".format(
-                        boundary_variable.name, variable.name
-                    )
-                    + "must be a numeric data type "
-                )
-
-            # 7.1 Required 4/5:
-            # If a boundary variable has units, standard_name, axis, positive, calendar, leap_month,
-            # leap_year or month_lengths attributes, they must agree with those of its associated variable.
-            if boundary_variable.__dict__.keys():
-                for item in boundary_variable.__dict__.keys():
-                    if hasattr(variable, item):
-                        if getattr(variable, item) != getattr(boundary_variable, item):
-                            valid = False
-                            reasoning.append(
-                                "'{}' has attr '{}' with value '{}' that does not agree "
-                                "with its associated variable ('{}')'s attr value '{}'"
-                                "".format(
-                                    boundary_variable_name,
-                                    item,
-                                    getattr(boundary_variable, item),
-                                    variable.name,
-                                    getattr(variable, item),
-                                )
-                            )
-
-            # 7.1 Required 5/5:
             # check if formula_terms is present in the var; if so,
             # the bounds variable must also have a formula_terms attr
             if hasattr(variable, "formula_terms"):
@@ -351,82 +312,12 @@ class CF1_7Check(CF1_6Check):
                         )
                     )
 
-            # 7.1 Recommendations 2/2
-            # Boundary variables should not have the _FillValue, missing_value, units, standard_name, axis,
-            # positive, calendar, leap_month, leap_year or month_lengths attributes.
-            attributes_to_check = {
-                "_FillValue",
-                "missing_value",
-                "units",
-                "standard_name",
-                "axis",
-                "positive",
-                "calendar",
-                "leap_month",
-                "leap_year",
-                "month_lengths",
-            }
-            if boundary_variable.__dict__.keys():
-                lst1 = boundary_variable.__dict__.keys()
-                lst2 = attributes_to_check
-                unwanted_attributes = [value for value in lst1 if value in lst2]
-                if unwanted_attributes:
-                    valid = False
-                    reasoning.append(
-                        "The Boundary variables '{}' should not have the attributes: '{}'".format(
-                            boundary_variable_name, unwanted_attributes
-                        )
-                    )
-
             result = Result(
                 BaseCheck.MEDIUM, valid, self.section_titles["7.1"], reasoning
             )
             ret_val.append(result)
         return ret_val
 
-    def check_cell_boundaries_interval(self, ds):
-        """
-        7.1 Cell Boundaries
-        Recommendations: (1/2)
-        The points specified by a coordinate or auxiliary coordinate variable
-        should lie within, or on the boundary, of the cells specified by the
-        associated boundary variable.
-        """
-        ret_val = []
-        reasoning = []
-        for variable_name, boundary_variable_name in cfutil.get_cell_boundary_map(
-            ds
-        ).items():
-            valid = True
-
-            variable = ds.variables[variable_name]
-            boundary_variable = ds.variables[boundary_variable_name]
-
-            for ii in range(len(variable[:])):
-                if abs(boundary_variable[ii][1]) >= abs(boundary_variable[ii][0]):
-                    if not (
-                        (abs(variable[ii]) >= abs(boundary_variable[ii][0]))
-                        and (abs(variable[ii]) <= abs(boundary_variable[ii][1]))
-                    ):
-                        valid = False
-                        reasoning.append(
-                            "The points specified by the coordinate variable {} ({})"
-                            " lie outside the boundary of the cell specified by the "
-                            "associated boundary variable {} ({})".format(
-                                variable_name,
-                                variable[ii],
-                                boundary_variable_name,
-                                boundary_variable[ii],
-                            )
-                        )
-
-                result = Result(
-                    BaseCheck.MEDIUM, valid, self.section_titles["7.1"], reasoning
-                )
-                ret_val.append(result)
-                print(ret_val)
-            return ret_val
-
     def check_cell_measures(self, ds):
         """
         A method to over-ride the CF1_6Check method. In CF 1.7, it is specified
diff --git a/compliance_checker/cf/cf_1_8.py b/compliance_checker/cf/cf_1_8.py
index 2aa643b..fc666cc 100644
--- a/compliance_checker/cf/cf_1_8.py
+++ b/compliance_checker/cf/cf_1_8.py
@@ -484,7 +484,7 @@ class GeometryStorage(object):
     def check_geometry(self):
         invalid_vars = []
         for coord_var in self.coord_vars:
-            if not np.issubdtype(coord_var, float):
+            if not np.issubdtype(coord_var, np.float):
                 invalid_vars.append(coord_var.name)
         # can't continue if the geometry variables are not the correct size
         if invalid_vars:
diff --git a/compliance_checker/suite.py b/compliance_checker/suite.py
index 6632c93..f2beb9b 100644
--- a/compliance_checker/suite.py
+++ b/compliance_checker/suite.py
@@ -345,8 +345,23 @@ class CheckSuite(object):
                         )
                     )
                     check_max_level = BaseCheck.HIGH
+                else:
+                    try:
+                        check_max_level = check_lookup[split_check_spec[1]]
+                    except KeyError:
+                        warnings.warn(
+                            "Skip specifier '{}' on check '{}' not found,"
+                            " defaulting to skip entire check".format(
+                                split_check_spec[1], check_name
+                            )
+                        )
+                        check_max_level = BaseCheck.HIGH
 
-            check_dict[check_name] = check_max_level
+                check_dict[check_name] = check_max_level
+        else:
+            for check_name in skip_checks:
+                # always process
+                check_dict[check_name] = 0
 
         return check_dict
 


Test patch:
diff --git a/.github/workflows/cc-checker-ugrid-test.yml b/.github/workflows/cc-checker-ugrid-test.yml
index 4e7c507..bcff1f7 100644
--- a/.github/workflows/cc-checker-ugrid-test.yml
+++ b/.github/workflows/cc-checker-ugrid-test.yml
@@ -10,7 +10,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v2
 
     - name: Setup Conda
       uses: s-weigand/setup-conda@v1
diff --git a/.github/workflows/cc-plugin-glider-test.yml b/.github/workflows/cc-plugin-glider-test.yml
index 6cf7f8d..ea03393 100644
--- a/.github/workflows/cc-plugin-glider-test.yml
+++ b/.github/workflows/cc-plugin-glider-test.yml
@@ -10,7 +10,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v2
 
     - name: Setup Conda
       uses: s-weigand/setup-conda@v1
diff --git a/.github/workflows/cc-plugin-sgrid-test.yml b/.github/workflows/cc-plugin-sgrid-test.yml
index 7c61810..e4622ca 100644
--- a/.github/workflows/cc-plugin-sgrid-test.yml
+++ b/.github/workflows/cc-plugin-sgrid-test.yml
@@ -10,7 +10,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v2
 
     - name: Setup Conda
       uses: s-weigand/setup-conda@v1
diff --git a/.github/workflows/default-tests.yml b/.github/workflows/default-tests.yml
index a2ae017..1a8abf5 100644
--- a/.github/workflows/default-tests.yml
+++ b/.github/workflows/default-tests.yml
@@ -15,7 +15,7 @@ jobs:
       fail-fast: false
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v2
 
     - name: Setup Conda
       uses: s-weigand/setup-conda@v1
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 1961424..1b41fee 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -10,7 +10,7 @@ jobs:
     runs-on: ubuntu-latest
 
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v2
 
     - name: Setup Conda
       uses: s-weigand/setup-conda@v1
diff --git a/compliance_checker/tests/test_cf.py b/compliance_checker/tests/test_cf.py
index 01caf79..ad34b09 100644
--- a/compliance_checker/tests/test_cf.py
+++ b/compliance_checker/tests/test_cf.py
@@ -106,7 +106,10 @@ class TestCF1_6(BaseTestCase):
         ds.createDimension("siglev", 20)
 
         temp = ds.createVariable(
-            "temp", np.float64, dimensions=("time",), fill_value=99999999999999999999.0
+            "temp",
+            np.float64,
+            dimensions=("time",),
+            fill_value=np.float(99999999999999999999.0),
         )
         temp.coordinates = "sigma noexist"
         ds.createVariable("sigma", np.float64, dimensions=("siglev",))
@@ -181,7 +184,7 @@ class TestCF1_6(BaseTestCase):
             "temp",
             np.float64,
             dimensions=("time",),
-            fill_value=np.float64(99999999999999999999.0),
+            fill_value=np.float(99999999999999999999.0),
         )
 
         # give temp _FillValue as a float, expect good result
@@ -354,77 +357,6 @@ class TestCF1_6(BaseTestCase):
         self.assertEqual((3, 3), result.value)
         self.assertEqual([], result.msgs)
 
-    def test_check_fill_value_equal_missing_value(self):
-        """
-        According to CF §2.5.1 Recommendations: If both missing_value and _FillValue be used,
-        they should have the same value.
-        """
-        # TEST CONFORMANCE 2.5.1 RECOMMENDED
-        dataset = MockTimeSeries()
-        # Case of _FillValue and missing_value are not equal
-        dataset.createVariable("a", "d", ("time",), fill_value=9999.9)
-        dataset.variables["a"][0] = 1
-        dataset.variables["a"][1] = 2
-        dataset.variables["a"].setncattr("missing_value", [9939.9])
-
-        # Case of _FillValue and missing_value are equal
-        dataset.createVariable("b", "d", ("time",), fill_value=9999.9)
-        dataset.variables["b"][0] = 1
-        dataset.variables["b"][1] = 2
-        dataset.variables["b"].setncattr("missing_value", [9999.9])
-
-        result = self.cf.check_fill_value_equal_missing_value(dataset)
-
-        # check if the test fails when when variable "a" is checked.
-        expected_msgs = [
-            f"For the variable {v_name} the missing_value must be equal to the _FillValue"
-            for v_name in ("a")
-        ]
-
-        assert result.msgs == expected_msgs
-
-    def test_check_valid_range_or_valid_min_max_present(self):
-        """
-        2.5.1 Missing data, valid and actual range of data
-        Requirements:
-        The valid_range attribute must not be present if the
-        valid_min and/or valid_max attributes are present.
-        """
-        # TEST CONFORMANCE 2.5.1 REQUIRED
-        dataset = MockTimeSeries()
-        # Case of valid_min, valid_max, and valid_range are present
-        dataset.createVariable("a", "d", ("time",), fill_value=9999.9)
-        dataset.variables["a"][0] = 1
-        dataset.variables["a"][1] = 2
-        dataset.variables["a"].setncattr("valid_min", [-10])
-        dataset.variables["a"].setncattr("valid_max", [10])
-        dataset.variables["a"].setncattr("valid_range", [-10, 10])
-
-        # Case of valid_min and valid_max are present and valid_range is absent
-        dataset.createVariable("b", "d", ("time",), fill_value=9999.9)
-        dataset.variables["b"][0] = 1
-        dataset.variables["b"][1] = 2
-        dataset.variables["a"].setncattr("valid_min", [-10])
-        dataset.variables["a"].setncattr("valid_max", [10])
-
-        # Case of valid_min and valid_max are absent and valid_range is present
-        dataset.createVariable("c", "d", ("time",), fill_value=9999.9)
-        dataset.variables["c"][0] = 1
-        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)
-
-        # check if the test fails when when variable "a" is checked.
-        expected_msgs = [
-            f"For the variable {v_name} the valid_range attribute must not be present "
-            f"if the valid_min and/or valid_max attributes are present"
-            for v_name in ("a")
-        ]
-
-        assert result.msgs == expected_msgs
-        assert result.value[0] == result.value[1]
-
     def test_check_fill_value_outside_valid_range(self):
         """
         2.5.1 The _FillValue should be outside the range specified by valid_range (if used) for a variable.
@@ -1131,7 +1063,7 @@ class TestCF1_6(BaseTestCase):
         self.assertTrue(
             no_missing_terms(
                 "ocean_sigma_z_coordinate",
-                {"sigma", "eta", "depth", "depth_c", "zlev"},
+                {"sigma", "eta", "depth", "depth_c", "nsigma", "zlev"},
                 dimless_vertical_coordinates_1_6,
             )
         )
@@ -1258,25 +1190,6 @@ class TestCF1_6(BaseTestCase):
 
         dataset = MockTimeSeries()
         dataset.variables["time"]
-        # test case insensivity
-        valid_calendars = (
-            "GREGORIAN",
-            "STANDARD",
-            "PROLEPTIC_GREGORIAN",
-            "NOLEAP",
-            "365_DAY",
-            "ALL_LEAP",
-            "366_DAY",
-            "360_DAY",
-            "JULIAN",
-            "NONE",
-        )
-        for calendar_uppercase in valid_calendars:
-            results = self.cf.check_calendar(dataset)
-            scored, out_of, messages = get_results(results)
-            assert scored == out_of
-
-        # test custom month length calendars
         dataset.variables["time"].calendar = "custom"
         dataset.variables["time"].month_lengths = np.array([30.3], dtype=np.double)
         results = self.cf.check_calendar(dataset)
@@ -1331,20 +1244,22 @@ class TestCF1_6(BaseTestCase):
             dataset.variables["time"].calendar = calendar
             dataset.variables["time"].units = "seconds since 1582-10-15T00:00Z"
             # 500 element array with some failing values
+            # _FillValue at first element even though should not be present
+            # in time coordinate variable to test bad data handling
             # TEST CONFORMANCE 4.4.1 RECOMMENDED 4/4
-            dataset.variables["time"][:] = np.arange(-2, 498)
+            dataset.variables["time"][1:] = np.arange(-2, 497)
             results = self.cf.check_calendar(dataset)
             scored, out_of, messages = get_results(results)
             assert messages[-1] == (
                 "Variable time has time values prior to "
                 "1582-10-15T00:00Z and utilizes the "
-                "standard/gregorian calendar"
+                "standard or Gregorian calendar"
             )
             dataset.variables["time"][:] = np.arange(0, 500)
             results = self.cf.check_calendar(dataset)
             scored, out_of, messages = get_results(results)
             assert messages[-1] == (
-                "Variable time has standard/gregorian "
+                "Variable time has standard or Gregorian "
                 "calendar and does not cross 1582-10-15T00:00Z"
             )
             # TEST CONFORMANCE 4.4.1 RECOMMENDED 3/4
@@ -1651,22 +1566,13 @@ class TestCF1_6(BaseTestCase):
         # units should not exist for
         temp_flag.units = "1"
 
-        time_flag = dataset.createVariable("time_flag", "i1", ("time",))
-        time_flag.standard_name = "time status_flag"
-        time_flag.flag_values = np.array([1, 2], dtype=np.int8)
-        time_flag.flag_meanings = "good bad"
-
-        lat_flag = dataset.createVariable("lat_flag", "i1", ("time",))
-        lat_flag.standard_name = "latitude status_flag"
-
         temp.ancillary_variables = "temp_flag"
         scored, out_of, messages = get_results(self.cf.check_units(dataset))
-        n_failed = out_of - scored
-        assert n_failed == 1
-        expected_messages = {
-            "units attribute for variable temp_flag must be unset when status_flag standard name modifier is set"
-        }
-        assert set(messages) == expected_messages
+        assert scored != out_of
+        assert (
+            "units attribute for variable temperature_flag must be unset "
+            "when status_flag modifier is set"
+        )
 
         del temp_flag.units
         scored, out_of, messages = get_results(self.cf.check_units(dataset))
@@ -1985,7 +1891,7 @@ class TestCF1_7(BaseTestCase):
         dataset = self.load_dataset(STATIC_FILES["grid-boundaries"])
         results = self.cf.check_cell_boundaries(dataset)
         score, out_of, messages = get_results(results)
-        assert (score, out_of) == (0, 2)
+        assert (score, out_of) == (2, 2)
 
         dataset = self.load_dataset(STATIC_FILES["cf_example_cell_measures"])
         results = self.cf.check_cell_boundaries(dataset)
@@ -2023,38 +1929,6 @@ class TestCF1_7(BaseTestCase):
                 in messages
             )
 
-    def test_check_cell_boundaries_interval(self):
-        """
-        7.1 Cell Boundaries
-        Recommendations: (1/2)
-        The points specified by a coordinate or auxiliary coordinate variable
-        should lie within, or on the boundary, of the cells specified by the
-        associated boundary variable.
-        """
-
-        # create Cells on a longitude axis
-        dataset = MockTimeSeries()
-        dataset.createDimension("rnv", 2)
-        dataset.createDimension("rlon", 2)
-        dataset.createVariable("rlon", "d", ("rlon",))
-        dataset.createVariable("rlon_bnds", "d", ("rlon", "rnv"))
-
-        rlon = dataset.variables["rlon"]
-        rlon.standard_name = "longitude"
-        rlon.units = "degrees_east"
-        rlon.axis = "X"
-        rlon.long_name = "Longitude"
-        rlon.bounds = "rlon_bnds"
-        rlon[:] = np.array([-97.5, -99.5], dtype=np.float64)
-
-        rlon_bnds = dataset.variables["rlon_bnds"]
-        rlon_bnds.long_name = "Longitude Cell Boundaries"
-        rlon_bnds[:] = np.array([[-97, -98], [-98, -99]], dtype=np.float64)
-
-        results = self.cf.check_cell_boundaries_interval(dataset)
-        score, out_of, messages = get_results(results)
-        assert (score, out_of) == (1, 2)
-
     def test_cell_measures(self):
         """Over-ride the test_cell_measures from CF1_6"""
 
@@ -2424,47 +2298,40 @@ class TestCF1_7(BaseTestCase):
         # create a temporary variable and test this only
         nc_obj = MockTimeSeries()
         nc_obj.createVariable("temperature", "d", ("time",))
+        nc_obj.variables["temperature"].setncattr("test_att", np.float64(45))
         att_name = "test_att"
         _var = nc_obj.variables["temperature"]
 
         # first, test all valid checks show that it's valid
-        _var.test_att = "my_attr_value"  # string
+        attr = "my_attr_value"  # string
         attr_type = "S"
-        result = self.cf._check_attr_type(att_name, attr_type, _var.test_att)
+        result = self.cf._check_attr_type(att_name, attr_type, attr)
         self.assertTrue(result[0])
 
-        _var.test_att = np.int8(1)
+        attr = np.int64(1)
         attr_type = "N"
-        self.assertTrue(self.cf._check_attr_type(att_name, attr_type, _var.test_att)[0])
+        self.assertTrue(self.cf._check_attr_type(att_name, attr_type, attr)[0])
 
-        _var.test_att = np.float64(45)
+        attr = np.float64(45)
         attr_type = "D"
-        self.assertTrue(
-            self.cf._check_attr_type(att_name, attr_type, _var.test_att, _var)[0]
-        )
+        self.assertTrue(self.cf._check_attr_type(att_name, attr_type, attr, _var)[0])
 
         # check failures
-        _var.test_att = "my_attr_value"
+        attr = "my_attr_value"
         attr_type = "N"  # should be numeric
-        self.assertFalse(
-            self.cf._check_attr_type(att_name, attr_type, _var.test_att)[0]
-        )
+        self.assertFalse(self.cf._check_attr_type(att_name, attr_type, attr)[0])
 
-        _var.test_att = np.int8(64)
+        attr = np.int(64)
         attr_type = "S"  # should be string
-        self.assertFalse(
-            self.cf._check_attr_type(att_name, attr_type, _var.test_att)[0]
-        )
+        self.assertFalse(self.cf._check_attr_type(att_name, attr_type, attr)[0])
 
         nc_obj = MockTimeSeries()
         nc_obj.createVariable("temperature", "d", ("time",))
-        nc_obj.variables["temperature"].setncattr("test_att", 45)
+        nc_obj.variables["temperature"].setncattr("test_att", np.int32(45))
         _var = nc_obj.variables["temperature"]
-        _var.test_att = np.int8(45)
+        attr = np.int32(45)
         attr_type = "D"  # should match
-        self.assertFalse(
-            self.cf._check_attr_type(att_name, attr_type, _var.test_att, _var)[0]
-        )
+        self.assertFalse(self.cf._check_attr_type(att_name, attr_type, attr, _var)[0])
 
     def test_check_grid_mapping_attr_condition(self):
         """
@@ -2667,13 +2534,13 @@ class TestCF1_7(BaseTestCase):
         self.assertFalse(r[1].value)
         self.assertTrue(r[1].msgs)
 
-        temp.setncattr("scale_factor", np.uint32(5))
+        temp.setncattr("scale_factor", np.uint(5))
         r = self.cf.check_add_offset_scale_factor_type(dataset)
         self.assertFalse(r[1].value)
         self.assertTrue(r[1].msgs)
 
         # set good
-        temp.setncattr("scale_factor", np.float64(5))
+        temp.setncattr("scale_factor", np.float(5))
         r = self.cf.check_add_offset_scale_factor_type(dataset)
         self.assertTrue(r[1].value)
         self.assertFalse(r[1].msgs)
@@ -2685,8 +2552,8 @@ class TestCF1_7(BaseTestCase):
 
         # set same dtype
         dataset = MockTimeSeries()  # time lat lon depth
-        temp = dataset.createVariable("temp", np.int32, dimensions=("time",))
-        temp.setncattr("scale_factor", np.int32(5))
+        temp = dataset.createVariable("temp", np.int, dimensions=("time",))
+        temp.setncattr("scale_factor", np.int(5))
         r = self.cf.check_add_offset_scale_factor_type(dataset)
         self.assertTrue(r[1].value)
         self.assertFalse(r[1].msgs)
diff --git a/compliance_checker/tests/test_suite.py b/compliance_checker/tests/test_suite.py
index 9689de7..bc79b0a 100644
--- a/compliance_checker/tests/test_suite.py
+++ b/compliance_checker/tests/test_suite.py
@@ -6,7 +6,6 @@ from pathlib import Path
 import numpy as np
 from pkg_resources import resource_filename
 
-from compliance_checker.acdd import ACDDBaseCheck
 from compliance_checker.base import BaseCheck, GenericFile, Result
 from compliance_checker.suite import CheckSuite
 
@@ -107,17 +106,10 @@ class TestSuite(unittest.TestCase):
         ds = self.cs.load_dataset(static_files["2dim"])
         # exclude title from the check attributes
         score_groups = self.cs.run_all(ds, ["acdd"], skip_checks=["check_high"])
-        msg_set = {
-            msg
+        assert all(
+            sg.name not in {"Conventions", "title", "keywords", "summary"}
             for sg in score_groups["acdd"][0]
-            for msg in sg.msgs
-            if sg.weight == BaseCheck.HIGH
-        }
-        skipped_messages = {
-            att + " not present" for att in ACDDBaseCheck().high_rec_atts
-        }
-        # none of the skipped messages should be in the result set
-        self.assertTrue(len(msg_set & skipped_messages) == 0)
+        )
 
     def test_skip_check_level(self):
         """Checks level limited skip checks"""