Skip to content

Commit

Permalink
Linter updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jr3cermak committed Mar 19, 2024
1 parent 74f356b commit b06e777
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion compliance_checker/tests/test_cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@ def test_64bit(self):
dataset = self.load_dataset(STATIC_FILES["ints64"])
suite = CheckSuite()
suite.checkers = {"cf": CF1_6Check}
#suite.run(dataset, "cf")
# suite.run(dataset, "cf")
suite.run_all(dataset, ["cf"], skip_checks=["cf"])

def test_variable_feature_check(self):
Expand Down
8 changes: 4 additions & 4 deletions compliance_checker/tests/test_cf_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def get_results(self, check_results, checksuite):
], # must be specified to load this param at runtime, instead of at collection
)
def test_cf_integration(self, loaded_dataset, expected_messages, cs):
#check_results = cs.run(loaded_dataset, [], "cf")
# check_results = cs.run(loaded_dataset, [], "cf")
check_results = cs.run_all(loaded_dataset, ["cf"], skip_checks=[])
scored, out_of, messages = self.get_results(check_results, cs)

Expand All @@ -273,15 +273,15 @@ def test_cf_integration(self, loaded_dataset, expected_messages, cs):
indirect=["loaded_dataset"],
)
def test_no_incorrect_errors(self, cs, loaded_dataset, wrong_message):
#check_results = cs.run(loaded_dataset, [], True, "cf")
# check_results = cs.run(loaded_dataset, [], True, "cf")
check_results = cs.run_all(loaded_dataset, ["cf"], skip_checks=[])
messages = self.get_results(check_results, cs)[-1]

assert wrong_message not in "".join(messages)

@pytest.mark.parametrize("loaded_dataset", ["fvcom"], indirect=True)
def test_fvcom(self, cs, loaded_dataset):
#check_results = cs.run(loaded_dataset, [], True, "cf")
# check_results = cs.run(loaded_dataset, [], True, "cf")
check_results = cs.run_all(loaded_dataset, ["cf"], skip_checks=[])
scored, out_of, messages = self.get_results(check_results, cs)
assert scored < out_of
Expand Down Expand Up @@ -310,7 +310,7 @@ def test_ncei_templates(self, cs, loaded_dataset):
Tests some of the NCEI NetCDF templates, which usually should get a
perfect score.
"""
#check_results = cs.run(loaded_dataset, [], "cf")
# check_results = cs.run(loaded_dataset, [], "cf")
check_results = cs.run_all(loaded_dataset, ["cf"], skip_checks=[])
scored, out_of, messages = self.get_results(check_results, cs)
assert scored < out_of
2 changes: 1 addition & 1 deletion compliance_checker/tests/test_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_thredds():
Tests that a connection can be made to a remote THREDDS endpoint
"""
# Returns: error 400
#url = "http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GFS/Global_0p25deg_ana/TP"
# url = "http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GFS/Global_0p25deg_ana/TP"
# Use a smaller dataset
url = "https://thredds.ucar.edu/thredds/ncss/grid/grib/NCEP/GFS/Global_0p25deg_ana/TP?var=Temperature_altitude_above_msl&accept=netcdf3"

Expand Down
14 changes: 7 additions & 7 deletions compliance_checker/tests/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ def test_suite(self):
# BWA: what's the purpose of this test? Just to see if the suite
# runs without errors?
ds = self.cs.load_dataset(static_files["2dim"])
#self.cs.run(ds, [], "acdd")
# self.cs.run(ds, [], "acdd")
self.cs.run_all(ds, ["acdd"], skip_checks=[])

def test_suite_pathlib(self):
path_obj = Path(static_files["2dim"])
ds = self.cs.load_dataset(path_obj)
#self.cs.run(ds, [], "acdd")
# self.cs.run(ds, [], "acdd")
self.cs.run_all(ds, ["acdd"], skip_checks=[])

def test_unicode_formatting(self):
ds = self.cs.load_dataset(static_files["bad_region"])
#score_groups = self.cs.run(ds, [], "cf")
# score_groups = self.cs.run(ds, [], "cf")
score_groups = self.cs.run_all(ds, ["cf"], skip_checks=[])

limit = 2
Expand Down Expand Up @@ -166,7 +166,7 @@ def test_group_func(self):
# This is checking for issue #183, where group_func results in
# IndexError: list index out of range
ds = self.cs.load_dataset(static_files["bad_data_type"])
#score_groups = self.cs.run(ds, [], "cf")
# score_groups = self.cs.run(ds, [], "cf")
score_groups = self.cs.run_all(ds, ["cf"], skip_checks=[])

limit = 2
Expand Down Expand Up @@ -202,7 +202,7 @@ def test_cdl_file(self):
# Testing whether you can run compliance checker on a .cdl file
# Load the cdl file
ds = self.cs.load_dataset(static_files["test_cdl"])
#vals = self.cs.run(ds, [], "cf")
# vals = self.cs.run(ds, [], "cf")
vals = self.cs.run_all(ds, ["cf"], skip_checks=[])

limit = 2
Expand All @@ -226,7 +226,7 @@ def test_cdl_file(self):

# Ok now load the nc file that it came from
ds = self.cs.load_dataset(static_files["test_cdl_nc"])
#vals = self.cs.run(ds, [], "cf")
# vals = self.cs.run(ds, [], "cf")
vals = self.cs.run_all(ds, ["cf"], skip_checks=[])

limit = 2
Expand Down Expand Up @@ -265,7 +265,7 @@ def test_standard_output_score_header(self):
of potential issues, rather than the weighted score
"""
ds = self.cs.load_dataset(static_files["bad_region"])
#score_groups = self.cs.run(ds, [], "cf")
# score_groups = self.cs.run(ds, [], "cf")
score_groups = self.cs.run_all(ds, ["cf"], skip_checks=[])
limit = 2
groups, errors = score_groups["cf"]
Expand Down

0 comments on commit b06e777

Please sign in to comment.