Skip to content

Commit a54f2c5

Browse files
committed
Update schema salad version dependency, fix format
1 parent d443844 commit a54f2c5

File tree

6 files changed

+24
-10
lines changed

6 files changed

+24
-10
lines changed

cwltool/argparser.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,21 @@ def arg_parser() -> argparse.ArgumentParser:
340340
dest="skip_schemas",
341341
)
342342

343-
parser.add_argument(
343+
exgroup = parser.add_mutually_exclusive_group()
344+
exgroup.add_argument(
344345
"--no-doc-cache",
345346
action="store_false",
346347
help="Disable disk cache for documents loaded over HTTP",
347348
default=True,
348349
dest="doc_cache",
349350
)
351+
exgroup.add_argument(
352+
"--doc-cache",
353+
action="store_true",
354+
help="Enable disk cache for documents loaded over HTTP",
355+
default=True,
356+
dest="doc_cache",
357+
)
350358

351359
exgroup = parser.add_mutually_exclusive_group()
352360
exgroup.add_argument("--verbose", action="store_true", help="Default logging")

cwltool/context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(self, kwargs: Optional[Dict[str, Any]] = None) -> None:
7171
self.prov_obj = None # type: Optional[ProvenanceProfile]
7272
self.do_update = None # type: Optional[bool]
7373
self.jobdefaults = None # type: Optional[CommentedMap]
74-
self.doc_cache = True # type: bool
74+
self.doc_cache = True # type: bool
7575

7676
super(LoadingContext, self).__init__(kwargs)
7777

cwltool/load_tool.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def default_loader(fetcher_constructor=None, enable_dev=False, doc_cache=True):
7070
jobloaderctx,
7171
fetcher_constructor=fetcher_constructor,
7272
allow_attachments=lambda r: enable_dev,
73-
doc_cache=doc_cache
73+
doc_cache=doc_cache,
7474
)
7575

7676

@@ -114,9 +114,11 @@ def fetch_document(
114114
else:
115115
loadingContext = loadingContext.copy()
116116
if loadingContext.loader is None:
117-
loadingContext.loader = default_loader(loadingContext.fetcher_constructor,
118-
enable_dev=loadingContext.enable_dev,
119-
doc_cache=loadingContext.doc_cache)
117+
loadingContext.loader = default_loader(
118+
loadingContext.fetcher_constructor,
119+
enable_dev=loadingContext.enable_dev,
120+
doc_cache=loadingContext.doc_cache,
121+
)
120122

121123
if isinstance(argsworkflow, str):
122124
uri, fileuri = resolve_tool_uri(
@@ -324,7 +326,7 @@ def resolve_and_validate_document(
324326
cache=sch_document_loader.cache,
325327
fetcher_constructor=loadingContext.fetcher_constructor,
326328
skip_schemas=skip_schemas,
327-
doc_cache=loadingContext.doc_cache
329+
doc_cache=loadingContext.doc_cache,
328330
)
329331

330332
if cwlVersion == "v1.0":

cwltool/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,9 @@ def setup_loadingContext(
667667
else:
668668
loadingContext = loadingContext.copy()
669669
loadingContext.loader = default_loader(
670-
loadingContext.fetcher_constructor, enable_dev=args.enable_dev, doc_cache=args.doc_cache
670+
loadingContext.fetcher_constructor,
671+
enable_dev=args.enable_dev,
672+
doc_cache=args.doc_cache,
671673
)
672674
loadingContext.research_obj = runtimeContext.research_obj
673675
loadingContext.disable_js_validation = args.disable_js_validation or (

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"ruamel.yaml >= 0.12.4, <= 0.16.5",
6262
"rdflib >= 4.2.2, < 4.3.0",
6363
"shellescape >= 3.4.1, < 3.5",
64-
"schema-salad >= 5, < 6",
64+
"schema-salad >= 5.0.20200126033820, < 6",
6565
"mypy-extensions",
6666
"psutil",
6767
"prov == 1.5.1",

tests/test_pack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def test_pack():
4747

4848

4949
def test_pack_input_named_name():
50-
loadingContext, workflowobj, uri = fetch_document(get_data("tests/wf/trick_revsort.cwl"))
50+
loadingContext, workflowobj, uri = fetch_document(
51+
get_data("tests/wf/trick_revsort.cwl")
52+
)
5153
loadingContext.do_update = False
5254
loadingContext, uri = resolve_and_validate_document(
5355
loadingContext, workflowobj, uri

0 commit comments

Comments
 (0)