Skip to content

Add update boolean parameter to load_tool.validate_document. #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cwltool/load_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def fetch_document(argsworkflow):


def validate_document(document_loader, workflowobj, uri,
enable_dev=False, strict=True, preprocess_only=False):
# type: (Loader, Dict[unicode, Any], unicode, bool, bool, bool) -> Tuple[Loader, Names, Any, Dict[str, str], unicode]
enable_dev=False, strict=True, preprocess_only=False, process_update=True):
# type: (Loader, Dict[unicode, Any], unicode, bool, bool, bool, bool) -> Tuple[Loader, Names, Any, Dict[str, str], unicode]
"""Validate a CWL document."""
jobobj = None
if "cwl:tool" in workflowobj:
Expand Down Expand Up @@ -93,7 +93,7 @@ def validate_document(document_loader, workflowobj, uri,
"$schemas": processobj.get("$schemas", []),
"cwlVersion": processobj["cwlVersion"]}

if metadata.get("cwlVersion") != update.LATEST:
if process_update and metadata.get("cwlVersion") != update.LATEST:
processobj = update.update(
processobj, document_loader, fileuri, enable_dev, metadata)

Expand Down