Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/styx/backend/python/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def template_root_pyproject(project: ir.Project, dependencies: list[str]) -> str
requires-python = ">=3.10"
dependencies = [
"styxdocker",
"styxpodman",
"styxsingularity",
"styxgraph",{dependencies}
]
Expand Down Expand Up @@ -80,6 +81,7 @@ def template_root_init_py(project: ir.Project, package_names: list[str]) -> str:
return f'''{reexports}
from styxdefs import * # Reexport styxdefs
from styxdocker import DockerRunner
from styxpodman import PodmanRunner
from styxsingularity import SingularityRunner
from styxgraph import GraphRunner

Expand All @@ -99,6 +101,11 @@ def use_docker(*args, **kwargs):
set_global_runner(DockerRunner(*args, **kwargs))


def use_podman(*args, **kwargs):
"""Set the PodmanRunner as the global runner."""
set_global_runner(PodmanRunner(*args, **kwargs))


def use_singularity(*args, **kwargs):
"""Set the SingularityRunner as the global runner."""
set_global_runner(SingularityRunner(*args, **kwargs))
Expand Down
Loading