Tutorials

Git Integration for Code

Dotscience Git integration allows you to synchronize GitHub repositories with Dotscience filesystems during the run.

We recommend using git for versioning code, and Dotscience for versioning runs and provenance tracking. This tutorial walks through how to set up GitHub integration with Dotscience. Before executing the script via “ds run”, we clone the git repository into the local filesystem.

Create an SSH keypair for a project by clicking “Generate a key”:

Now, you should be able to copy it:

In order for Dotscience to successfully authenticate to GitHub (or any other Git server as it’s a standard mechanism) you will need to import this SSH public key in GitHub:

  • as personal account (Your Profile -> SSH and GPG keys), or
  • as deploy key (Your repository -> Settings -> Deploy keys):

You can check out code from inside Jupyter using the terminal in Jupyter:

And this also enables you to specify a code repo and references when doing ds run and code will automatically be checked out. A complete example can be found on our public GitHub repository here: https://github.com/dotmesh-io/ds-run-demo/#ds-run-demo

In short, once the SSH keypair is added to your GitHub repository, you can do a ds run with a --repo flag: