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
compdevkit-1.6.0.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file compdevkit-1.6.0.tar.gz
.
File metadata
- Download URL: compdevkit-1.6.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5439c95ad9c778f2744a355b5f5187ba3a97c2155802496c0462231b379e2637 |
|
MD5 | 2e4b2b4d5d2d7879f2470fbd04b229d6 |
|
BLAKE2b-256 | cdcbda2bc37a1591a79494a596c1ace7dacb77446275f677e80c10f8ca4a4910 |
File details
Details for the file compdevkit-1.6.0-py3-none-any.whl
.
File metadata
- Download URL: compdevkit-1.6.0-py3-none-any.whl
- Upload date:
- Size: 7.3 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/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db5d63a43bdf9962807484470b2745731b60bc0680816dc321cf3b1716e68f01 |
|
MD5 | e0d72a39634c4cc82462a5f1fd3e3c33 |
|
BLAKE2b-256 | 121df123b8b11a41f244ae14d3d5d4244b6b44a453d69c27e38b9e43f0c10ff6 |