forked from ioos/compliance-checker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cchecker.py
executable file
·24 lines (18 loc) · 1.2 KB
/
cchecker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
import pprint
import argparse
from compliance_checker.runner import ComplianceChecker, ComplianceCheckerCheckSuite
def main():
parser = argparse.ArgumentParser()
parser.add_argument('dataset_location', nargs=1, help= "Defines the location of the dataset to be checked.")
parser.add_argument('--test', '-t', '--test=', '-t=', help= "Select the Checks you want to perform. Either all (default), cf, ioos, or acdd.", nargs='+', default=[], choices=ComplianceCheckerCheckSuite.checkers.keys())
parser.add_argument('--criteria', '-c', help="Define the criteria for the checks. Either Strict, Normal, or Lenient. Defaults to Normal.", nargs='?', default='normal', choices = ['lenient', 'normal', 'strict'])
parser.add_argument('--verbose' , '-v', help="Increase output. May be specified up to three times.", action="count")
args = parser.parse_args()
print "Running Compliance Checker on the dataset from: %s" % args.dataset_location[0]
ComplianceChecker.run_checker(args.dataset_location[0],
args.test,
args.verbose,
args.criteria)
if __name__ == "__main__":
main()