Skip to content

Commit 5f5fcf5

Browse files
authored
Merge branch 'master' into feature-js-console-output
2 parents 49171c5 + 5b2cd24 commit 5f5fcf5

File tree

8 files changed

+35
-11
lines changed

8 files changed

+35
-11
lines changed

cwltool/draft2tool.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,17 @@ def job(self,
221221
cmdline = ["docker", "run", dockerimg] + cmdline
222222
keydict = {u"cmdline": cmdline}
223223

224-
for _, f in cachebuilder.pathmapper.items():
224+
for location, f in cachebuilder.pathmapper.items():
225225
if f.type == "File":
226+
checksum = next((e['checksum'] for e in cachebuilder.files
227+
if 'location' in e and e['location'] == location
228+
and 'checksum' in e
229+
and e['checksum'] != 'sha1$hash'), None)
226230
st = os.stat(f.resolved)
227-
keydict[f.resolved] = [st.st_size, int(st.st_mtime * 1000)]
231+
if checksum:
232+
keydict[f.resolved] = [st.st_size, checksum]
233+
else:
234+
keydict[f.resolved] = [st.st_size, int(st.st_mtime * 1000)]
228235

229236
interesting = {"DockerRequirement",
230237
"EnvVarRequirement",

cwltool/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def load_job_order(args, t, stdin, print_input_deps=False, relative_deps=False,
436436
if len(args.job_order) == 1 and args.job_order[0][0] != "-":
437437
job_order_file = args.job_order[0]
438438
elif len(args.job_order) == 1 and args.job_order[0] == "-":
439-
job_order_object = yaml.round_trip_load(stdin) # type: ignore
439+
job_order_object = yaml.round_trip_load(stdin)
440440
job_order_object, _ = loader.resolve_all(job_order_object, file_uri(os.getcwd()) + "/")
441441
else:
442442
job_order_file = None

cwltool/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def __init__(self, toolpath_object, pos, **kwargs):
684684
for tool_entry in self.embedded_tool.tool[toolfield]:
685685
frag = shortname(tool_entry["id"])
686686
if frag == shortinputid:
687-
param.update(tool_entry) # type: ignore
687+
param.update(tool_entry)
688688
found = True
689689
bound.add(frag)
690690
break

mypy.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[mypy-ruamel.*]
2+
ignore_errors = True
3+
4+
[mypy-schema_salad.*]
5+
ignore_errors = True

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
requests>=1.0
2-
ruamel.yaml==0.13.7
2+
ruamel.yaml>=0.12.4,<0.15
33
rdflib==4.2.2
44
rdflib-jsonld==0.4.0
55
shellescape==3.4.1
6-
schema-salad>=2.5.20170623152720,<3
7-
typing==3.5.2.2 ; python_version>="2.7"
6+
schema-salad>=2.6,<3
7+
typing==3.5.3

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
install_requires=[
5656
'setuptools',
5757
'requests >= 1.0',
58-
'ruamel.yaml >= 0.12.4',
58+
'ruamel.yaml >= 0.12.4, < 0.15',
5959
'rdflib >= 4.2.2, < 4.3.0',
6060
'shellescape >= 3.4.1, < 3.5',
61-
'schema-salad >= 2.5.20170623152720, < 3',
62-
'typing >= 3.5.2, < 3.6',
61+
'schema-salad >= 2.6, < 3',
62+
'typing >= 3.5.3',
6363
'six >= 1.8.0',
6464
],
6565
setup_requires=[] + pytest_runner,

tests/test_fetch.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import unittest
22

3+
from six.moves import urllib
4+
35
import schema_salad.main
46
import schema_salad.ref_resolver
57
import schema_salad.schema
@@ -32,6 +34,16 @@ def check_exists(self, url): # type: (unicode) -> bool
3234
else:
3335
return False
3436

37+
def urljoin(self, base, url):
38+
urlsp = urllib.parse.urlsplit(url)
39+
if urlsp.scheme:
40+
return url
41+
basesp = urllib.parse.urlsplit(base)
42+
43+
if basesp.scheme == "keep":
44+
return base + "/" + url
45+
return urllib.parse.urljoin(base, url)
46+
3547
def test_resolver(d, a):
3648
return "baz:bar/" + a
3749

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
#envlist = py27-lint, py27-unit, py27-pipconflictchecker, py33-lint, py33-unit, py34-lint, py34-unit, py35-py2_mypy, py35-mypy, py35-lint, py35-unit, py36-lint, py36-unit # only when py3 compat is done
3-
envlist = py27-lint, py27-unit, py27-pipconflictchecker, py36-lint, py35-lint, py34-lint, py33-lint
3+
envlist = py27-lint, py27-unit, py27-pipconflictchecker, py36-lint, py35-lint, py34-lint, py33-lint, py35-py2_mypy
44
skipsdist = True
55

66
[travis]

0 commit comments

Comments
 (0)