Workflows on Latch are versioned to track changes to the codebase and ensure reproducibility. The Latch SDK automatically generates a unique version string. The workflow version has two components <version>-<directory_hash>

  1. version is a user-defined string (ex. “0.0.1”) read from your project root directory’s version file. It can be overridden to provide a user-friendly name for the workflow version.
  2. directory_hash is a hash of the project directory. It ensures a unique version string is generated if the directory contents change.

Git Versioning

Workflows on Latch can be versioned using Git. If the SDK detects that the project directory is a Git repository, it will append the first six digits of the latest commit hash to the workflow version.

<version>-<commit_hash>-<directory_hash>

If the git repository has uncommitted changes, the SDK will append -wip to the commit-hash.

<version>-<commit_hash>-wip-<directory_hash>

Remote Repositories

Developers may provide a link to the remote repository where their source code is hosted in the LatchMetadata object:

from latch import LatchMetadata

metadata = LatchMetadata(
    ...
    repository="https://github.com/latchbio/latch",
)

If a remote repository is specified, a link to the commit associated with each workflow version will be available under the Development tab on the workflow page.