A command line tool to manage data and projects in the SciLifeLab Data Delivery System.


Keywords
click, command-line, python
License
MIT
Install
pip install dds-cli==2.5.0

Documentation

Data Delivery System CLI

Release install with PyPI License: MIT Code style: black

Linting CodeQL codecov Tests

A command line tool dds to manage data and projects in the SciLifeLab Data Delivery System.

The Data Delivery System (DDS) is a cloud-based system for all SciLifeLab platforms where data generated throughout each project can be delivered to the research groups in a fast, secure and simple way. The CLI makes requests to the API (see badge below for link) in order to use the API functionality.

Documentation Technical Overview Architecture Decision Record Troubleshooting Backend


Table of contents

Installation

Python Package Index

The dds-cli package can be installed from PyPI using pip as follows:

pip install dds-cli

After installing, run dds and verify that the output looks like this:

$ dds
     ︵
 ︵ (  )   ︵
(  ) ) (  (  )   SciLifeLab Data Delivery System
 ︶  (  ) ) (    https://delivery.scilifelab.se/
      ︶ (  )    Version 1.1.0
          ︶

 Usage: dds [OPTIONS] COMMAND [ARGS]...

 SciLifeLab Data Delivery System (DDS) command line interface.
 Access token is saved in a .dds_cli_token file in the home directory.
 The token is valid for 7 days. Make sure your token is valid long enough for the delivery to
 finish. To avoid that a delivery fails because of an expired token, we recommend reauthenticating
 yourself before each delivery ('dds data put' / 'get').

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --verbose     -v               Print verbose output to the console.                              │
│ --log-file    -l   <filename>  Save a log to a file.                                             │
│ --no-prompt                    Run without any interactive features.                             │
│ --token-path  -tp  TEXT        The path where the authentication token will be stored. For a     │
│                                normal use-case, this should not be needed.                       │
│ --version                      Display the version of this software.                             │
│ --help                         List the options of any DDS subcommand and its default settings.  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ auth        Group command for creating and managing authenticated sessions.                      │
│ data        Group command for uploading, downloading and managing project data.                  │
│ ls          List the projects you have access to or the project contents.                        │
│ motd        Group command for managing Message of the Day within DDS.                            │
│ project     Group command for creating and managing projects within the DDS.                     │
│ unit        Group command for managing units.                                                    │
│ user        Group command for managing user accounts, including your own.                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

Executables

Executables are available for Windows, MacOS and Linux. These allow you to run the CLI without needing to install it (and the pip / Python requirements) yourself. Download them from the (bottom of the) latest release page: Latest Release

Development version

If you would like the latest development version of tools, the command is:

pip install --upgrade --force-reinstall git+https://github.com/ScilifelabDataCentre/dds_cli.git@dev

If you intend to make edits to the code, first make a fork of the repository and then clone it locally. Go to the cloned directory and install with pip (also installs development requirements):

pip install --upgrade -r requirements-dev.txt -e .

Overview of commands

Once installed you can use the command dds in a terminal session. This has the following subcommands:

  • auth: Create and manage authenticated sessions.
  • user: Create and manage user accounts, including your own.
  • project: Create and manage projects.
  • data: Upload, download and manage project data.
  • ls: List projects and project contents.
  • motd: List and manage important messages displayed to the users ("Message of the Day")
  • unit: Manage units using the DDS