Skip to content

Commit 2ca1a0d

Browse files
committed
revert relocation of default_make_tool initialization
Fixes: #1525
1 parent a3cc4fc commit 2ca1a0d

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

cwltool/factory.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import os
22
from typing import Any, Dict, Optional, Union
33

4-
from . import context, load_tool
4+
from . import load_tool
55
from .context import LoadingContext, RuntimeContext
66
from .errors import WorkflowException
77
from .executors import JobExecutor, SingleJobExecutor
88
from .process import Process
99
from .utils import CWLObjectType
10-
from .workflow import default_make_tool
1110

1211

1312
class WorkflowStatus(Exception):
@@ -49,8 +48,6 @@ def __init__(
4948
loading_context: Optional[LoadingContext] = None,
5049
runtime_context: Optional[RuntimeContext] = None,
5150
) -> None:
52-
if context.default_make_tool == context.make_tool_notimpl:
53-
context.default_make_tool = default_make_tool
5451
if executor is None:
5552
executor = SingleJobExecutor()
5653
self.executor = executor

cwltool/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
from schema_salad.sourceline import strip_dup_lineno
4444
from schema_salad.utils import ContextType, FetcherCallableType, json_dumps, yaml_no_ts
4545

46-
from . import CWL_CONTENT_TYPES, context, workflow
46+
from . import CWL_CONTENT_TYPES, workflow
4747
from .argparser import arg_parser, generate_parser, get_default_args
4848
from .builder import HasReqsHints
4949
from .context import LoadingContext, RuntimeContext, getdefault
@@ -96,7 +96,7 @@
9696
versionstring,
9797
visit_class,
9898
)
99-
from .workflow import Workflow, default_make_tool
99+
from .workflow import Workflow
100100

101101

102102
def _terminate_processes() -> None:
@@ -902,7 +902,6 @@ def main(
902902
runtimeContext: Optional[RuntimeContext] = None,
903903
input_required: bool = True,
904904
) -> int:
905-
context.default_make_tool = default_make_tool
906905
if not stdout: # force UTF-8 even if the console is configured differently
907906
if hasattr(sys.stdout, "encoding") and sys.stdout.encoding.upper() not in (
908907
"UTF-8",

cwltool/workflow.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from schema_salad.exceptions import ValidationException
2020
from schema_salad.sourceline import SourceLine, indent
2121

22-
from . import command_line_tool, procgenerator
22+
from . import command_line_tool, context, procgenerator
2323
from .checker import static_checker
2424
from .context import LoadingContext, RuntimeContext, getdefault
2525
from .errors import WorkflowException
@@ -61,6 +61,9 @@ def default_make_tool(
6161
)
6262

6363

64+
context.default_make_tool = default_make_tool
65+
66+
6467
class Workflow(Process):
6568
def __init__(
6669
self,

0 commit comments

Comments
 (0)