cwltool.main
Entry point for cwltool.
Attributes
Classes
Enforce ISO8601 with both T and Z. |
Functions
Append the specified word to the requests http user agent string if it's not already there. |
|
|
Convert a single input schema into an example. |
|
Replace references to named typed with the actual types. |
|
Generate an example input object for the given CWL process. |
|
|
|
|
|
Relativize the location URI of a File or Directory object. |
|
Print a JSON representation of the dependencies of the CWL document. |
|
|
|
Find the dependencies of the CWL document. |
|
Return a CWL serialization of the CWL document in JSON. |
|
Return a list of currently supported CWL versions. |
|
|
|
|
|
Prepare a LoadingContext from the given arguments. |
|
Make a template CWL input object for the give Process. |
|
Copy down requirements and hints from ancestors of a given process. |
|
Walk the Workflow, extract the subset matches all the args.targets. |
|
Walk the given Workflow and extract just args.single_step. |
|
Walk the given Workflow and extract just args.single_process. |
|
Make any needed working directories. |
|
Recursively find targets for --subgraph and friends. |
|
|
|
Find a container. |
See if we are running on MS Windows and warn about the lack of support. |
|
|
Run cwltool. |
Module Contents
- cwltool.main.append_word_to_default_user_agent(word)
Append the specified word to the requests http user agent string if it’s not already there.
- Parameters:
word (str)
- Return type:
None
- cwltool.main.generate_example_input(inptype, default)
Convert a single input schema into an example.
- cwltool.main.realize_input_schema(input_types, schema_defs)
Replace references to named typed with the actual types.
- Parameters:
input_types (collections.abc.MutableSequence[Union[str, cwltool.utils.CWLObjectType]])
schema_defs (collections.abc.MutableMapping[str, cwltool.utils.CWLObjectType])
- Return type:
collections.abc.MutableSequence[Union[str, cwltool.utils.CWLObjectType]]
- cwltool.main.generate_input_template(tool)
Generate an example input object for the given CWL process.
- Parameters:
tool (cwltool.process.Process)
- Return type:
cwltool.utils.CWLObjectType
- cwltool.main.load_job_order(args, stdin, fetcher_constructor, overrides_list, tool_file_uri)
- Parameters:
args (argparse.Namespace)
stdin (IO[Any])
fetcher_constructor (Optional[schema_salad.utils.FetcherCallableType])
overrides_list (list[cwltool.utils.CWLObjectType])
tool_file_uri (str)
- Return type:
tuple[Optional[cwltool.utils.CWLObjectType], str, schema_salad.ref_resolver.Loader]
- cwltool.main.init_job_order(job_order_object, args, process, loader, stdout, print_input_deps=False, relative_deps='primary', make_fs_access=StdFsAccess, input_basedir='', secret_store=None, input_required=True, runtime_context=None)
- Parameters:
job_order_object (Optional[cwltool.utils.CWLObjectType])
args (argparse.Namespace)
process (cwltool.process.Process)
loader (schema_salad.ref_resolver.Loader)
stdout (IO[str])
print_input_deps (bool)
relative_deps (str)
make_fs_access (Callable[[str], cwltool.stdfsaccess.StdFsAccess])
input_basedir (str)
secret_store (Optional[cwltool.secrets.SecretStore])
input_required (bool)
runtime_context (Optional[cwltool.context.RuntimeContext])
- Return type:
cwltool.utils.CWLObjectType
- cwltool.main.make_relative(base, obj)
Relativize the location URI of a File or Directory object.
- Parameters:
base (str)
obj (cwltool.utils.CWLObjectType)
- Return type:
None
- cwltool.main.printdeps(obj, document_loader, stdout, relative_deps, uri, basedir=None, nestdirs=True)
Print a JSON representation of the dependencies of the CWL document.
- cwltool.main.prov_deps(obj, document_loader, uri, basedir=None)
- Parameters:
obj (cwltool.utils.CWLObjectType)
document_loader (schema_salad.ref_resolver.Loader)
uri (str)
basedir (Optional[str])
- Return type:
cwltool.utils.CWLObjectType
- cwltool.main.find_deps(obj, document_loader, uri, basedir=None, nestdirs=True)
Find the dependencies of the CWL document.
- Parameters:
obj (cwltool.utils.CWLObjectType)
document_loader (schema_salad.ref_resolver.Loader)
uri (str)
basedir (Optional[str])
nestdirs (bool)
- Return type:
cwltool.utils.CWLObjectType
- cwltool.main.print_pack(loadingContext, uri)
Return a CWL serialization of the CWL document in JSON.
- Parameters:
loadingContext (cwltool.context.LoadingContext)
uri (str)
- Return type:
- cwltool.main.supported_cwl_versions(enable_dev)
Return a list of currently supported CWL versions.
- cwltool.main.setup_schema(args, custom_schema_callback)
- Parameters:
args (argparse.Namespace)
custom_schema_callback (Optional[Callable[[], None]])
- Return type:
None
- class cwltool.main.ProvLogFormatter
Bases:
logging.Formatter
Enforce ISO8601 with both T and Z.
- formatTime(record, datefmt=None)
Override the default formatTime to include the timezone.
- Parameters:
record (logging.LogRecord)
datefmt (Optional[str])
- Return type:
- cwltool.main.ProvOut
- cwltool.main.setup_provenance(args, runtimeContext, argsl=None)
- Parameters:
args (argparse.Namespace)
runtimeContext (cwltool.context.RuntimeContext)
- Return type:
tuple[ProvOut, logging.StreamHandler[ProvOut]]
- cwltool.main.setup_loadingContext(loadingContext, runtimeContext, args)
Prepare a LoadingContext from the given arguments.
- Parameters:
loadingContext (Optional[cwltool.context.LoadingContext])
runtimeContext (cwltool.context.RuntimeContext)
args (argparse.Namespace)
- Return type:
- cwltool.main.make_template(tool, target)
Make a template CWL input object for the give Process.
- Parameters:
tool (cwltool.process.Process)
target (IO[str])
- Return type:
None
- cwltool.main.inherit_reqshints(tool, parent)
Copy down requirements and hints from ancestors of a given process.
- Parameters:
tool (cwltool.process.Process)
parent (cwltool.process.Process)
- Return type:
None
- cwltool.main.choose_target(args, tool, loading_context)
Walk the Workflow, extract the subset matches all the args.targets.
- Parameters:
args (argparse.Namespace)
tool (cwltool.process.Process)
loading_context (cwltool.context.LoadingContext)
- Return type:
Optional[cwltool.process.Process]
- cwltool.main.choose_step(args, tool, loading_context)
Walk the given Workflow and extract just args.single_step.
- Parameters:
args (argparse.Namespace)
tool (cwltool.process.Process)
loading_context (cwltool.context.LoadingContext)
- Return type:
Optional[cwltool.process.Process]
- cwltool.main.choose_process(args, tool, loadingContext)
Walk the given Workflow and extract just args.single_process.
- Parameters:
args (argparse.Namespace)
tool (cwltool.process.Process)
loadingContext (cwltool.context.LoadingContext)
- Return type:
Optional[cwltool.process.Process]
- cwltool.main.check_working_directories(runtimeContext)
Make any needed working directories.
- Parameters:
runtimeContext (cwltool.context.RuntimeContext)
- Return type:
Optional[int]
- cwltool.main.print_targets(tool, stdout, loading_context, prefix='')
Recursively find targets for –subgraph and friends.
- Parameters:
tool (cwltool.process.Process)
stdout (IO[str])
loading_context (cwltool.context.LoadingContext)
prefix (str)
- Return type:
None
- cwltool.main.main(argsl=None, args=None, job_order_object=None, stdin=sys.stdin, stdout=None, stderr=sys.stderr, versionfunc=versionstring, logger_handler=None, custom_schema_callback=None, executor=None, loadingContext=None, runtimeContext=None, input_required=True)
- Parameters:
args (Optional[argparse.Namespace])
job_order_object (Optional[cwltool.utils.CWLObjectType])
stdin (IO[Any])
stdout (Optional[IO[str]])
stderr (IO[Any])
logger_handler (Optional[logging.Handler])
custom_schema_callback (Optional[Callable[[], None]])
executor (Optional[cwltool.executors.JobExecutor])
loadingContext (Optional[cwltool.context.LoadingContext])
runtimeContext (Optional[cwltool.context.RuntimeContext])
input_required (bool)
- Return type:
- cwltool.main.find_default_container(builder, default_container=None, use_biocontainers=None, container_image_cache_path=None)
Find a container.
- cwltool.main.windows_check()
See if we are running on MS Windows and warn about the lack of support.
- Return type:
None