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
pylint coderunner --disable=bad-continuation,invalid-name,too-many-instance-attributes

📝 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.5.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

coderunner-0.5-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coderunner-0.5.tar.gz
  • Upload date:
  • Size: 4.3 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.8

File hashes

Hashes for coderunner-0.5.tar.gz
Algorithm Hash digest
SHA256 be04e5c64c6762b4ff3a9e23ee6cec3f06c9a1b5cbb1660ccb7bb036eaa40dc5
MD5 0d1ff5983c9434609fa9cfc9d685c03d
BLAKE2b-256 5c831117778f1ef4e64debb41c982f20ada936a89a2ab7766492d91ce7b666e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coderunner-0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.2 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.8

File hashes

Hashes for coderunner-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9edb13c0bf88a8075002bdc977221f57f462a2f2fd702fa0497520a8e17aaa00
MD5 5af8e146ec125aaf1963e4af512511dd
BLAKE2b-256 5464b1db209ea55f402c5ec4cdf80e43933e59c0e83585b02a096b69a8df1132

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