Skip to content

Commit 4c0f100

Browse files
committed
Implement non-strict CWL parsing option.
For cwltool and Galaxy engines.
1 parent ce0dc4e commit 4c0f100

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

planemo/cwl/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def run_cwltool(ctx, path, job_path, **kwds):
7171
if kwds.get("no_container", False):
7272
args.append("--no-container")
7373

74-
args.append("--non-strict")
74+
if kwds.get("non_strict_cwl", False):
75+
args.append("--non-strict")
7576

7677
args.extend([path, job_path])
7778
ctx.vlog("Calling cwltool with arguments %s" % args)

planemo/galaxy/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ def _shared_galaxy_properties(config_directory, kwds, for_tests):
536536
'check_migrate_tools': "False",
537537
'use_cached_dependency_manager': str(kwds.get("conda_auto_install", False)),
538538
'brand': kwds.get("galaxy_brand", DEFAULT_GALAXY_BRAND),
539+
'strict_cwl_validation': str(not kwds.get("non_strict_cwl", False)),
539540
}
540541
if for_tests:
541542
empty_dir = os.path.join(config_directory, "empty")

planemo/options.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ def run_engine_option():
4444
)
4545

4646

47+
def non_strict_cwl_option():
48+
return planemo_option(
49+
"--non_strict_cwl",
50+
default=False,
51+
is_flag=True,
52+
help="Disable strict validation of CWL.",
53+
)
54+
55+
4756
def serve_engine_option():
4857
return planemo_option(
4958
"--engine",
@@ -992,6 +1001,7 @@ def galaxy_serve_options():
9921001
return _compose(
9931002
galaxy_run_options(),
9941003
serve_engine_option(),
1004+
non_strict_cwl_option(),
9951005
docker_galaxy_image_option(),
9961006
galaxy_config_options(),
9971007
daemon_option(),
@@ -1086,6 +1096,7 @@ def tool_test_json():
10861096
def engine_options():
10871097
return _compose(
10881098
run_engine_option(),
1099+
non_strict_cwl_option(),
10891100
cwltool_no_container_option(),
10901101
docker_galaxy_image_option(),
10911102
)

0 commit comments

Comments
 (0)