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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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