ioos / compliance-checker

Python tool to check your datasets against compliance standards
http://ioos.github.io/compliance-checker/
Apache License 2.0
104 stars 56 forks source link

Invocation of Compliance Checker from Python code unintuitive #1079

Open benjwadams opened 1 month ago

benjwadams commented 1 month ago

Invocation of Compliance Checker is too complex due to legacy design issues. You need to run (not all variable definitions included here):

from compliance_checker.suite import CheckSuite
cs = CheckSuite()
cs.load_all_available_checkers()
failures, _ = ComplianceChecker.run_checker(ds_loc=url_path,
                                    checker_names=['gliderdac'], verbose=True,
                                    criteria='lenient', output_format='json',
                                    output_filename=outfile)

just to run a single checker, for example. It'd be better if these checks were loaded by default based upon some sort of factory pattern instead of having this explicit prelude.