Skip to content

Commit

Permalink
cwltool: upgrade to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
audrium committed Jul 13, 2021
1 parent 575cf29 commit 8656f2b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 17 additions & 1 deletion reana_client/cli/cwl_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from cwltool.context import LoadingContext
from cwltool.load_tool import fetch_document
from cwltool.main import printdeps
from cwltool.workflow import findfiles

from reana_client.cli.utils import add_access_token_options
from reana_client.config import default_user
Expand All @@ -32,6 +31,23 @@
PY3 = sys.version_info > (3,)


def findfiles(wo, fn=None):
"""Return a list CWL workflow files."""
if fn is None:
fn = []
if isinstance(wo, dict):
if wo.get("class") == "File":
fn.append(wo)
findfiles(wo.get("secondaryFiles", None), fn)
else:
for w in wo.values():
findfiles(w, fn)
elif isinstance(wo, list):
for w in wo:
findfiles(w, fn)
return fn


def get_file_dependencies_obj(cwl_obj, basedir):
"""Return a dictionary which contains the CWL workflow file dependencies.
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
install_requires = [
'click>=7 ; python_version>="3"',
'click==7.0 ; python_version=="2.7"',
"cwltool==1.0.20191022103248",
'cwl-utils==0.5 ; python_version>="3"',
"cwltool==3.1.20210628163208",
"jsonpointer>=2.0",
"PyYAML>=5.1",
"reana-commons[yadage]>=0.8.0a17,<0.9.0",
Expand Down

0 comments on commit 8656f2b

Please sign in to comment.