Skip to main content

Command line interface for interacting with the Terra Scientific Pipelines Service, or Teaspoons.

Project description

Terralab CLI

Quality Gate Status

Overview

The Terralab CLI provides a command-line interface with which to interact with the Terra Scientific Pipelines Service, or Teaspoons.

Currently, Terralab supports running Genotype Imputation (for public release in early 2025).

Note that in order to use Terralab and Teaspoons, you must have a Terra account.

User instructions coming soon.

Installation

You can install the Terralab CLI from PyPi using your favorite package management tool.

For example, run

pip install terralab-cli

Using the CLI

Once installed, to run the CLI, run the following command:

terralab COMMAND [ARGS]

For example, to list the pipelines you can run using Terralab, run the following command:

terralab pipelines list

(Internal) WIP documentation for the CLI.

Python CLI structure

The CLI code is structured as follows:

terra-scientific-pipelines-service-cli
├── terralab
│   └── commands
│   │   └── __init__.py
│   │   └── auth_commands.py
│   │   └── pipelines_commands.py
│   └── logic
│   │   └── __init__.py
│   │   └── auth_logic.py
│   │   └── pipelines_logic.py
│   └── __init__.py
│   └── auth_helper.py
│   └── cli.py
│   └── client.py
│   └── config.py
│   └── teaspoons
├── tests
│   └── commands
│   │   └── test_auth_commands.py
│   │   └── test_pipelines_commands.py
│   └── logic
│   │   └── test_auth_logic.py
│   │   └── test_pipelines_logic.py
│   └── __init__.py
│   └── auth_helper.py
│   └── cli.py
│   └── client.py
│   └── config.py
│   └── terralab
├── .gitignore
├── .terralab-cli-config
├── poetry.lock
├── pyproject.toml
├── README.md

In the terralab directory, we have the following files and subdirectories:

  • auth_helper.py contains the code for authenticating with the Terra Scientific Pipelines Service (Terra, via b2c).
  • cli.py is the entrypoint for the CLI. It configures logging and assembles the CLI sub-modules that are defined in commands/.
  • client.py contains the code for wrapping API calls to the Terra Scientific Pipelines Service.
  • config.py contains the code for managing the CLI configuration via environment variables.
  • utils.py contains utility functions that are used across the CLI.
  • The commands directory contains the CLI sub-modules. This is effectively the controller layer for the CLI.
  • The logic directory contains the business logic for the CLI, including calling Terra Scientific Pipelines Service APIs via the thin teaspoons_client, which is autogenerated and published by the Terra Scientific Pipelines Service repository.

In the tests directory, we have test files that can be run with pytest.

Development

See CONTRIBUTING.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terralab_cli-0.0.9.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

terralab_cli-0.0.9-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file terralab_cli-0.0.9.tar.gz.

File metadata

  • Download URL: terralab_cli-0.0.9.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for terralab_cli-0.0.9.tar.gz
Algorithm Hash digest
SHA256 d264c3a37c55961d5a1e428779aa580df05c209296f930baca92abc875c88529
MD5 7577d4909b56708a63cba0a8d27a3639
BLAKE2b-256 efb4eb2739a19f616cbabf3004b610172a65c165bf2ba4e7e96ac57fbae6d460

See more details on using hashes here.

Provenance

The following attestation bundles were made for terralab_cli-0.0.9.tar.gz:

Publisher: bump-build-publish-cli.yml on DataBiosphere/terra-scientific-pipelines-service-cli

Attestations:

File details

Details for the file terralab_cli-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: terralab_cli-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for terralab_cli-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 11b2f95b74433ea156fae86f8867b85c669124ecfe1a0527a4ba7944922fa0e5
MD5 209a42257071442ac32ba5ff0812686d
BLAKE2b-256 61bdb11e47519cd4de60ca73201f4467976a291af25af2e151da3a7b0e11d14a

See more details on using hashes here.

Provenance

The following attestation bundles were made for terralab_cli-0.0.9-py3-none-any.whl:

Publisher: bump-build-publish-cli.yml on DataBiosphere/terra-scientific-pipelines-service-cli

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page