generated from coulomb/repo-seed
31 lines
852 B
Python
31 lines
852 B
Python
#!/usr/bin/env python3
|
|
"""Generate a CMIS capability maturity scorecard from a guide-board run."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
import json
|
|
from pathlib import Path
|
|
|
|
from open_cmis_tck.scorecard import build_scorecard, write_scorecard
|
|
|
|
|
|
def main() -> int:
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--run-dir", type=Path, required=True)
|
|
parser.add_argument("--output-dir", type=Path)
|
|
parser.add_argument("--print", action="store_true", dest="print_json")
|
|
args = parser.parse_args()
|
|
|
|
if args.print_json:
|
|
print(json.dumps(build_scorecard(args.run_dir), indent=2, sort_keys=True))
|
|
return 0
|
|
|
|
result = write_scorecard(args.run_dir, args.output_dir)
|
|
print(json.dumps(result, indent=2, sort_keys=True))
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|