CALICOlib
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
Installing
python -m pip install calico_lib
# or use uv
uv pip install calico_lib
Alternatively, 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/.venv
Quick Start
See examples/add and tests/.
python tests/contest.py
Development
Bump version number in __init__.py and run flit publish or another build tool. See documentation for flit.
Roadmap
- 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
Similar tools
https://github.com/RagnarGrootKoerkamp/BAPCtools
Changelog
0.2.0
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.
Metadata
Release files for calico_lib 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| calico_lib-0.2.0.tar.gz | 14.0 kB | Without provenance | Details for calico_lib-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| calico_lib-0.2.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for calico_lib-0.2.0-py2.py3-none-any.whl |
Total release size: 29.4 kB
Release files / calico_lib-0.2.0.tar.gz
| Download URL | calico_lib-0.2.0.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53cee05a6748683f05145cdb7e0d6fc1b0ea48e8f12ab57d511c76def72bac5f
|
|
BLAKE2b-256 checksum How to use checksums |
5428ddb53180734491e8ca8df6f35dec0249db04e2f73cbbb89103c94e616f7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / calico_lib-0.2.0-py2.py3-none-any.whl
| Download URL | calico_lib-0.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3a63ebaa321c31f24e47cd590e2c73fef368b273712ebd125f40cb869f2c6147
|
|
BLAKE2b-256 checksum How to use checksums |
63e09be67930b1b5f84b61af839c25bd5e216ba03480ef4ff1bfa5a1f5dfd24e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Security for calico_lib 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.