Metadata-Version: 2.4
Name: pisek
Version: 2.0.0
Summary: Tool for developing tasks for programming competitions.
Author-email: Václav Volhejn <vaclav.volhejn@gmail.com>, Jiří Beneš <mail@jiribenes.com>, Michal Töpfer <michal.topfer@gmail.com>, Jiri Kalvoda <jirikalvoda@kam.mff.cuni.cz>, Daniel Skýpala <skipy@kam.mff.cuni.cz>, Benjamin Swart <benjaminswart@email.cz>, Antonín Maloň <git@tonyl.eu>
Maintainer-email: Daniel Skýpala <skipy@kam.mff.cuni.cz>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/kasiopea-org/pisek
Project-URL: Issues, https://github.com/kasiopea-org/pisek/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorama
Requires-Dist: pydantic
Requires-Dist: editdistance
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: license-file

# Pisek ⌛

Tool for developing tasks for programming competitions.
Currently used by:
 - [Kasiopea](https://kasiopea.matfyz.cz/)
 - [Czech Informatics Olympiad](https://mo.mff.cuni.cz/p/)

And was used by:
 - [CEOI 2024](https://ceoi2024.fi.muni.cz/)

## Install

Pisek requires Python ≥ 3.11. Install with pip:
```bash
pip install pisek
```

For upgrading add `--upgrade`:
```bash
pip install pisek --upgrade
```
## Testing tasks

First create a `config` file as documented [here](https://github.com/kasiopea-org/pisek/blob/master/docs/config-v2-documentation).
You can also reference the examples for
[Kasiopea mode](https://github.com/kasiopea-org/pisek/blob/master/fixtures/sum_kasiopea/config)
and [CMS mode](https://github.com/kasiopea-org/pisek/blob/master/fixtures/sum_cms/config).

```bash
pisek test
```

This command tests the task in the current directory.
It tests all task parts (generator, validator, solutions and judge).

### Task testing overview

What pisek verifies:
 - Samples exist
 - The generator generates inputs
    - Generator is deterministic
    - Generator respects seed on seeded inputs
 - The validator accepts all inputs
 - The judge works
    - It accepts the samples
    - It doesn't crash on malicious output
 - The solutions finish as expected
    - They get the expected number of points
    - They succeed/fail on each test (group of testcases) as expected
 - Data files (inputs and outputs) are valid
    - They are in the correct encoding
    - They don't contain unprintable characters
    - They have a newline at the end
    - The files are reasonably small
    - If `one_input_in_each_nonsample_test=on`, there is exactly one input in each non-sample test.
 - The task is complete
    - A CMS judge has no redundant lines in its stdout/stderr
    - All outputs for each test are not the same
    - If `solution_for_each_test=on`, there exists a dedicated solution for each test
 

### Testing given programs

For fast testing of only the solution `solve_cool.cpp` use:
```bash
pisek test solution solve_cool
```

Similarly the generator can be tested using:
```bash
pisek test generator
```

### Cleaning

Pisek can create a lot of files used for testing. Remove them by running:
```bash
pisek clean
```

### Visualization

For visualizing the running time for each solution and testcase:
```bash
pisek test --testing-log  # test the task
pisek visualize      # visualize
```

## License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

```
Copyright (c)   2019 - 2022 Václav Volhejn <vaclav.volhejn@gmail.com>
Copyright (c)   2019 - 2022 Jiří Beneš <mail@jiribenes.com>
Copyright (c)   2020 - 2022 Michal Töpfer <michal.topfer@gmail.com>
Copyright (c)   2022        Jiří Kalvoda <jirikalvoda@kam.mff.cuni.cz>
Copyright (c)   2023        Daniel Skýpala <skipy@kam.mff.cuni.cz>
Copyright (c)   2024        Benjamin Swart <benjaminswart@email.cz>
Copyright (c)   2024        Antonín Maloň <git@tonyl.eu>
```
