Skip to main content

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.

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()

Run the tests

py.test compconfig -v

Project details


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.4.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

compdevkit-1.4.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file compdevkit-1.4.0.tar.gz.

File metadata

  • Download URL: compdevkit-1.4.0.tar.gz
  • Upload date:
  • Size: 4.7 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

Hashes for compdevkit-1.4.0.tar.gz
Algorithm Hash digest
SHA256 0289bd52942987e8d75e8416422cb4d79d9a09be39cd44131bb1651a749f4453
MD5 38b08e01fb797b16bd5323383e04a585
BLAKE2b-256 aae5817378f1c53983a1a3e36becaddc8154ec3275cc9111830e9c6f7a6ff80d

See more details on using hashes here.

File details

Details for the file compdevkit-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: compdevkit-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 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

Hashes for compdevkit-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c7eba60eee31a6eda554e64cb60ef7f3b019b16c134da492063a9f5b494d2fc
MD5 cb8ee07e9d1e73c4c2701f211f105375
BLAKE2b-256 3fd182e0e8ed5dbf47d4235ad7572d8a352cf0a4f6291ba287b97962362de39d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page