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

Uploaded Source

Built Distribution

compdevkit-1.3.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: compdevkit-1.3.2.tar.gz
  • Upload date:
  • Size: 4.6 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.3.2.tar.gz
Algorithm Hash digest
SHA256 5bbffa184b952d958096180fe2811fca73f88f456e0c0b88e2e55fad2ee132b1
MD5 cddb5500b6062f0ba9fded58dabe943b
BLAKE2b-256 8b0419acccde9959a9fb45db652705b869c65e81a75561a9f97773a9d6f6c52f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: compdevkit-1.3.2-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

Hashes for compdevkit-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f9d6f39b745c621f14d8eaae99395e37669e9b33d3af79dd8196ab573c1826e
MD5 f662c798fe4b6a47ba783a9db3cc8b9b
BLAKE2b-256 19c8986148987d9a913515eb0bf0b5c079f95f315b2447105ed1d0f3924ef004

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