Skip to main content

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

Metadata

Release files for compdevkit 1.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compdevkit 1.6.1
File Size Uploaded Provenance Actions
compdevkit-1.6.1.tar.gz 5.0 kB Without provenance Details for compdevkit-1.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for compdevkit 1.6.1
File Interpreter ABI Platform Actions
compdevkit-1.6.1-py3-none-any.whl Python 3 none any Details for compdevkit-1.6.1-py3-none-any.whl

Total release size: 12.2 kB

Release files / compdevkit-1.6.1.tar.gz

Download URL compdevkit-1.6.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aae12f1f9dd57165a846a96bc7ca24cd33b33af95a4024f31e8d65dab43eba53
BLAKE2b-256 checksum
How to use checksums
97658c4c3dd172d9fe715b6332755c686502fed15cd48779e09f71a2250ffef6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / compdevkit-1.6.1-py3-none-any.whl

Download URL compdevkit-1.6.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d82af863ec9e15c2df688246cc4d6fae51d942ce0397f43fc70d715aa9734554
BLAKE2b-256 checksum
How to use checksums
7fc55b0f98df9e14b006fe7fe459f255df877de11470334d5bd46f05ebe67999
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for compdevkit 1.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page