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.16.1.tar.gz
(12.9 kB
view details)
Built Distribution
cs_kit-1.16.1-py3-none-any.whl
(15.8 kB
view details)
File details
Details for the file cs-kit-1.16.1.tar.gz
.
File metadata
- Download URL: cs-kit-1.16.1.tar.gz
- Upload date:
- Size: 12.9 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 | e6e3aeea9fe89a4973131af158f165f911bab1f99f6116c9d1545f436b91b2d1 |
|
MD5 | bc03b4f3ea9a90bb9550dea8e644c5cf |
|
BLAKE2b-256 | 185d28008cde1e68ae3c91bb27220bb40e274ab8751ea72c2dfb102ef9d1c375 |
File details
Details for the file cs_kit-1.16.1-py3-none-any.whl
.
File metadata
- Download URL: cs_kit-1.16.1-py3-none-any.whl
- Upload date:
- Size: 15.8 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 | 63b71de2d58b2930bc71207252a7903c7f4b3c56df1d70fb9d7085bb05629ffa |
|
MD5 | 27fc45f1bdd80c6cd04ef56d23a2ef64 |
|
BLAKE2b-256 | f2332e6178fccc8c7c5af4a6d3daa805ce03dbaf0e0e4f7123407ba1905df720 |