submit#
Cluster submission with the inspection gate.
dry_run and deploy are importable pieces (used by the deploy_pipeline notebook); main composes them into the CLI, which refuses to submit until a dry run has been produced and shown. The dry-run output is stored next to the SGE logs for the post-hoc record:
python -m openplaces.flow.submit --config recipe=US_footprint-cheer-2026 \
admin_ids=US-NC-BS,US-NC-CE
Functions#
Module Contents#
- openplaces.flow.submit.dry_run(config=None, targets=(), snakefile=None, extra_args=(), verbose=True) tuple[int, str, pathlib.Path]#
Produce, print, and store a Snakemake dry run (the inspection gate).
- Parameters:
config (dict or list of str, optional) – Workflow config (e.g.
{'recipe': ..., 'admin_ids': [...]}or['recipe=...', 'admin_ids=a,b']).targets (tuple of str) – Optional Snakemake targets.
snakefile (str or Path, optional) – Defaults to
<code_root>/workflow/Snakefile.extra_args (tuple of str) – Additional snakemake arguments (e.g.
('--forcerun', 'rule')).verbose (bool) – Print the dry-run output.
- Returns:
The dry run’s exit code, its combined stdout+stderr, and the path it was stored at (under the logs directory, for the post-hoc record).
- Return type:
(returncode, output, stored_path)
- openplaces.flow.submit.deploy(profile=None, config=None, targets=(), cores=None, snakefile=None, extra_args=()) int#
Run the workflow: on the cluster (profile) or locally (cores).
Streams Snakemake’s output to the console and returns its exit code. Callers are expected to have produced a dry run first (dry_run); the CLI (main) enforces that.
- Parameters:
profile (str or Path, optional) – Snakemake profile directory (e.g. ‘workflow/profiles/scc’); resolved against the code root when relative. Mutually exclusive with local execution.
config – As in dry_run.
targets – As in dry_run.
snakefile – As in dry_run.
extra_args – As in dry_run.
cores (int, optional) – Local execution with this many cores (default 4) when no profile is given.