cwltool.context
Shared context objects that replace use of kwargs.
Attributes
Classes
Shared kwargs based initializer for |
|
Shared kwargs based initializer for |
|
Shared kwargs based initializer for |
Functions
|
Fake implementation of the make tool function. |
|
Move logs from log location to final output. |
|
Set the log directory. |
|
Return the |
Module Contents
- class cwltool.context.ContextBase(kwargs=None)
Shared kwargs based initializer for
RuntimeContext
andLoadingContext
.- Parameters:
kwargs (Optional[dict[str, Any]])
- cwltool.context.make_tool_notimpl(toolpath_object, loadingContext)
Fake implementation of the make tool function.
- Parameters:
toolpath_object (ruamel.yaml.comments.CommentedMap)
loadingContext (LoadingContext)
- Return type:
- cwltool.context.default_make_tool
- cwltool.context.log_handler(outdir, base_path_logs, stdout_path, stderr_path)
Move logs from log location to final output.
- Parameters:
outdir (str)
base_path_logs (str)
stdout_path (Optional[str])
stderr_path (Optional[str])
- Return type:
None
- cwltool.context.set_log_dir(outdir, log_dir, subdir_name)
Set the log directory.
- Parameters:
outdir (str)
log_dir (str)
subdir_name (str)
- Return type:
str
- class cwltool.context.LoadingContext(kwargs=None)
Bases:
ContextBase
Shared kwargs based initializer for
RuntimeContext
andLoadingContext
.- Parameters:
kwargs (Optional[dict[str, Any]])
- debug: bool = False
- metadata: cwltool.utils.CWLObjectType
- requirements: list[cwltool.utils.CWLObjectType] | None = None
- hints: list[cwltool.utils.CWLObjectType] | None = None
- overrides_list: list[cwltool.utils.CWLObjectType] = []
- loader: schema_salad.ref_resolver.Loader | None = None
- avsc_names: schema_salad.avro.schema.Names | None = None
- disable_js_validation: bool = False
- js_hint_options_file: str | None = None
- do_validate: bool = True
- enable_dev: bool = False
- strict: bool = True
- resolver: cwltool.utils.ResolverType | None = None
- fetcher_constructor: schema_salad.utils.FetcherCallableType | None = None
- construct_tool_object
- research_obj: cwltool.cwlprov.ro.ResearchObject | None = None
- orcid: str = ''
- cwl_full_name: str = ''
- host_provenance: bool = False
- user_provenance: bool = False
- prov_obj: cwltool.cwlprov.provenance_profile.ProvenanceProfile | None = None
- do_update: bool | None = None
- jobdefaults: ruamel.yaml.comments.CommentedMap | None = None
- doc_cache: bool = True
- relax_path_checks: bool = False
- singularity: bool = False
- podman: bool = False
- eval_timeout: float = 60
- codegen_idx: dict[str, tuple[Any, cwl_utils.parser.cwl_v1_2.LoadingOptions]]
- fast_parser = False
- skip_resolve_all = False
- skip_schemas = False
- copy()
Return a copy of this
LoadingContext
.- Return type:
- class cwltool.context.RuntimeContext(kwargs=None)
Bases:
ContextBase
Shared kwargs based initializer for
RuntimeContext
andLoadingContext
.- Parameters:
kwargs (Optional[dict[str, Any]])
- outdir: str | None = None
- tmpdir: str = ''
- tmpdir_prefix: str
- tmp_outdir_prefix: str = ''
- stagedir: str = ''
- user_space_docker_cmd: str | None = None
- secret_store: cwltool.secrets.SecretStore | None = None
- no_read_only: bool = False
- custom_net: str | None = None
- no_match_user: bool = False
- preserve_environment: collections.abc.Iterable[str] | None = None
- preserve_entire_environment: bool = False
- use_container: bool = True
- force_docker_pull: bool = False
- rm_tmpdir: bool = True
- pull_image: bool = True
- rm_container: bool = True
- move_outputs: Literal['move'] | Literal['leave'] | Literal['copy'] = 'move'
- log_dir: str = ''
- set_log_dir
- log_dir_handler
- streaming_allowed: bool = False
- singularity: bool = False
- podman: bool = False
- debug: bool = False
- compute_checksum: bool = True
- name: str = ''
- default_container: str | None = ''
- cachedir: str | None = None
- part_of: str = ''
- basedir: str = ''
- toplevel: bool = False
- mutation_manager: cwltool.mutation.MutationManager | None = None
- make_fs_access
- path_mapper
- builder: cwltool.builder.Builder | None = None
- docker_outdir: str = ''
- docker_tmpdir: str = ''
- docker_stagedir: str = ''
- js_console: bool = False
- job_script_provider: cwltool.software_requirements.DependenciesConfiguration | None = None
- select_resources: RuntimeContext.__init__.select_resources_callable | None = None
- eval_timeout: float = 60
- postScatterEval: Callable[[cwltool.utils.CWLObjectType], cwltool.utils.CWLObjectType | None] | None = None
- on_error: Literal['stop'] | Literal['continue'] = 'stop'
- strict_memory_limit: bool = False
- strict_cpu_limit: bool = False
- cidfile_dir: str | None = None
- cidfile_prefix: str | None = None
- workflow_eval_lock: threading.Condition | None = None
- research_obj: cwltool.cwlprov.ro.ResearchObject | None = None
- orcid: str = ''
- cwl_full_name: str = ''
- process_run_id: str | None = None
- prov_obj: cwltool.cwlprov.provenance_profile.ProvenanceProfile | None = None
- mpi_config: cwltool.mpi.MpiConfig
- default_stdout: IO[bytes] | TextIO | None = None
- default_stderr: IO[bytes] | TextIO | None = None
- validate_only: bool = False
- validate_stdout: SupportsWrite[str] | None = None
- get_outdir()
Return
outdir
or create one withtmp_outdir_prefix
.- Return type:
str
- get_tmpdir()
Return
tmpdir
or create one withtmpdir_prefix
.- Return type:
str
- get_stagedir()
Return
stagedir
or create one withtmpdir_prefix
.- Return type:
str
- create_tmpdir()
Create a temporary directory that respects
tmpdir_prefix
.- Return type:
str
- create_outdir()
Create a temporary directory that respects
tmp_outdir_prefix
.- Return type:
str
- copy()
Return a copy of this
RuntimeContext
.- Return type:
- cwltool.context.getdefault(val, default)
Return the
val
using thedefault
as backup in case the val isNone
.- Parameters:
val (Any)
default (Any)
- Return type:
Any