Skip to content

A judge πŸ‘¨πŸ½β€βš–οΈ for your programs, run and test your programs through Python

License

Notifications You must be signed in to change notification settings

dodouNetWork/CodeRunner

Β 
Β 

Repository files navigation

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)

# you can also ignore both fields
r = coderunner.code(source_code, language)

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

r.run()
print(r.getOutput())
print(r.getError())
# See Documentation for more methods.

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.

πŸ”₯ Powered By

Judge0 API - Free, robust and scalable open-source online code execution system

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.

About

A judge πŸ‘¨πŸ½β€βš–οΈ for your programs, run and test your programs through Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 87.8%
  • Java 5.4%
  • C++ 4.3%
  • C 2.5%