Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove set check for certain variable attributes due to sorting issues #1108

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions compliance_checker/cf/cf_1_6.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,18 @@ def check_child_attr_data_types(self, ds):
"""

ctx = TestCtx(BaseCheck.MEDIUM, self.section_titles["2.5"])
special_attrs = {
special_attrs = (
"actual_range",
"valid_min",
"valid_max",
"valid_range",
"_FillValue",
}
)

for _var_name, var in ds.variables.items():
for att_name in special_attrs.intersection(var.ncattrs()):
self._parent_var_attr_type_check(att_name, var, ctx)
for att_name in special_attrs:
if att_name in var.ncattrs():
self._parent_var_attr_type_check(att_name, var, ctx)
return ctx.to_result()

# TODO: consider renaming to avoid confusion with non-underscore
Expand Down
Loading