Module Contents

class weaver.processes.esgf_process.Percent[source]
PREPARING = 2[source]
SENDING = 3[source]
COMPUTE_DONE = 98[source]
FINISHED = 100[source]
class weaver.processes.esgf_process.InputNames[source]
FILES = 'files'[source]
VARIABLE = 'variable'[source]
API_KEY = 'api_key'[source]
TIME = 'time'[source]
LAT = 'lat'[source]
LON = 'lon'[source]
class weaver.processes.esgf_process.InputArguments[source]
START = 'start'[source]
END = 'end'[source]
CRS = 'crs'[source]
class weaver.processes.esgf_process.ESGFProcess(provider: str, process: str, request: weaver.wps.service.WorkerRequest, update_status: weaver.typedefs.UpdateStatusPartialFunction)[source]

Common interface for WPS Process to be used for dispatching CWL jobs.

Multiple convenience methods are provided. Processes inheriting from this base should implement required abstract methods and override operations as needed.


For expected operations details and their execution order, please refer to Workflow Step Operations.

See also

execute() for complete details of the operations and ordering.

required_inputs = ()[source]
execute(workflow_inputs: weaver.typedefs.JSON, out_dir: str, expected_outputs: Dict[str, str]) None[source]

Execute an ESGF process from cwl inputs.

_prepare_inputs(workflow_inputs: weaver.typedefs.JSON) List[cwt.Variable][source]

Convert inputs from cwl inputs to ESGF format.

static _get_domain(workflow_inputs: weaver.typedefs.JSON) cwt.Domain | None[source]
static _get_files_urls(workflow_inputs: weaver.typedefs.JSON) List[Tuple[str, str]][source]

Get all netcdf files from the cwl inputs.

static _get_variable(workflow_inputs: weaver.typedefs.JSON) str[source]

Get all netcdf files from the cwl inputs.

_run_process(api_key: str, inputs: List[cwt.Variable], domain: cwt.Domain | None = None) cwt.Process[source]

Run an ESGF process.

_wait(esgf_process: cwt.Process, sleep_time: float = 2) bool[source]

Wait for an ESGF process to finish, while reporting its status.

_process_results(esgf_process: cwt.Process, output_dir: str, expected_outputs: Dict[str, str]) None[source]

Process the result of the execution.

_write_outputs(url, output_dir, expected_outputs)[source]

Write the output netcdf url to a local drive.