Skip to content

cnb-tools

cnb-tools

Convenience tools/functions for challenges and benchmarking on Synapse.org

PyPI version Supported Python versions License


Documentation: https://sage-bionetworks-challenges.github.io/cnb-tools

Source code: https://github.com/Sage-Bionetworks-Challenges/cnb-tools


cnb-tools is a set of tools and commands that provides an interface for managing crowd-sourced challenges hosted on Synapse.org, including but not limited to, DREAM Challenges.

Requirements

To fully utilize cnb-tools, you must have a Synapse account and provide your credentials to the tool. To do so, create a .synapseConfig file in your home directory, and enter the following:

[authentication]
authtoken = "YOUR PAT"

Generate a new Synapse Personal Access Token (PAT) with all token permissions enabled, then copy-paste it into authtoken. Save the file.

For security, we recommend updating its permissions so that other users on your machine do not have read access to your credentials, e.g.

chmod 600 ~/.synapseConfigls -l ~/.synapseConfig-rw-------@ 1 user staff 123 Jan 1 12:00 .synapseConfig

Installation

For best practice, use a Python environment to install cnb-tools rather than directly into your base env. In our docs, we will be using miniconda, but you can use miniforge, venv, pyenv, etc.

# Create a new env and activate itconda create -n cnb-tools python=3.12 -yconda activate cnb-tools# Install cnb-tools using pippip install cnb-toolsSuccessfully installed cnb-tools

Note

cnb-tools builds off of the Synapse Python Client — by installing cnb-tools, you will also be installing synapseclient.

Read its docs.

Verify the installation with:

cnb-toolsManage challenges on Synapse.org from the CLI

Enter `cnb-tools --help` for usage information.

License

cnb-tools is released under the Apache 2.0 license.