pipen.pipen
Main entry module, provide the Pipen class
pipen.pipen.Pipen(name=None, desc=None, outdir=None, **kwargs)
The Pipen class provides interface to assemble and run the pipeline
PIPELINE_COUNT— How many pipelines are loadedSETUP— Whether the one-time setup hook is called_kwargs— The extra configrations passed to overwrite the default onesconfig— The configurationsdesc— The description of the pipelinename— The name of the pipelineoutdir— The output directory of the resultspbar— The progress barprocs— The processesprofile— The profile of the configurations to run the pipelinestarts— The start processesworkdir— The workdir for the pipeline
name(str | none, optional) — The name of the pipelinedesc(str | none, optional) — The description of the pipelineoutdir(str | pathlib.path, optional) — The output directory of the results**kwargs— Other configurations
__init_subclass__()— This method is called when a class is subclassed.</>async_run(profile)(bool) — Run the processes one by one</>build_proc_relationships()— Build the proc relationships for the pipeline</>run(profile)(bool) — Run the pipeline with the given profileThis is just a sync wrapper for the asyncasync_runfunction usingasyncio.run()</>set_data(*indata)(Pipen) — Set the input_data for start processes</>set_starts(*procs,clear)— Set the starts</>
__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
async_run(profile='default')
Run the processes one by one
profile(str, optional) — The default profile to use for the run
True if the pipeline ends successfully else False
run(profile='default')
Run the pipeline with the given profileThis is just a sync wrapper for the async async_run function using
asyncio.run()
profile(str, optional) — The default profile to use for the run
True if the pipeline ends successfully else False
set_data(*indata)
Set the input_data for start processes
*indata(Any) — The input data for the start processesThe data will set for the processes in the order determined byset_starts(). If a process has input_data set, an error will be raised. To use that input_data, set None here in the corresponding position for the process
ProcInputDataError— When trying to set input data toprocesses with input_data already set
self to chain the operations
set_starts(*procs, clear=True)
Set the starts
*procs(Union) — The processes to set as starts of the pipeline.clear(bool, optional) — Wether to clear previous set starts
ProcDependencyError— When processes set as starts repeatedly
self to chain the operations
build_proc_relationships()
Build the proc relationships for the pipeline
pipen.pipen.async_run(name, starts, data=None, desc=None, outdir=None, profile='default', **kwargs)
Shortcut to run a pipeline
name(str) — The name of the pipelinestarts(Union) — The start processesdata(Iterable, optional) — The input data for the start processesdesc(str, optional) — The description of the pipelineoutdir(str | pathlib.path | none, optional) — The output directory of the resultsprofile(str, optional) — The profile to use**kwargs— Other options pass to Pipen to create the pipeline
True if the pipeline ends successfully else False
pipen.pipen.run(name, starts, data=None, desc=None, outdir=None, profile='default', **kwargs)
Shortcut to run a pipeline
name(str) — The name of the pipelinestarts(Union) — The start processesdata(Iterable, optional) — The input data for the start processesdesc(str, optional) — The description of the pipelineoutdir(str | pathlib.path | none, optional) — The output directory of the resultsprofile(str, optional) — The profile to use**kwargs— Other options pass to Pipen to create the pipeline
True if the pipeline ends successfully else False