planemo.engine package

Submodules

planemo.engine.cwltool module

Module contianing the CwlToolEngine implementation of Engine.

class planemo.engine.cwltool.CwlToolEngine(ctx, **kwds)[source]

Bases: BaseEngine

An Engine implementation backed by cwltool.

More information on cwltool can be found at https://github.com/common-workflow-language/cwltool.

handled_runnable_types: List[RunnableType] = [RunnableType.cwl_tool, RunnableType.cwl_workflow]

planemo.engine.factory module

Module contains factory method for building class:Engine objects.

planemo.engine.factory.build_engine(ctx, **kwds)[source]

Build an engine from the supplied planemo configuration.

planemo.engine.factory.engine_context(ctx, **kwds) Generator[BaseEngine, None, None][source]

A contextlib.contextmanager() engine builder for use with with statements.

https://docs.python.org/2/library/contextlib.html

planemo.engine.factory.is_galaxy_engine(**kwds)[source]

Return True iff the engine configured is GalaxyEngine.

planemo.engine.galaxy module

Module contianing the GalaxyEngine implementation of Engine.

class planemo.engine.galaxy.DockerizedManagedGalaxyEngine(ctx, **kwds)[source]

Bases: LocalManagedGalaxyEngine

An Engine implementation backed by Galaxy running in Docker.

More information on Galaxy can be found at http://galaxyproject.org/.

class planemo.engine.galaxy.ExternalGalaxyEngine(ctx, **kwds)[source]

Bases: GalaxyEngine

An Engine implementation backed by an external Galaxy instance.

ensure_runnables_served(runnables)[source]

Use a context manager and describe Galaxy instance with runnables being served.

rerun(ctx: PlanemoCliContext, rerunnable: Rerunnable, **kwds) GalaxyBaseRunResponse[source]
class planemo.engine.galaxy.LocalManagedGalaxyEngine(ctx, **kwds)[source]

Bases: GalaxyEngine

An Engine implementation backed by a managed Galaxy.

More information on Galaxy can be found at http://galaxyproject.org/.

ensure_runnables_served(runnables)[source]

Use a context manager and describe Galaxy instance with runnables being served.

shed_install(config)[source]

planemo.engine.interface module

Module contianing the Engine abstraction.

class planemo.engine.interface.BaseEngine(ctx, **kwds)[source]

Bases: Engine

Base class providing context and keywords for Engine implementations.

can_run(runnable)[source]

Use subclass’s handled_runnable_types variable to infer can_run.

cleanup()[source]

Default no-op cleanup method.

handled_runnable_types: List[RunnableType] = []
run(runnables, job_paths, output_collectors: List[Callable] | None = None)[source]

Run a job using a compatible artifact (workflow or tool).

test(runnables, test_timeout)[source]

Test runnable artifacts (workflow or tool).

class planemo.engine.interface.Engine[source]

Bases: object

Abstract description of an external process for running tools or workflows.

abstract cleanup()[source]

Release any resources used to run/test with this engine.

abstract run(path, job_path)[source]

Run a job using a compatible artifact (workflow or tool).

abstract test(runnables)[source]

Test runnable artifacts (workflow or tool).

planemo.engine.test module

planemo.engine.test.test_runnables(ctx, runnables, original_paths=None, **kwds)[source]

Return exit code indicating test or failure.

planemo.engine.toil module

Module contianing the ToilEngine implementation of Engine.

class planemo.engine.toil.ToilEngine(ctx, **kwds)[source]

Bases: BaseEngine

An Engine implementation backed by Toil.

More information on toil can be found at https://github.com/BD2KGenomics/toil.

handled_runnable_types: List[RunnableType] = [RunnableType.cwl_tool, RunnableType.cwl_workflow]

Module contents

Module describing planemo.interface.Engine abstraction and implementations.

The main entrypoint is the contextmanager engine_context().

planemo.engine.engine_context(ctx, **kwds) Generator[BaseEngine, None, None][source]

A contextlib.contextmanager() engine builder for use with with statements.

https://docs.python.org/2/library/contextlib.html

planemo.engine.is_galaxy_engine(**kwds)[source]

Return True iff the engine configured is GalaxyEngine.