Skip to main content

A judge for your programs, run and test your programs through Python

Project description

CodeRunner 🏃

A judge 👨🏽‍⚖️ for your programs, run and test your programs through Python

PyPI Build Status codecov PyPI - Format PyPI - Python Version Documentation Status PyPI - Downloads

Installation

Install using pip from PyPI

pip install coderunner

or directly from GitHub if you cannot wait to test new features

pip install git+https://github.com/codeclassroom/CodeRunner.git

Usage

import coderunner

source_code = "path-to/test_python.py"
language = "Python"
expected_output = "path-to/output.txt"
standard_input = "path-to/input.txt"

# use this if you have a standard input to Program
r = coderunner.code(source_code, language, expected_output, standard_input)

# otherwise
r = coderunner.code(source_code, language, expected_output)

# Use path=False if not using file paths
r = coderunner.code("Hello, World", language, "Hello, World", path=False)

Documentation

CodeRunner Documentation

Development

Prerequisites
  • Python 3.6+
  • virtualenv
  1. Create virtual environment.
virtualenv -p python3 venv && cd venv && source bin/activate
  1. Clone the repository.
git https://github.com/codeclassroom/CodeRunner.git
  1. Install Dependencies.
pip install -r requirements.txt
  1. Run tests.
python tests.py
  1. Lint the project with
flake8 coderunner --max-line-length=88 --ignore=F401
black --check --diff coderunner

📝 Changelog

See the CHANGELOG.md file for details.

Author

👥 Bhupesh Varshney

forthebadge

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

👋 Contributing

Please read the CONTRIBUTING guidelines for the process of submitting pull requests to us.

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

coderunner-0.6.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

coderunner-0.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file coderunner-0.6.tar.gz.

File metadata

  • Download URL: coderunner-0.6.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for coderunner-0.6.tar.gz
Algorithm Hash digest
SHA256 0aa8205a0eeb8814bdb7a44652a8627c17d7b00bd5270d2b5caa2ab316c59cbf
MD5 f3dd3f6df471463d3728f6b243f6ab31
BLAKE2b-256 39a25a6c5c3d73c328dac9712b33a5873a84f27835fff93f508042bf82e4ebce

See more details on using hashes here.

File details

Details for the file coderunner-0.6-py3-none-any.whl.

File metadata

  • Download URL: coderunner-0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for coderunner-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 40cd33b57abf85b1c8df144f4e65cf39ff0160438e4520efb5ca55dfffc4cc51
MD5 e96bfe53aad278b3d6443fe72eae4930
BLAKE2b-256 004a485c9081190a752264f7b8eae73a64af1f37c21b479be8d247c8e48d020e

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