Skip to main content

Human Cell Atlas Data Storage System Command Line Interface

Project description

This repository contains a prototype for interacting with the replicated Data Storage System (hereafter the DSS) of the Human Cell Atlas.

This prototype uses a local version of the DSS API spec (using Swagger) to generate a command line client that will make requests to the DSS. Please run hca --help to see an overview of available commands.

Development

To develop on the CLI, first run pip install -r requirements-dev.txt.

Testing

Before you run tests, do an hca login. This will pop up a browser and get you to authenticate with Google. Use an email from one of the whitelisted domains (in DSS_SUBSCRIPTION_AUTHORIZED_DOMAINS_ARRAY from here).

Then make test.

Code Generation

These python bindings have to be regenerated to reflect any api changes. To regenerate these, run make bindings. Only package maintainers should run this command and publish new package versions.

Installation

To install this package, run pip install hca-cli. This will automatically hook up with the api endpoint as defined in the package published last.

To use the command line interface with a local or test DSS, open <directory_holding_hca_module>/hca/api_spec.json. Change host to the host you want (if you’re running on a local DSS, this will likely be localhost:5000) and the first argument of schemes should be the scheme you want (http if running locally, https otherwise).

Usage

The command-line utility hca is the entry point to the CLI provided by this package.

Each of the above commands has its own associated optional or required arguments. To see these, type hca <command> -h. These arguments are listed in a style common to most argparse parsers. For instance:

hca put-bundles [-h] [--version VERSION] --replica REPLICA --files INDEXED/NAME/UUID/VERSION [INDEXED/NAME/UUID/VERSION ...] --creator-uid CREATOR_UID uuid

Here is a list of what each type means.

  • Positional arguments: These don’t have a flag in front of them. If they are surrounded by brackets, they are optional.

  • Optional arguments: Note that the term optional in this sense doesn’t mean that the argument is not required. It means that the argument is identified by a flag. If the argument and the flag (A word with “–” in front of it). are surrounded in brackets, this input is optional. If an arument is repeated multiple times with the later arguments surrounded in brackets, it means the parser accepts a list of these arguments.

  • Objects: Because the REST API sometimes consumes lists of objects, it is important to be able to pass these into the command line interface. To pass in an object, it is a number of arguments separated by slashes, as seen in the example above. An example input to this could be True/Bob/3806d74a-6ab5-4a6d-ba00-667ea858c7b5/2017-06-30T19:33:38+00:00. If an argument within an object is optional and you don’t have an input for it, you can replace it’s supposed place with None.

Bugs

Please report bugs, issues, feature requests, etc. on GitHub.

License

Licensed under the terms of the MIT License.

https://img.shields.io/travis/HumanCellAtlas/data-store-cli.svg https://codecov.io/github/HumanCellAtlas/data-store-cli/coverage.svg?branch=master https://img.shields.io/pypi/v/hca.svg https://img.shields.io/pypi/l/hca.svg https://readthedocs.org/projects/hca/badge/?version=latest

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

hca-1.1.0.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

hca-1.1.0-py2.py3-none-any.whl (89.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file hca-1.1.0.tar.gz.

File metadata

  • Download URL: hca-1.1.0.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hca-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4420f3b5c83be7f359b164f1b18ac5f17635f5a8d605418f72ea90e5b175b74d
MD5 709a559fa321499f408a7e77d8743273
BLAKE2b-256 74f8b59307614b1ff90eefacb28b4ad3e30198cffb9d6e7de1a9ec8e33917a4e

See more details on using hashes here.

File details

Details for the file hca-1.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for hca-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 477f615f9e04a3c5e6b4402cacaf1ab9ea4d8fdb85d534d0732054859a0ca5e8
MD5 1f0ca9b6acdc199bddb3ebe3de1d8ced
BLAKE2b-256 0aa04de6593acbcead9abf84ff788a186de8e04777488b52308d74e4dd614d7c

See more details on using hashes here.

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