Skip to main content

Developer tools for compute.studio.

Project description

Compute Studio Kit

cs-kit tests your model's functions against the Compute Studio criteria. If your functions pass the cs-kit tests, then you can be reasonably sure that the functions will work on compute.studio.

Compute Studio Kit also provides a helper command for retrieving your Compute Studio API token.

Install cs-kit

pip install cs-kit

Set up the cs-config directory

$ csk-init
$ tree cs-config/
cs-config/
├── cs_config
│   ├── functions.py
│   ├── __init__.py
│   └── tests
│       ├── __init__.py
│       └── test_functions.py
├── install.sh
└── setup.py

Write your functions in cs-config/cs_config/functions.py

# Write or import your Compute Studio functions here.


def get_version():
    pass


def get_inputs(meta_param_dict):
    pass


def validate_inputs(meta_param_dict, adjustment, errors_warnings):
    pass


def run_model(meta_param_dict, adjustment):
    pass

Test your functions in cs-config/cs_config/tests/test_functions.py

from cs_kit import CoreTestFunctions

from cs_config import functions


class TestFunctions1(CoreTestFunctions):
    get_version = functions.get_version
    get_inputs = functions.get_inputs
    validate_inputs = functions.validate_inputs
    run_model = functions.run_model
    ok_adjustment={"matchup": {"pitcher": [{"value": "Max Scherzer"}]}}
    bad_adjustment={"matchup": {"pitcher": [{"value": "Not a pitcher"}]}}

Run your cs-config tests

py.test cs-config

Write your installation instructions in cs-config/install.sh

conda install your-project

Get your Compute Studio API token

$ csk-token --username myuser --password mypass
Token: your-token-here

Run the compute-studio-kit tests

py.test cs_kit -v

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

cs-kit-1.12.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

cs_kit-1.12.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file cs-kit-1.12.0.tar.gz.

File metadata

  • Download URL: cs-kit-1.12.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for cs-kit-1.12.0.tar.gz
Algorithm Hash digest
SHA256 7a5b89f1a71ae86f7773b22ff2f895c2141c4101d98f17aff710351e74373fc3
MD5 ba743d26028dfd48370df91ac7e1a459
BLAKE2b-256 15d92ba269a1ab01c69fe68743e84cca960b58ab743653201b76e55be2bc4daa

See more details on using hashes here.

File details

Details for the file cs_kit-1.12.0-py3-none-any.whl.

File metadata

  • Download URL: cs_kit-1.12.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0.post20200518 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for cs_kit-1.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d82e450ba6ea300b7024f4e5f65580061658f96ac0ab93a217e0ac4a85272bfb
MD5 b36748f66bc9ed93d81c202fedd5a5ad
BLAKE2b-256 b39b87cdd6b30abde7352169e5665091bcc12cc52d4b747e10a097d2d71fb8c4

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