Skip to content

Commit 75ab506

Browse files
committed
Rename draft2tool.py -> tool.py
This is intended to deprate `draft-2 and draft-3` and thus, the rename. Also, remove `draft-2` checking condition when validating `cwlVersion`
1 parent 1275466 commit 75ab506

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

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 draft2tool, workflow
26+
from . import tool, workflow
2727
from .builder import Builder
2828
from .cwlrdf import printdot, printrdf
2929
from .errors import UnsupportedRequirement, WorkflowException
@@ -776,7 +776,7 @@ def main(argsl=None, # type: List[str]
776776
arg_parser().print_help()
777777
return 1
778778
if args.relax_path_checks:
779-
draft2tool.ACCEPTLIST_RE = draft2tool.ACCEPTLIST_EN_RELAXED_RE
779+
tool.ACCEPTLIST_RE = tool.ACCEPTLIST_EN_RELAXED_RE
780780

781781
if args.ga4gh_tool_registries:
782782
ga4gh_tool_registries[:] = args.ga4gh_tool_registries
File renamed without changes.

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 draft2tool, expression
15+
from . import tool, expression
1616
from .errors import WorkflowException
1717
from .load_tool import load_tool
1818
from .process import Process, shortname, uniquename
@@ -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 draft2tool.CommandLineTool(toolpath_object, **kwargs)
36+
return tool.CommandLineTool(toolpath_object, **kwargs)
3737
elif toolpath_object["class"] == "ExpressionTool":
38-
return draft2tool.ExpressionTool(toolpath_object, **kwargs)
38+
return 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import unittest
33
from mock import mock
44
from cwltool.utils import windows_default_container_id
5-
from cwltool.draft2tool import DEFAULT_CONTAINER_MSG, CommandLineTool
5+
from cwltool.tool import DEFAULT_CONTAINER_MSG, CommandLineTool
66

77

88
class TestDefaultDockerWarning(unittest.TestCase):

0 commit comments

Comments
 (0)