runner
Demo runner: spawn Snakemake on a bundled workflow and launch the TUI.
Classes¶
Functions:¶
build_snakemake_argv ¶
build_snakemake_argv(cores: int, sleep_min: int, sleep_max: int, use_logger_plugin: bool) -> list[str]
Build the Snakemake command line for the demo workflow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cores
|
int
|
Number of cores for |
required |
sleep_min
|
int
|
Minimum per-job sleep in seconds, passed via |
required |
sleep_max
|
int
|
Maximum per-job sleep in seconds, passed via |
required |
use_logger_plugin
|
bool
|
Whether to add |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
The argv list, with the bare |
Source code in snakesee/demo/runner.py
copy_workflow ¶
Copy the bundled demo Snakefile and inputs/ into a target directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target
|
Path
|
Directory to populate; created (with parents) if it does not exist. |
required |
Source code in snakesee/demo/runner.py
logger_plugin_available ¶
run_demo ¶
run_demo(cores: int = 4, duration: Duration = 'short', keep_runs: int = 5, no_tui: bool = False, clean: bool = False) -> int
Run the bundled demo workflow with snakesee.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cores
|
int
|
Number of cores for |
4
|
duration
|
Duration
|
Sleep-range preset. Scales the workflow's per-job duration. |
'short'
|
keep_runs
|
int
|
Maximum demo dirs to keep in the cache; older are pruned at startup. |
5
|
no_tui
|
bool
|
If True, run snakemake to completion and skip launching the TUI. Used by tests and CI; not advertised to end users. |
False
|
clean
|
bool
|
If True, delete every demo dir in the cache and exit without running anything. |
False
|
Returns:
| Type | Description |
|---|---|
int
|
0 on clean exit, non-zero if snakemake errored. |
Source code in snakesee/demo/runner.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |