rook package

A WPS service for roocs.

Subpackages

Submodules

rook.__version__ module

rook version information.

rook.cli module

Demo WPS service for testing and debugging.

rook.cli.get_host() tuple[str, int][source]

Gather host information.

Returns:

The host and port.

Return type:

tuple[str, int]

rook.cli.run_process_action(action: str | None = None)[source]

Run an action with psutil on current process and return a status message.

Parameters:

action (str, optional) – The action to perform, by default “status”.

rook.cli.write_user_config(**kwargs) Path[source]

Write a custom configuration file.

Parameters:

**kwargs (dict) – Configuration parameters.

Returns:

The path to the written configuration file.

Return type:

Path

rook.config module

Central access to Rook configuration.

exception rook.config.ConfigurationError[source]

Bases: ValueError

Raised when Rook configuration contains an invalid value.

rook.config.get_config() dict[str, Any][source]

Return the current Rook configuration.

rook.config.get_project_config(project: str) dict[str, Any][source]

Return configuration for a project, or an empty mapping.

rook.config.get_s3_storage_options() dict[str, Any][source]

Build shared fsspec S3 transport options from Rook configuration.

rook.config.get_storage_base(project: str) str | None[source]

Return the preferred processing root for a project.

rook.config.reload_config() dict[str, Any][source]

Reload Rook configuration from the standard clisops sources.

rook.exceptions module

exception rook.exceptions.WorkflowValidationError[source]

Bases: Exception

rook.operator module

class rook.operator.AverageByDimension(output_dir)[source]

Bases: Operator

prefix = 'average'
class rook.operator.AverageByShape(output_dir)[source]

Bases: Operator

prefix = 'average_shape'
class rook.operator.AverageByTime(output_dir)[source]

Bases: Operator

prefix = 'average_time'
class rook.operator.Concat(output_dir)[source]

Bases: Operator

prefix = 'concat'
class rook.operator.Operator(output_dir)[source]

Bases: object

call(args)[source]
prefix = NotImplemented
class rook.operator.Regrid(output_dir)[source]

Bases: Operator

prefix = 'regrid'
class rook.operator.Subset(output_dir)[source]

Bases: Operator

prefix = 'subset'
class rook.operator.WeightedAverage(output_dir)[source]

Bases: Operator

prefix = 'weighted_average'

rook.provenance module

class rook.provenance.Provenance(output_dir)[source]

Bases: object

add_operator(operator, parameters, collection, output)[source]
dump_json()[source]
get_provn()[source]
property identifier
json()[source]
start(workflow=False)[source]
stop()[source]
write_json()[source]
write_png()[source]

rook.rook module

Main module.

rook.workflow module

class rook.workflow.BaseWorkflow(output_dir)[source]

Bases: object

run(wfdoc)[source]
validate(wfdoc)[source]
class rook.workflow.Workflow(output_dir)[source]

Bases: BaseWorkflow

validate(wfdoc)[source]
class rook.workflow.WorkflowRunner(output_dir)[source]

Bases: object

property provenance
run(path)[source]
rook.workflow.build_tree(wfdoc)[source]
rook.workflow.is_file(data)[source]
rook.workflow.load_wfdoc(data)[source]
rook.workflow.replace_inputs(wfdoc)[source]

rook.wsgi module

rook.wsgi.create_app(cfgfiles: list[str] | None = None) Service[source]

Create PyWPS application.

Parameters:

cfgfiles (list of str, optional) – Configuration files to use.

Returns:

PyWPS application.

Return type:

pywps.app.Service.Service