24 lines
No EOL
764 B
Python
24 lines
No EOL
764 B
Python
import argparse
|
|
import json
|
|
from qc_engine import QCEngine
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description='QC runner')
|
|
parser.add_argument('--checks_dir', required=True, help='Directory containing check definitions')
|
|
parser.add_argument('--profile', required=True, help='Path to QC profile JSON')
|
|
parser.add_argument('--data', required=True, help='Path to input JSON data (e.g. the extracted listing)')
|
|
|
|
args = parser.parse_args()
|
|
|
|
# Load input data
|
|
with open(args.data, "r") as f:
|
|
data = json.load(f)
|
|
|
|
qc_engine = QCEngine(args.checks_dir, args.profile)
|
|
results = qc_engine.run_all_checks(data)
|
|
|
|
# Print or write out results
|
|
print(json.dumps(results, indent=2))
|
|
|
|
if __name__ == "__main__":
|
|
main() |