Developer tools for compmodels.org.
Project description
Comp-Developer-Toolkit
compdevkit tests your model's functions against the COMP criteria. If your functions pass the compdevkit tests, then you can be reasonably sure that the functions will work on COMPmodels.org.
COMP Developer toolkit also provides a helper command for retrieving your COMP API token.
Install compdevkit
pip install compdevkit
Set up the comp directory
$ cdk-init
Test your functions
from compdevkit import FunctionsTest
import matchups
def test_get_parameters():
ta = FunctionsTest(
get_inputs=matchups.get_inputs,
validate_inputs=matchups.validate_inputs,
run_model=matchups.get_matchup,
ok_adjustment={"matchup": {"pitcher": [{"value": "Max Scherzer"}]}},
bad_adjustment={"matchup": {"pitcher": [{"value": "Not a pitcher"}]}}
)
ta.test()
Get your COMP API token
$ cdk-token --username myuser --password mypass
Token: your-token-here
Run the tests
py.test compconfig -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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file compdevkit-1.6.1.tar.gz.
File metadata
- Download URL: compdevkit-1.6.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aae12f1f9dd57165a846a96bc7ca24cd33b33af95a4024f31e8d65dab43eba53
|
|
| MD5 |
5ae1a972d607f66e2262e768726460af
|
|
| BLAKE2b-256 |
97658c4c3dd172d9fe715b6332755c686502fed15cd48779e09f71a2250ffef6
|
File details
Details for the file compdevkit-1.6.1-py3-none-any.whl.
File metadata
- Download URL: compdevkit-1.6.1-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d82af863ec9e15c2df688246cc4d6fae51d942ce0397f43fc70d715aa9734554
|
|
| MD5 |
efd97bd2dbbcc6b0cb35a3b711a970ab
|
|
| BLAKE2b-256 |
7fc55b0f98df9e14b006fe7fe459f255df877de11470334d5bd46f05ebe67999
|