X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/bfcd32beb41fcba2a5120ab899a080aef8305160..8991b43990aa7a77edd78f165114b93a6a207985:/sdk/cwl/arvados_cwl/__init__.py diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py index 341929454a..f3629b6897 100644 --- a/sdk/cwl/arvados_cwl/__init__.py +++ b/sdk/cwl/arvados_cwl/__init__.py @@ -226,15 +226,12 @@ def arg_parser(): # type: () -> argparse.ArgumentParser def add_arv_hints(): cwltool.command_line_tool.ACCEPTLIST_EN_RELAXED_RE = re.compile(r".*") cwltool.command_line_tool.ACCEPTLIST_RE = cwltool.command_line_tool.ACCEPTLIST_EN_RELAXED_RE - res10 = pkg_resources.resource_stream(__name__, 'arv-cwl-schema-v1.0.yml') - res11 = pkg_resources.resource_stream(__name__, 'arv-cwl-schema-v1.1.yml') - customschema10 = res10.read().decode('utf-8') - customschema11 = res11.read().decode('utf-8') - use_custom_schema("v1.0", "http://arvados.org/cwl", customschema10) - use_custom_schema("v1.1.0-dev1", "http://arvados.org/cwl", customschema11) - use_custom_schema("v1.1", "http://arvados.org/cwl", customschema11) - res10.close() - res11.close() + supported_versions = ["v1.0", "v1.1", "v1.2"] + for s in supported_versions: + res = pkg_resources.resource_stream(__name__, 'arv-cwl-schema-%s.yml' % s) + customschema = res.read().decode('utf-8') + use_custom_schema(s, "http://arvados.org/cwl", customschema) + res.close() cwltool.process.supportedProcessRequirements.extend([ "http://arvados.org/cwl#RunInSingleContainer", "http://arvados.org/cwl#OutputDirType",