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
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
Development
Prerequisites
- Python 3.6+
- virtualenv
- Create virtual environment.
virtualenv -p python3 venv && cd venv && source bin/activate
- Clone the repository.
git https://github.com/codeclassroom/CodeRunner.git
- Install Dependencies.
pip install -r requirements.txt
- Run tests.
python tests.py
- 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
- Twitter: @bhupeshimself
- DEV: bhupesh
📜 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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | be04e5c64c6762b4ff3a9e23ee6cec3f06c9a1b5cbb1660ccb7bb036eaa40dc5 |
|
MD5 | 0d1ff5983c9434609fa9cfc9d685c03d |
|
BLAKE2b-256 | 5c831117778f1ef4e64debb41c982f20ada936a89a2ab7766492d91ce7b666e0 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9edb13c0bf88a8075002bdc977221f57f462a2f2fd702fa0497520a8e17aaa00 |
|
MD5 | 5af8e146ec125aaf1963e4af512511dd |
|
BLAKE2b-256 | 5464b1db209ea55f402c5ec4cdf80e43933e59c0e83585b02a096b69a8df1132 |