cwltool.job
Attributes
Classes
Base class for get_requirement(). |
|
Base class for get_requirement(). |
|
Commandline job using containers. |
Functions
|
|
|
Module Contents
- cwltool.job.CollectOutputsType
- cwltool.job.needs_shell_quoting_re
- cwltool.job.FORCE_SHELLED_POPEN
- cwltool.job.SHELL_COMMAND_TEMPLATE = Multiline-String
Show Value
"""#!/bin/bash python3 "run_job.py" "job.json" """
- cwltool.job.relink_initialworkdir(pathmapper, host_outdir, container_outdir, inplace_update=False)
- Parameters:
pathmapper (cwltool.pathmapper.PathMapper)
host_outdir (str)
container_outdir (str)
inplace_update (bool)
- Return type:
None
- cwltool.job.neverquote(string, pos=0, endpos=0)
- class cwltool.job.JobBase(builder, joborder, make_path_mapper, requirements, hints, name)
Bases:
cwltool.utils.HasReqsHints
Base class for get_requirement().
- Parameters:
builder (cwltool.builder.Builder)
joborder (cwltool.utils.CWLObjectType)
make_path_mapper (Callable[[list[cwltool.utils.CWLObjectType], str, cwltool.context.RuntimeContext, bool], cwltool.pathmapper.PathMapper])
requirements (list[cwltool.utils.CWLObjectType])
hints (list[cwltool.utils.CWLObjectType])
name (str)
- builder
- joborder
- successCodes: collections.abc.Iterable[int] = []
- temporaryFailCodes: collections.abc.Iterable[int] = []
- permanentFailCodes: collections.abc.Iterable[int] = []
- requirements
- hints
- name
- pathmapper
- make_path_mapper
- generatemapper: cwltool.pathmapper.PathMapper | None = None
- collect_outputs
- outdir = ''
- tmpdir = ''
- environment: collections.abc.MutableMapping[str, str]
- generatefiles: cwltool.utils.DirectoryType
- inplace_update = False
- prov_obj: cwltool.cwlprov.provenance_profile.ProvenanceProfile | None = None
- parent_wf: cwltool.cwlprov.provenance_profile.ProvenanceProfile | None = None
- abstract run(runtimeContext, tmpdir_lock=None)
- Parameters:
runtimeContext (cwltool.context.RuntimeContext)
tmpdir_lock (Optional[threading.Lock])
- Return type:
None
- prepare_environment(runtimeContext, envVarReq)
Set up environment variables.
Here we prepare the environment for the job, based on any preserved variables and EnvVarRequirement. Later, changes due to MPIRequirement, Secrets, or SoftwareRequirement are applied (in that order).
- Parameters:
runtimeContext (cwltool.context.RuntimeContext)
envVarReq (collections.abc.Mapping[str, str])
- Return type:
None
- process_monitor(sproc)
Watch a process, logging its max memory usage.
- Parameters:
sproc (subprocess.Popen[str])
- Return type:
None
- class cwltool.job.CommandLineJob(builder, joborder, make_path_mapper, requirements, hints, name)
Bases:
JobBase
Base class for get_requirement().
- Parameters:
builder (cwltool.builder.Builder)
joborder (cwltool.utils.CWLObjectType)
make_path_mapper (Callable[[list[cwltool.utils.CWLObjectType], str, cwltool.context.RuntimeContext, bool], cwltool.pathmapper.PathMapper])
requirements (list[cwltool.utils.CWLObjectType])
hints (list[cwltool.utils.CWLObjectType])
name (str)
- run(runtimeContext, tmpdir_lock=None)
- Parameters:
runtimeContext (cwltool.context.RuntimeContext)
tmpdir_lock (Optional[threading.Lock])
- Return type:
None
- cwltool.job.CONTROL_CODE_RE = '\\x1b\\[[0-9;]*[a-zA-Z]'
- class cwltool.job.ContainerCommandLineJob(builder, joborder, make_path_mapper, requirements, hints, name)
Bases:
JobBase
Commandline job using containers.
- Parameters:
builder (cwltool.builder.Builder)
joborder (cwltool.utils.CWLObjectType)
make_path_mapper (Callable[[list[cwltool.utils.CWLObjectType], str, cwltool.context.RuntimeContext, bool], cwltool.pathmapper.PathMapper])
requirements (list[cwltool.utils.CWLObjectType])
hints (list[cwltool.utils.CWLObjectType])
name (str)
- abstract get_from_requirements(r, pull_image, force_pull, tmp_outdir_prefix)
- abstract create_runtime(env, runtime_context)
Return the list of commands to run the selected container engine.
- Parameters:
env (collections.abc.MutableMapping[str, str])
runtime_context (cwltool.context.RuntimeContext)
- Return type:
- static append_volume(runtime, source, target, writable=False)
- Abstractmethod:
- Parameters:
- Return type:
None
Add binding arguments to the runtime list.
- abstract add_file_or_directory_volume(runtime, volume, host_outdir_tgt)
Append volume a file/dir mapping to the runtime option list.
- abstract add_writable_file_volume(runtime, volume, host_outdir_tgt, tmpdir_prefix)
Append a writable file mapping to the runtime option list.
- abstract add_writable_directory_volume(runtime, volume, host_outdir_tgt, tmpdir_prefix)
Append a writable directory mapping to the runtime option list.
- create_file_and_add_volume(runtime, volume, host_outdir_tgt, secret_store, tmpdir_prefix)
Create the file and add a mapping.
- add_volumes(pathmapper, runtime, tmpdir_prefix, secret_store=None, any_path_okay=False)
Append volume mappings to the runtime option list.
- Parameters:
pathmapper (cwltool.pathmapper.PathMapper)
tmpdir_prefix (str)
secret_store (Optional[cwltool.secrets.SecretStore])
any_path_okay (bool)
- Return type:
None
- run(runtimeContext, tmpdir_lock=None)
- Parameters:
runtimeContext (cwltool.context.RuntimeContext)
tmpdir_lock (Optional[threading.Lock])
- Return type:
None