Skip to main content

A tool which auto-documents researcher workflows.

Project description

About

This repository contains the Command Line Client (CLI) for Clark which was produced by Elio.earth. We aim to simpify researcher's documentation and execution processes with Clark. The CLI is a tool which researchers use to document their workflows. This enables the researcher to definitively understand the end-to-end process of their research and creates a system of record with versioning for their research (similar to Github).

Pre-requisites

  • Linux or MacOS
  • Python 3.x
  • MacOS only: sudo access to your machine (We use DTrace to trace system calls)

Install

The CLI is available from PyPI.

pip install clark-cli

Use

Below is a basic usage example from start to finish.

Register

Sign-up for an account at https://www.clarknest.com/register.

Remember to check your email to confirm your account. You will need to confirm your account before using the CLI.

Once you are registered, and you have confirmed your account you will be ready to issue commands with the CLI.

Create a Workflow

First login to the CLI using the credentials you registered with.

clark login

To view all the possible commands run:

clark --help

The next step is to create directories and workflows. Just like a filesystem, you can organize your workflows into directories. You initially start with an empty virtual filesystem.

Create a directory in the root folder (post login you always start in the root of your virtual filesystem)

clark add directory projectA

Change into the directory you just created.

clark cd projectA

Now you are ready to execute a script.

clark upload --message "A message to attach to this version of your workflow" python my_script.py

The CLI will run your script and auto-detect the inputs and outputs of the script. You will be asked to confirm the inputs and outputs before they are stored in the workflow. We upload the inputs, outputs and script to our servers.

If you made a mistake you can re-run the workflow and "replace" the previous run of the script.

clark upload --message "A different message for this run" --replace python my_script.py

Don't worry, you will have access to both versions of your workflow in the UI (described below). We create a version for each upload.

You can then go to another directory or workflow. You can back out of the workflow by:

clark cd ..

View a Workflow

You can then go to the Clark Nest to view your workflows, add notes to the nodes or workflows.

Examples

There some execution examples in the examples folder.

Contributing

If you have a bug-fix or small improvement we welcome pull requests. If unsure, please reach out to us at tech@elio.earth.

Setup Local Dev Environment

These instructions are intended for developers to set up their location development environment.

Install pyenv

Install Python 3.10.0

pyenv install 3.10.0

Download repo

cd ~/workspace/
git clone git@github.com:Elio-Earth/clark-cli.git

Create virtual env

pyenv virtualenv 3.10.0 clark-cli

Update pip

python -m pip install --upgrade pip

Install requirements

pip install -r requirements.txt

Install cli in development mode.

pip install --editable ~/workspace/clark-cli

Upgrade build

python -m pip install --upgrade build

Testing

To run the test suite

cd ~/workspace/clark-cli
pytest .

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

clark-cli-0.4.5.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

clark_cli-0.4.5-py2.py3-none-any.whl (35.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file clark-cli-0.4.5.tar.gz.

File metadata

  • Download URL: clark-cli-0.4.5.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for clark-cli-0.4.5.tar.gz
Algorithm Hash digest
SHA256 505b29453f172d96ba4325b71647a0581322a5a87a6453c2353f1da79812574a
MD5 671f3cc07e22f72b07104bdaee648fa7
BLAKE2b-256 e9a90d3ede0b59c1e6676eec8d5b16c9e4fece78ca388839bdd081ed1f230910

See more details on using hashes here.

File details

Details for the file clark_cli-0.4.5-py2.py3-none-any.whl.

File metadata

  • Download URL: clark_cli-0.4.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 35.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for clark_cli-0.4.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c100319f889d3f0fd4fec50e9f09b3f5f8bc859c9220ba5f4204e20a90bf5bab
MD5 d86e78e7d65d3a0c09a1b1d2090acdbd
BLAKE2b-256 4fefa0f131428a876cf04f4873005d6c8eaae5902789233aaf39396656d70fa9

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