Metadata-Version: 2.2
Name: cputils
Version: 0.5.0
Summary: Utilities for Competitive Programming
Home-page: https://github.com/Dih5/cputils
Author: Dih5
Author-email: dihedralfive@gmail.com
Classifier: Development Status :: 3 - Alpha
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: yaconfig
Requires-Dist: requests
Requires-Dist: beautifulsoup4
Requires-Dist: lxml
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Requires-Dist: IPython; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# cputils

[![license MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)

Utilities for Competitive Programming. 

Features:
- Download samples from [kattis](https://open.kattis.com/), [aceptaelreto](https://aceptaelreto.com/), [adventofcode](https://adventofcode.com/).
- Test in c, cpp, python, java, rust, ruby, bash, nim.
- Submit to kattis.
- Interactive CLI menu.

Tests only for complete textual match, ignoring leading and trailing whistespaces. 

## Installation
Assuming you have a [Python3](https://www.python.org/) distribution with [pip](https://pip.pypa.io/en/stable/installing/), install the package running:

```bash
pip3 install cputils
```

## Usage
Typically you'll want to work on a dedicated repo/folder for your task (solving the problems in a server, preparing problems...).
You should first create a configuration file defining how cputils will work on that repo/folder and then use the CLI or the commands to work in it.

### cpconfig
To create a config file, run
```bash
cpconfig
```

### cpsamples
To download the samples of a problem run
```bash
cpsamples <problem>
```

### cptest
To test a solution or set of solutions run
```bash
cptest <problem>/<solution(s)>
```
Pro-tip: you can use glob patterns like ```problem/code*``` or ```problem/*.py```.

### cpsubmit
To submit a solution (only kattis)
```bash
cpsubmit <problem>/<solution(s)>
```

### cpmenu
To run an interactive CLI
```bash
cpmenu
```

Yo can also provide the problem and language with the arguments, or change it in the menu. See help (h) for more info.


## Development
### Testing

Testing requires installing the test extra. Furthermore, some tests require the languages to be installed and available.

To run all tests:
```bash
make test
```

To run a single test module:
```bash
pytest tests/test_<test_name>.py
```
