workflowpy.methods.script.ScriptMethod#

class workflowpy.methods.script.ScriptMethod(script: Path, output: Dict[str, Path], input: Dict[str, Path] = None, params: Dict[str, Any] | None = None)[source]#

Method to run python script with workflowpy.

Parameters:
  • script (Path) – Path to the script file.

  • output (Dict[str, Path]) – Output files.

  • input (Dict[str, Path]) – Input files.

  • params (Dict) – Parameters.

Attributes

dict

Return a dictionary representation of the method input, output and params.

input

Return the input parameters of the method.

json_kwargs

Return input, params and output as json string.

name

output

Return the output parameters of the method.

params

Return the additional parameters of the method.

Methods

check_input_output_paths([missing_file_error])

Check if input exists and output parent directory exists.

check_output_exists()

Check if output files exist.

dryrun(input_files[, missing_file_error, ...])

Run method with dummy outputs.

from_kwargs([method_name])

Create a new method instance.

run([check_output])

Run the method with input/output checks.

test_method()

Run all tests on the method.

to_dict(**kwargs)

Return a serialized dictionary of the method input, output and params.

to_kwargs([mode, exclude_defaults, ...])

Convert the method to a dictionary of keyword arguments.