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
Release history Release notifications | RSS feed
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.14.0.tar.gz
(10.8 kB
view details)
Built Distribution
cs_kit-1.14.0-py3-none-any.whl
(13.3 kB
view details)
File details
Details for the file cs-kit-1.14.0.tar.gz
.
File metadata
- Download URL: cs-kit-1.14.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c15b5c058fe871b71c7b298c6626906e6ac4f09b7005f9a92d5993d52c74e9b4 |
|
MD5 | b32c96b9e86d8f579221e3d09953faf6 |
|
BLAKE2b-256 | 08bbbe7cdb16f9e95edba138c93d64e55da77a27cb126333d5c81f0e35de1752 |
File details
Details for the file cs_kit-1.14.0-py3-none-any.whl
.
File metadata
- Download URL: cs_kit-1.14.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e47f79816640e97011655b59a4a4419ac850d67872220059b06505d5f31b7a7 |
|
MD5 | f179b7cd8a8aa0606e729aaeb6721e46 |
|
BLAKE2b-256 | 055f5d1b508847bd29ea9545e15e3bce1d8a86d374d8c00d3382795e9aefc13d |