Commit f09c328f authored by Mitar's avatar Mitar

Also support YAML pipelines.

parent d9244284
......@@ -4,6 +4,8 @@ import argparse
import glob
import json
import yaml
parser = argparse.ArgumentParser(description="Compute pipeline coverage.")
parser.add_argument('interface_versions', metavar='INTERFACE', nargs='*', help="interface version(s) to compute coverage for", default=())
arguments = parser.parse_args()
......@@ -39,6 +41,12 @@ for interface_version in arguments.interface_versions:
primitives_used_in_pipelines.update(primitives_used_in_pipeline(pipeline))
for pipeline_path in glob.iglob('{interface_version}/*/*/*/pipelines/*.yml'.format(interface_version=interface_version)):
with open(pipeline_path, 'r', encoding='utf8') as pipeline_file:
pipeline = yaml.safe_load(pipeline_file)
primitives_used_in_pipelines.update(primitives_used_in_pipeline(pipeline))
for primitive_id, primitive in known_primitives.items():
if primitive_id not in primitives_used_in_pipelines:
print(primitive['source']['name'], primitive['id'], primitive['python_path'])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment