9
9
import logging
10
10
import os
11
11
import sys
12
- import tempfile
13
- import threading
14
12
from typing import (IO , Any , AnyStr , Callable , Dict , List , Sequence , Text , Tuple ,
15
13
Union , cast , Mapping , MutableMapping , Iterable )
16
14
17
15
import pkg_resources # part of setuptools
18
- import requests
19
16
import six
20
- import string
17
+ import warnings
21
18
22
19
import ruamel .yaml as yaml
23
20
import schema_salad .validate as validate
24
- from schema_salad .ref_resolver import Fetcher , Loader , file_uri , uri_file_path
21
+ from schema_salad .ref_resolver import Loader , file_uri , uri_file_path
25
22
from schema_salad .sourceline import strip_dup_lineno
26
23
27
24
from . import draft2tool , workflow
28
- from .builder import Builder
29
25
from .cwlrdf import printdot , printrdf
30
26
from .errors import UnsupportedRequirement , WorkflowException
31
27
from .executors import SingleJobExecutor , MultithreadedJobExecutor
34
30
resolve_overrides , load_overrides )
35
31
from .mutation import MutationManager
36
32
from .pack import pack
37
- from .pathmapper import (adjustDirObjs , adjustFileObjs , get_listing ,
38
- trim_listing , visit_class )
39
- from .process import (Process , cleanIntermediate , normalizeFilesDirs ,
40
- relocateOutputs , scandeps , shortname , use_custom_schema ,
33
+ from .pathmapper import (adjustDirObjs , trim_listing , visit_class )
34
+ from .process import (Process , normalizeFilesDirs ,
35
+ scandeps , shortname , use_custom_schema ,
41
36
use_standard_schema )
42
37
from .resolver import ga4gh_tool_registries , tool_resolver
43
38
from .software_requirements import (DependenciesConfiguration ,
46
41
from .stdfsaccess import StdFsAccess
47
42
from .update import ALLUPDATES , UPDATES
48
43
from .utils import onWindows , windows_default_container_id
49
- from ruamel .yaml .comments import Comment , CommentedSeq , CommentedMap
50
44
51
45
52
46
_logger = logging .getLogger ("cwltool" )
@@ -66,7 +60,9 @@ def arg_parser(): # type: () -> argparse.ArgumentParser
66
60
help = "Do not execute jobs in a Docker container, even when specified by the CommandLineTool" ,
67
61
dest = "use_container" )
68
62
parser .add_argument ("--parallel" , action = "store_true" , default = False ,
69
- help = "Run jobs in parallel" )
63
+ help = "[experimental] Run jobs in parallel. "
64
+ "Does not currently keep track of ResourceRequirements like the number of cores"
65
+ "or memory and can overload this system" )
70
66
parser .add_argument ("--preserve-environment" , type = Text , action = "append" ,
71
67
help = "Preserve specific environment variable when running CommandLineTools. May be provided multiple times." ,
72
68
metavar = "ENVVAR" ,
@@ -255,6 +251,16 @@ def arg_parser(): # type: () -> argparse.ArgumentParser
255
251
return parser
256
252
257
253
254
+ def single_job_executor (t , # type: Process
255
+ job_order_object , # type: Dict[Text, Any]
256
+ ** kwargs # type: Any
257
+ ):
258
+ # type: (...) -> Tuple[Dict[Text, Any], Text]
259
+ warnings .warn ("Use of single_job_executor function is deprecated. "
260
+ "Use cwltool.executors.SingleJobExecutor class instead" , DeprecationWarning )
261
+ executor = SingleJobExecutor ()
262
+ return executor (t , job_order_object , ** kwargs )
263
+
258
264
259
265
class FSAction (argparse .Action ):
260
266
objclass = None # type: Text
0 commit comments