Tool for developing tasks for programming competitions.
Project description
Pisek ⌛
Tool for developing tasks for programming competitions. Currently used by:
And was used by:
Install
Pisek requires Python ≥ 3.11. Install with pip:
pip install pisek
For upgrading add --upgrade
:
pip install pisek --upgrade
Testing tasks
First create a config
file as documented here.
You can also reference the examples for
Kasiopea mode
and CMS mode.
pisek test
This command tests the task in the current directory. It tests all task parts (generator, checker, 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 checker 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 subtask 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
- The task is complete
- A CMS judge has no redundant lines in its stdout/stderr
- If
solution_for_each_subtask=on
, there exists a dedicated solution for each subtask
Testing given programs
For fast testing of only the solution solve_cool.cpp
use:
pisek test solution solve_cool
Similarly the generator can be tested using:
pisek test generator
Cleaning
Pisek can create a lot of files used for testing. Remove them by running:
pisek clean
Visualization
For visualizing the running time for each solution and testcase:
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 Vá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>
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
Built Distribution
File details
Details for the file pisek-1.4.0.tar.gz
.
File metadata
- Download URL: pisek-1.4.0.tar.gz
- Upload date:
- Size: 140.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b03f8aed507fddd60a1b8b93ba46e1c1133344b35cfde14ebbb853c1f4bc8ea0 |
|
MD5 | 3d68755dd74fe5e99e47410438315247 |
|
BLAKE2b-256 | fb9cbb710eafac2bde66e81c219c6137346d2e82e748dcc7204109a55c05f4c4 |
File details
Details for the file pisek-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: pisek-1.4.0-py3-none-any.whl
- Upload date:
- Size: 178.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb63ea4e4cc039cde23fd222488411f07d1037a21ca79fcc58f214769b985f38 |
|
MD5 | 3ad8655ddc6a10ff53198526ebedfe51 |
|
BLAKE2b-256 | 69f927b876c169cedc6e749e4366fb8b87d8887b63ca490c45a607c1b4917ae1 |