|
2 | 2 |
|
3 | 3 | > A judge π¨π½ββοΈ for your programs, run and test your programs through Python |
4 | 4 |
|
5 | | -[](https://travis-ci.org/codeclassroom/CodeRunner) |
| 5 | + |
6 | 6 |  |
| 7 | +[](https://travis-ci.org/codeclassroom/CodeRunner) |
| 8 | +[](https://codecov.io/gh/codeclassroom/CodeRunner) |
| 9 | + |
| 10 | + |
7 | 11 | [](https://coderunner.readthedocs.io/en/latest/?badge=latest) |
8 | | -[](https://github.com/codeclassroom/CodeRunner/blob/master/LICENSE) |
9 | | -[](https://github.com/codeclassroom/CodeRunner/issues) |
10 | | -[](http://makeapullrequest.com) |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +## Installation |
| 16 | + |
| 17 | +Install using `pip` from PyPI |
| 18 | + |
| 19 | +```bash |
| 20 | +pip install coderunner |
| 21 | +``` |
| 22 | + |
| 23 | +or directly from GitHub if you cannot wait to test new features |
| 24 | + |
| 25 | +```bash |
| 26 | +pip install git+https://github.com/codeclassroom/CodeRunner.git |
| 27 | +``` |
| 28 | + |
| 29 | +## Usage |
| 30 | + |
| 31 | +```python |
| 32 | + |
| 33 | +import coderunner |
| 34 | + |
| 35 | +source_code = "path-to/test_python.py" |
| 36 | +language = "Python" |
| 37 | +expected_output = "path-to/output.txt" |
| 38 | +standard_input = "path-to/input.txt" |
| 39 | + |
| 40 | +# use this if you have a standard input to Program |
| 41 | +r = coderunner.code(source_code, language, expected_output, standard_input) |
| 42 | + |
| 43 | +# otherwise |
| 44 | +r = coderunner.code(source_code, language, expected_output) |
| 45 | + |
| 46 | +# Use path=False if not using file paths |
| 47 | +r = coderunner.code("Hello, World", language, "Hello, World", path=False) |
| 48 | +``` |
| 49 | + |
| 50 | +## Documentation |
| 51 | + |
| 52 | +> [CodeRunner Documentation](https://coderunner.readthedocs.io/en/latest/) |
| 53 | +
|
| 54 | + |
| 55 | +## Development |
| 56 | + |
| 57 | +##### Prerequisites |
| 58 | +- Python 3.6+ |
| 59 | +- virtualenv |
| 60 | + |
| 61 | +1. Create virtual environment. |
| 62 | +```bash |
| 63 | +virtualenv -p python3 venv && cd venv && source bin/activate |
| 64 | +``` |
| 65 | +2. Clone the repository. |
| 66 | +```bash |
| 67 | +git https://github.com/codeclassroom/CodeRunner.git |
| 68 | +``` |
| 69 | +3. Install Dependencies. |
| 70 | +```bash |
| 71 | +pip install -r requirements.txt |
| 72 | +``` |
| 73 | +4. Run tests. |
| 74 | +```bash |
| 75 | +python tests.py |
| 76 | +``` |
| 77 | +5. Lint the project with |
| 78 | +```bash |
| 79 | +flake8 coderunner --max-line-length=88 --ignore=F401 |
| 80 | +black --check --diff coderunner |
| 81 | +``` |
| 82 | + |
| 83 | +## π Changelog |
| 84 | + |
| 85 | +See the [CHANGELOG.md](CHANGELOG.md) file for details. |
| 86 | + |
| 87 | + |
| 88 | +## Author |
| 89 | + |
| 90 | +π₯ **Bhupesh Varshney** |
| 91 | + |
| 92 | +- Twitter: [@bhupeshimself](https://twitter.com/bhupeshimself) |
| 93 | +- DEV: [bhupesh](https://dev.to/bhupesh) |
| 94 | + |
| 95 | +[](https://forthebadge.com) |
| 96 | + |
| 97 | +## π License |
| 98 | + |
| 99 | +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
| 100 | + |
| 101 | +## π Contributing |
| 102 | + |
| 103 | +Please read the [CONTRIBUTING](CONTRIBUTING.md) guidelines for the process of submitting pull requests to us. |
0 commit comments