Local Development

When debugging a Snakemake workflow, it’s helpful to run the JIT step locally instead of re-registering your workflow every time you want to test a change. To address this, the Latch SDK supports local development for Snakemake workflows.

If you are unfamiliar with the latch develop command, please read about Developing and Debugging before continuing.

Run the following command to use latch develop with your Snakemake workflow:

$ latch develop . --snakemake

To run the JIT task, create a test file that calls the task function defined in snakemake_jit_entrypoint.py with test inputs.

For example:

$ cat scripts/dry_run.py
from snakemake_jit_entrypoint import your_workflow_name_jit_register_task


You can execute the script in your latch develop session like so:

$ python3 scripts/dry_run.py

Note: If you are running into an ImportError, be sure to use the version of Python in which the Latch SDK was installed.