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.9.0.tar.gz
(7.6 kB
view details)
Built Distribution
cs_kit-1.9.0-py3-none-any.whl
(10.1 kB
view details)
File details
Details for the file cs-kit-1.9.0.tar.gz
.
File metadata
- Download URL: cs-kit-1.9.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 613349b45f6d751c3977e093778420b68ea9a39591907957e9691c0dcb48d565 |
|
MD5 | 32de59437994096d6fd388e413348269 |
|
BLAKE2b-256 | e0135f0ca27294c1de747d66782efa40eefac4c189fcd293b026211bbc194b03 |
File details
Details for the file cs_kit-1.9.0-py3-none-any.whl
.
File metadata
- Download URL: cs_kit-1.9.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6393763f63eed1a845f855d7e1addeebad7c3ac7e831ca1a79320cd7c5f17e8 |
|
MD5 | 4bd793c90ba9b51281ddd7710fee9cbf |
|
BLAKE2b-256 | d34c16e3430534e17becfedae10c91dfc95dabda314ce8bde8e57613c267497e |