Skip to content

Commit 5c139a0

Browse files
authored
Merge branch 'master' into cache_improvements
2 parents 1a157cf + 741afe7 commit 5c139a0

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

cwltool/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def bind_input(self,
282282
self.files.append(datum)
283283
if (binding and binding.get("loadContents")) or schema.get("loadContents"):
284284
with self.fs_access.open(datum["location"], "rb") as f:
285-
datum["contents"] = f.read(CONTENT_LIMIT)
285+
datum["contents"] = f.read(CONTENT_LIMIT).decode("utf-8")
286286

287287
if "secondaryFiles" in schema:
288288
if "secondaryFiles" not in datum:

cwltool/command_line_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ def collect_output(self,
691691
if binding.get("loadContents") or compute_checksum:
692692
contents = f.read(CONTENT_LIMIT)
693693
if binding.get("loadContents"):
694-
files["contents"] = contents.decode('unicode_escape')
694+
files["contents"] = contents.decode("utf-8")
695695
if compute_checksum:
696696
checksum = hashlib.sha1()
697697
while contents != b"":

cwltool/expression.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ def jshead(engine_config, rootvars):
1919

2020
# make sure all the byte strings are converted
2121
# to str in `rootvars` dict.
22-
# TODO: need to make sure the `rootvars dict`
23-
# contains no bytes type in the first place.
24-
if six.PY3:
25-
rootvars = bytes2str_in_dicts(rootvars) # type: ignore
2622

2723
return u"\n".join(
2824
engine_config + [u"var {} = {};".format(k, json_dumps(v, indent=4))
@@ -271,6 +267,11 @@ def do_eval(ex, # type: Union[Text, Dict]
271267
u"self": context,
272268
u"runtime": runtime}
273269

270+
# TODO: need to make sure the `rootvars dict`
271+
# contains no bytes type in the first place.
272+
if six.PY3:
273+
rootvars = bytes2str_in_dicts(rootvars) # type: ignore
274+
274275
if needs_parsing(ex):
275276
assert isinstance(ex, string_types)
276277
fullJS = False

cwltool/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def postScatterEval(io):
337337
for k, v in io.items():
338338
if k in loadContents and v.get("contents") is None:
339339
with fs_access.open(v["location"], "rb") as f:
340-
v["contents"] = f.read(CONTENT_LIMIT)
340+
v["contents"] = f.read(CONTENT_LIMIT).decode("utf-8")
341341

342342
def valueFromFunc(k, v): # type: (Any, Any) -> Any
343343
if k in valueFrom:

jenkins.bash

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ do
4242
pip${PYTHON_VERSION} install "cwltest>=1.0.20180518074130" codecov
4343
pushd common-workflow-language-master
4444
rm -f .coverage*
45+
EXTRA="--parallel"
4546
# shellcheck disable=SC2154
4647
if [[ "$version" = *dev* ]]
4748
then
48-
EXTRA=" --enable-dev"
49-
else
50-
EXTRA=""
49+
EXTRA+=" --enable-dev"
5150
fi
5251
if [[ "$CONTAINER" = "singularity" ]]
5352
then

0 commit comments

Comments
 (0)