Skip to main content

WuXi Nextcode commandline utilities

Project description

NextCODE Command Line Interface

Requirements

  • Python 3.7

Installation

End-user installation

Prerequisites Note that having python3 (and a pip3 that points to that python) is a prerequisite, the easist way to fullfil this is to install both via Homebrew.

To install the package you have to run the following command:

$ pip3 install nextcode-cli -U

To verify that the installation was successful you can run the following command:

$ nextcode version
nextcode-cli/x.y.z (yyyy.mm.dd)

Developer installation

Start by pulling the sourcecode from git (usually from develop to be on the bleeding edge).

There are two ways to set up the CLI. We recommend trying to install it into your system python in develop mode by simply running the following command in the nextcode-cli folder (depending on your system setup you might need sudo)

$ pip3 install -e .

If you get any errors you can set up a local virtualenv in the nextcode-cli path:

$ source ./setup.sh
$ pip3 install -e .

Using this method means that you will always need to do source ./setup.sh to enter the virtualenv before using the tool, so we would recommend getting the first method to work unless you intend on make edits to the code yourself.

Set up a service profile

Create a service profile

For any work to happen a service profile must be defined. One example is the one here below, which is Platform Dev test specific. For QA purposes this is of course test environment dependent!:

The command is:

$ nextcode profile add <profile-name>

Follow the prompts to enter a server name and then log in through the browser window that opens up.

You can also set up the profile without a prompt like this:

$ nextcode profile add <profile-name> --domain=mydomain.wuxinextcode.com --api-key=<key>

Running the CLI for the first time

Once your installation has succeeded you can run the following command anywhere in your system:

nextcode status

Once you finish the authentication process you should be able to view workflow jobs:

nextcode workflow jobs

To start familiarizing yourself with the sdk you can use the --help option on all commands to see detailed information about their use.

$ nextcode --help
Usage: nextcode [OPTIONS] COMMAND [ARGS]...

  A utility for interfacing with WuXi Nextcode services.

  This tool allows you to communicate with the pipelines service, CSA,
  workflow service and GOR Query API. For all usage you will need to
  authenticate against the specific service profile you are using.

  Please look at the subcommands below for details.

Options:
  -v, --verbose [warning|error|info]
                                  Output logs for debugging
  -p, --profile TEXT              Use a specific profile for this command
  --help                          Show this message and exit.

Commands:
  csa_authenticate  Authenticate against CSA (for import).
  import            Import a TSV manifest into CSA.
  keycloak          Manage keycloak users Requires the keycloak admin...
  login             Authenticate against keycloak.
  pipelines         Root subcommand for pipelines functionality
  profile           Configure server profile to use.
  query             Root subcommand for query api functionality
  token             Print out an access token for the current profile
  version           Show the Nextcode CLI version.
  workflow          Root subcommand for workflow functionality

$ nextcode workflow --help
Usage: nextcode workflow [OPTIONS] COMMAND [ARGS]...

  Root subcommand for workflow functionality

Options:
  --help  Show this message and exit.

Commands:
  job        View or manage individual jobs.
  jobs       List jobs
  pipelines  List pipelines
  projects   List projects
  run        Start a new nextflow job.
  smoketest  Run a smoketest of the workflow service
  status     Show the status of the workflow service

Releasing

  • Bump version and update the a date in nextcodecli/VERSION
  • Merge to master
  • Tag in Gitlab
  • Watch the CI fireworks.

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

nextcode_cli-3.0.2.tar.gz (52.4 kB view details)

Uploaded Source

Built Distribution

nextcode_cli-3.0.2-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

Details for the file nextcode_cli-3.0.2.tar.gz.

File metadata

  • Download URL: nextcode_cli-3.0.2.tar.gz
  • Upload date:
  • Size: 52.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.4.238-148.347.amzn2.x86_64

File hashes

Hashes for nextcode_cli-3.0.2.tar.gz
Algorithm Hash digest
SHA256 4be181d2dbb5a055a5a787e7305dc60d1eba69cabe066e06ab9575f56a0ab990
MD5 216079a6dfb0453cdd5bf0841ec52175
BLAKE2b-256 9930d854937a25e7473b51276e35724d5065837a46092010c7b32714170811b1

See more details on using hashes here.

File details

Details for the file nextcode_cli-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: nextcode_cli-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 70.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Linux/5.4.238-148.347.amzn2.x86_64

File hashes

Hashes for nextcode_cli-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f9b12408308a04adac0437200c411b82c99c906128ceff06d766612c88af890
MD5 750230a8830e1ccbca6f547e78f66545
BLAKE2b-256 ed6dc09d2f071528376971dd5e399d047377f62ded012e7c19963137743cfc29

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