Transcriptic

Working With Packages

Create a New Package

$ transcriptic create-package test_package "for testing protocols"

List Existing Packages

Initialize a Directory With An Empty Manifest Template

The init command creates an empty manifest.json file with the proper structure within the current directory (by default) or a directory passed as an argument. Read below or here to find out more about what a manifest does. This command will prompt to overwrite if your folder already contains a file called manifest.json.

Compress All Files in Working Directory into a Release

$ transcriptic build-release

Passing a --name argument allows you to name your release, otherwise it will be named release_<version from manifest> automatically

Compress All Files in Working Directory into a Release and Upload to a Package

$ transcriptic build-release test_package

Passing a package name as an argument automatically uploads the release created to that package.

Upload a Release to an Existing Package

$ transcriptic upload-release release_v1.0.0.zip test_package

More About Packages

The autoprotocol-python library helps you generate Autoprotocol with easy to use functions. autoprotocol.harness parses a set of typed input parameters contained in a manifest.json file and passes them back to the specified script when you run transcriptic preview (see above). Input types also define protocol browser UI elements on transcriptic's website.

Worked Example

The example below assumes the following file structure:

test_package/
    manifest.json
    requirements.txt
    test.py

A manifest.json file contains metadata about protocols required when uploading a package to Transcriptic. A package can contain many protocols but for our example it will contain just one. The "inputs" stanza defines expected parameter types which translate into the proper UI elements for that type when you upload the package to Transcriptic. Read more about the manifest file here. The preview section serves to provide your script with hard-coded parameters and refs for local testing:

The following is what your test.py file would look like. Note that there is no need to declare a Protocol object within the script or print the protocol to standard out, both of these things are taken care of by autoprotocol.harness. The protocol_name parameter in autoprotocol.harness.run() must match the name of that protocol within your manifest.json file:

A requirements.txt file is necessary for any modules your code relies on to run. In the example below, the file specifies a specific commit SHA of the autoprotocol-python library.

A release consists of everything within the protocols_folder folder (but do not zip the folder itself: the manifest.json file must be at the top level of the archive.). You can prepare a release automatically from within a directory by using the transcript release command as outlined above.