CALICOlib is a framework to help facilitate problem creation on DOMjudge. Currently, the library helps with test generation and creating problem zip, which is based on the ICPC problem package specification
python -m pip install calico_lib
# or use uv
uv pip install calico_libAlternatively, install the development version using flit.
brew install flit # or another package manager like pip or pipx
git clone https://github.com/calico-team/CALICOlib.git
cd CALICOlib
PIP_BREAK_SYSTEM_PACKAGES=1 flit install --symlink
# or use uv
uv pip install -e .
# to install to another project's venv
uv pip install -e . --python /path/to/other-project/.venvSee examples/add and tests/.
python tests/contest.pyBump version number in __init__.py and run flit publish or another build tool. See documentation for flit.
- Support test case from file
- Upload problem to testing contest
- Create contest
- Create contest.zip
- Tests
- Docs
- Remove legacy
- Default validation (trailing white space / empty lines... etc)
- Remove calico specific stuff from the library
https://github.com/RagnarGrootKoerkamp/BAPCtools
write_test_inreturns astrinstead of writing viap.print_test(removed). Tests become pure functions, which makes generation parallel-safe.Problem(..., solution=..., seed=...)declares your reference solution and seed. The library callsrandom.seedbefore each test, so generation is reproducible without you remembering to seed.- Answer generation defaults to running
solution; you no longer need to overridewrite_test_outfor the common case. create_all_tests(n_jobs=...)(or-j/--jobson the CLI) runs answer generation in parallel (threads; each solution runs as a subprocess).- Some random additional API for forward compatibility.
MulticaseTestFile/TestCaseBaseare experimental; their contract is not settled for 1.0.create_all_tests(shard=(i, n))is experimental; the driver contract (coordinatingclean_test_data()/pre_gen_fn) is not settled.