Skip to content

Commit 6a1a167

Browse files
author
Anton Khodak
committed
Rename cltool to command_line_tool
* to avoid confusion with cwltool itself
1 parent 5b2c1fe commit 6a1a167

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed
File renamed without changes.

cwltool/draft2tool.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Do wildcard import of cltool
2-
from .cltool import *
1+
# Do wildcard import of command_line_tool
2+
from .command_line_tool import *
33

44
_logger = logging.getLogger("cwltool")
5-
_logger.warning("'draft2tool.py' has been renamed to 'tool.py'"
6-
"and will be removed in the future.")
7-
5+
_logger.warning("'draft2tool.py' has been renamed to 'command_line_tool.py'"
6+
"and will be removed in the future.")

cwltool/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from schema_salad.ref_resolver import Fetcher, Loader, file_uri, uri_file_path
2424
from schema_salad.sourceline import strip_dup_lineno
2525

26-
from . import cltool, workflow
26+
from . import command_line_tool, workflow
2727
from .builder import Builder
2828
from .cwlrdf import printdot, printrdf
2929
from .errors import UnsupportedRequirement, WorkflowException
@@ -822,7 +822,7 @@ def main(argsl=None, # type: List[str]
822822
arg_parser().print_help()
823823
return 1
824824
if args.relax_path_checks:
825-
cltool.ACCEPTLIST_RE = cltool.ACCEPTLIST_EN_RELAXED_RE
825+
command_line_tool.ACCEPTLIST_RE = command_line_tool.ACCEPTLIST_EN_RELAXED_RE
826826

827827
if args.ga4gh_tool_registries:
828828
ga4gh_tool_registries[:] = args.ga4gh_tool_registries

cwltool/workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from ruamel.yaml.comments import CommentedMap, CommentedSeq
1313
from schema_salad.sourceline import SourceLine, cmap
1414

15-
from . import cltool, expression
15+
from . import command_line_tool, expression
1616
from .errors import WorkflowException
1717
from .load_tool import load_tool
1818
from .process import Process, shortname, uniquename, get_overrides
@@ -33,9 +33,9 @@ def defaultMakeTool(toolpath_object, # type: Dict[Text, Any]
3333
raise WorkflowException(u"Not a dict: `%s`" % toolpath_object)
3434
if "class" in toolpath_object:
3535
if toolpath_object["class"] == "CommandLineTool":
36-
return cltool.CommandLineTool(toolpath_object, **kwargs)
36+
return command_line_tool.CommandLineTool(toolpath_object, **kwargs)
3737
elif toolpath_object["class"] == "ExpressionTool":
38-
return cltool.ExpressionTool(toolpath_object, **kwargs)
38+
return command_line_tool.ExpressionTool(toolpath_object, **kwargs)
3939
elif toolpath_object["class"] == "Workflow":
4040
return Workflow(toolpath_object, **kwargs)
4141

tests/test_docker_warning.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
import unittest
33
from mock import mock
44
from cwltool.utils import windows_default_container_id
5-
from cwltool.cltool import DEFAULT_CONTAINER_MSG, CommandLineTool
5+
from cwltool.command_line_tool import DEFAULT_CONTAINER_MSG, CommandLineTool
66

77

88
class TestDefaultDockerWarning(unittest.TestCase):
99

1010
# Test to check warning when default docker Container is used on Windows
11-
@mock.patch("cwltool.cltool.onWindows",return_value = True)
12-
@mock.patch("cwltool.cltool._logger")
11+
@mock.patch("cwltool.command_line_tool.onWindows",return_value = True)
12+
@mock.patch("cwltool.command_line_tool._logger")
1313
def test_default_docker_warning(self,mock_logger,mock_windows):
1414

1515
class TestCommandLineTool(CommandLineTool):

0 commit comments

Comments
 (0)