How-to Guide#

This guide is a collection of step-by-step instructions for tasks that are commonly (and in some cases not so commonly) encountered when using Covalent.

Note

Most of the how-to instructions below are Jupyter notebook files (formerly IPython files; they have an ipynb file extension). You can open a file and run the example on your local machine. To run an example:

  1. Install Jupyter.

  2. Install Covalent.

  3. Start the Covalent server.

  4. Download the IPython (.ipynb) file by replacing html with ipynb in the How-to document URL. For example, change “https://covalent.readthedocs.io/en/stable/how_to/orchestration/construct_electron.html” to “https://covalent.readthedocs.io/en/stable/how_to/orchestration/construct_electron.ipynb”.

  5. Open the IPython (.ipynb) file in a Jupyter notebook.

The guide covers specific tasks at every phase of the workflow development process:

  1. Constructing workflows

  2. Executing workflows, including using and writing executors

  3. Querying Status and Collecting and Viewing Results

At the end are how-tos on miscellaneous topics including configuration.

Constructing Workflows#

Constructing a Task (Electron)

Constructing a Workflow (Lattice)

Adding an Electron to a Lattice

Testing an Electron

Using an Iterable

Looping

Visualizing a Lattice

Adding Constraints to Tasks and Workflows

Waiting For Execution of Another Electron

Transferring Local Files During Workflows

Transferring Files To and From a Remote Host

Transferring Files To and From an S3 Bucket

Transferring Files To and From Azure Blob Storage

Transferring Files To and From Google Cloud Storage

Constructing a Lepton

Using C Code (Leptons)

Adding Pip Dependencies to an Electron

Adding Bash Dependencies to an Electron

Adding Callable Function Dependencies to an Electron

Constructing a Task from Bash Scripts

How to add a directory trigger to a lattice

How to add a time trigger to a lattice

Executing a Workflow#

Managing the Covalent Server

Running a Workflow (Lattice)

Re-executing a Workflow

Executing an Individual Electron

Executing a Lattice Multiple Times

Executing Multiple Lattices

Executing a Lattice as an Electron (Sublattice)

Choosing an Executor For a Task

Canceling a Workflow

Adding a Time Trigger to a Lattice

Adding a Directory Trigger to a Lattice

Canceling a Running Workflow

Querying and Viewing#

Querying the Status of a Lattice in a Notebook

Querying the Status of an Electron

Querying Lattice Execution Time

Querying Multiple Workflows (Lattices)

Getting Results of Previous Workflow Dispatches

Getting the Result of a Task (Electron)

Configuration#

Customizing the Configuration


Is anything missing? Contribute a guide on GitHub.