blue_cwl.core.executor

CWL Executors.

Classes

Executor(*[, env_vars])

Executor abstract class.

LocalExecutor(*[, env_vars])

Executor that is run locally via a single process.

RemoteExecutor(*[, env_vars])

Executor that is run on a host.

SallocExecutor(*[, env_vars])

Executor for salloc commands.

class blue_cwl.core.executor.Executor(*, env_vars: dict[str, int | float | str] | None = None)

Executor abstract class.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

build_command(base_command: list[str], *, env_vars: dict[str, int | float | str] | None = None, env_config: dict | None = None) str

Build the executor’s command.

Parameters:
  • base_command – The base tool command with arguments.

  • env_vars – Optional external env vars to use.

  • env_config – Tool executable location config.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True, 'strict': True, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

abstract run(command: str, *, redirect_to: str | None = None, masked_vars: list[str] | None = None, **kwargs) None

Use executor to run command.

class blue_cwl.core.executor.LocalExecutor(*, env_vars: dict[str, int | float | str] | None = None)

Executor that is run locally via a single process.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True, 'strict': True, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

run(command: str, *, redirect_to: str | None = None, masked_vars: list[str] | None = None, **kwargs)

Simple local executor.

class blue_cwl.core.executor.RemoteExecutor(*, env_vars: dict[str, int | float | str] | None = None, remote_config: RemoteConfig)

Executor that is run on a host.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True, 'strict': True, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

run(command: str, *, redirect_to: str | None = None, masked_vars: list[str] | None = None, **kwargs)

Simple local executor.

class blue_cwl.core.executor.SallocExecutor(*, env_vars: dict[str, int | float | str] | None = None, remote_config: RemoteConfig, slurm_config: SlurmConfig)

Executor for salloc commands.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

build_command(base_command: list[str], *, env_vars: dict[str, int | float | str] | None = None, env_config: dict | None = None) str

Build the executor’s command.

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'frozen': True, 'strict': True, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].