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.6.tar.gz
(13.1 kB
view details)
Built Distribution
cs_kit-1.16.6-py3-none-any.whl
(16.0 kB
view details)
File details
Details for the file cs-kit-1.16.6.tar.gz
.
File metadata
- Download URL: cs-kit-1.16.6.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d25aba7f1c5c120e0122b082540877ca47b3e37be77f3a6f0dae9638586e4d2 |
|
MD5 | 7ba3880207e748d7ff261b5c695ae949 |
|
BLAKE2b-256 | 41175d235b9333561f39bfc98b18bb88542e456ab42826b783eeefcd2c87bbfb |
File details
Details for the file cs_kit-1.16.6-py3-none-any.whl
.
File metadata
- Download URL: cs_kit-1.16.6-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 365f625b33e3c57300b6a8ef0093e9d82c2ab7df0ce837f39a60f36c451d61bb |
|
MD5 | 00b2c0a2f344b92f710021f028fa08d4 |
|
BLAKE2b-256 | 1df391608600742f809e018b89fd5d4535c4e33072b8d1cb6c33b4a52d5938d7 |