Skip to main content

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

Project description

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. First, generate a Synapse Personal Access Token (PAT) with all token permissions enabled.

Next, run the following command, then follow the prompts to enter your Synapse username and PAT:

synapse config

This will create a .synapseConfig file in your home directory. 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 ~/.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 uv, but you can use venv, pyenv, etc.

# Create a new env and activate it
uv venv --python 3.12 .venv
source .venv/bin/activate

# Install cnb-tools
uv pip install 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-tools

Running With Docker

If you rather not install cnb-tools onto your machine, you may still use it via Docker! The package and list of versions are available here.

To provide your Synapse credentials to the Docker container, you must first create a file with your Synapse PAT as the SYNAPSE_AUTH_TOKEN environment variable:

SYNAPSE_AUTH_TOKEN=<YOUR PAT>

The docker run command will look something like this, assuming the file is named ~/.synapse-config:

docker run --rm \
  --env-file ~/.synapse-config \
  ghcr.io/sage-bionetworks-challenges/cnb-tools \
  COMMAND [ARGS]

License

cnb-tools is released under the Apache 2.0 license.

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

cnb_tools-0.4.2.tar.gz (204.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cnb_tools-0.4.2-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file cnb_tools-0.4.2.tar.gz.

File metadata

  • Download URL: cnb_tools-0.4.2.tar.gz
  • Upload date:
  • Size: 204.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cnb_tools-0.4.2.tar.gz
Algorithm Hash digest
SHA256 9fcbd26d6d3854d0f5a83c028c2751db0bf48ece3c5b515a1d6a1d9c140e5d50
MD5 7a17291e10bb4ff4216b2002b9c1c2f4
BLAKE2b-256 a8be39a84710c8d5d64a38aa016cd0b6084f1b2a7c1fdb8ad0a0da64f969b6ab

See more details on using hashes here.

File details

Details for the file cnb_tools-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: cnb_tools-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 31.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cnb_tools-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0fe5e371747a2504d7d932f5a4e9e0579526521b2d8fc8c8f5bc6a36ca33e9f6
MD5 90490abcfb48c6858962985133d383c5
BLAKE2b-256 8301f55e43172efda82684815e4df39d2c1b8e447a898d6defb4d7cef6346576

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page