|
22 | 22 |
|
23 | 23 | from cwl_utils.parser import cwl_v1_2, cwl_v1_2_utils |
24 | 24 | from schema_salad.exceptions import ValidationException |
| 25 | +from schema_salad.fetcher import Fetcher |
25 | 26 | from schema_salad.ref_resolver import Loader, file_uri |
26 | 27 | from schema_salad.schema import validate_doc |
27 | 28 | from schema_salad.sourceline import SourceLine, cmap |
|
32 | 33 | ResolveType, |
33 | 34 | json_dumps, |
34 | 35 | ) |
35 | | -from schema_salad.fetcher import Fetcher |
36 | 36 |
|
37 | 37 | from ruamel.yaml.comments import CommentedMap, CommentedSeq |
38 | 38 |
|
@@ -395,7 +395,6 @@ def resolve_and_validate_document( |
395 | 395 | workflowobj: Union[CommentedMap, CommentedSeq], |
396 | 396 | uri: str, |
397 | 397 | preprocess_only: bool = False, |
398 | | - skip_schemas: Optional[bool] = None, |
399 | 398 | ) -> Tuple[LoadingContext, str]: |
400 | 399 | """Validate a CWL document.""" |
401 | 400 | if not loadingContext.loader: |
@@ -502,7 +501,7 @@ def resolve_and_validate_document( |
502 | 501 | idx=loader.idx, |
503 | 502 | cache=sch_document_loader.cache, |
504 | 503 | fetcher_constructor=loadingContext.fetcher_constructor, |
505 | | - skip_schemas=skip_schemas, |
| 504 | + skip_schemas=loadingContext.skip_schemas, |
506 | 505 | doc_cache=loadingContext.doc_cache, |
507 | 506 | ) |
508 | 507 |
|
@@ -652,7 +651,9 @@ def load_tool( |
652 | 651 | loadingContext, workflowobj, uri = fetch_document(argsworkflow, loadingContext) |
653 | 652 |
|
654 | 653 | loadingContext, uri = resolve_and_validate_document( |
655 | | - loadingContext, workflowobj, uri |
| 654 | + loadingContext, |
| 655 | + workflowobj, |
| 656 | + uri, |
656 | 657 | ) |
657 | 658 |
|
658 | 659 | return make_tool(uri, loadingContext) |
@@ -682,15 +683,13 @@ def recursive_resolve_and_validate_document( |
682 | 683 | workflowobj: Union[CommentedMap, CommentedSeq], |
683 | 684 | uri: str, |
684 | 685 | preprocess_only: bool = False, |
685 | | - skip_schemas: Optional[bool] = None, |
686 | 686 | ) -> Tuple[LoadingContext, str, Process]: |
687 | 687 | """Validate a CWL document, checking that a tool object can be built.""" |
688 | 688 | loadingContext, uri = resolve_and_validate_document( |
689 | 689 | loadingContext, |
690 | 690 | workflowobj, |
691 | 691 | uri, |
692 | 692 | preprocess_only=preprocess_only, |
693 | | - skip_schemas=skip_schemas, |
694 | 693 | ) |
695 | 694 | tool = make_tool(uri, loadingContext) |
696 | 695 | return loadingContext, uri, tool |
0 commit comments