Skip to main content

CLI tool for creating sio2 task packages

Project description

sinol-make

sinol-make is a CLI tool for creating and verifying problem packages for sio2 with features such as:

  • measuring time and memory in the same deterministic way as sio2,
  • running the solutions in parallel,
  • keeping a git-friendly report of solutions' scores,
  • catching mistakes in the problem packages as early as possible,
  • and more.

Contents

Why?

The purpose of the tool is to make it easier to create good problem packages for official competitions, which requires collaboration with other people and using a multitude of "good practices" recommendations. While there are several excellent CLI tools for creating tests and solutions, they lack some built-in mechanisms for verifying packages and finding mistakes before uploading the package to the judge system. As sinol-make was created specifically for the sio2 problem packages, by default it downloads and uses sio2's deterministic mechanism of measuring solutions' runtime, called oiejq.

Installation

It's possible to directly install sinol-make through Python's package manager pip, which usually is installed alongside Python:

pip3 install sinol-make

pip installs the sinol-make executable in ~/.local/bin/ directory, so make sure this directory is in your PATH. Here's how to add a directory to PATH.

As oiejq works only on Linux-based operating systems, we do not recommend using operating systems such as Windows or macOS. Nevertheless sinol-make supports those operating systems, though there are additional installation steps required to use other tools for measuring time (which are non-deterministic and produce reports different from sio2):

  • Debian-based systems (Ubuntu, usually Windows WSL): apt install time
  • Arch-based systems: pacman -S time
  • macOS: brew install gnu-time coreutils

Autocompletion (optional)

If you would like to have autocompletion for sinol-make commands, run the following command and refresh the shell (e.g. by opening a new terminal):

activate-global-python-argcomplete

Usage

The availabe commands (see sinol-make --help) are:

  • sinol-make run -- Runs selected solutions (by default all solutions) on selected tests (by default all tests) with a given number of CPUs. Measures the solutions' time with oiejq, unless specified otherwise. After running the solutions, it compares the solutions' scores with the ones saved in config.yml. Run sinol-make run --help to see available flags.
  • sinol-make gen -- Generate input files using ingen program (for example prog/abcingen.cpp for abc task). Whenever the new input differs from the previous one, the model solution will be used to generate the new output file. You can also specify your ingen source file which will be used. Run sinol-make gen --help to see available flags.
  • sinol-make inwer -- Verifies whether input files are correct using your "inwer.cpp" program. You can specify what inwer program to use, what tests to check and how many CPUs to use. Run sinol-make inwer --help to see available flags.
  • sinol-make export -- Creates archive ready to upload to sio2 or szkopul. Run sinol-make export --help to see all available flags.
  • sinol-make doc -- Compiles all LaTeX files in doc/ directory to PDF. Run sinol-make doc --help to see all available flags.

Reporting bugs and contributing code

  • Want to report a bug or request a feature? Open an issue.
  • Want to help us build sinol-make? Create a Pull Request and we will gladly review it.

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

sinol_make-1.5.15.tar.gz (57.2 kB view details)

Uploaded Source

Built Distribution

sinol_make-1.5.15-py3-none-any.whl (65.3 kB view details)

Uploaded Python 3

File details

Details for the file sinol_make-1.5.15.tar.gz.

File metadata

  • Download URL: sinol_make-1.5.15.tar.gz
  • Upload date:
  • Size: 57.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for sinol_make-1.5.15.tar.gz
Algorithm Hash digest
SHA256 152d8e27808934a2328cebac5057c4403b62f3d37a9476a0986f7170c131be3c
MD5 c29469276948fbd4848af40910b93c29
BLAKE2b-256 ce24134f9117b93c15e9063ef19137ba4363ad152e612691919bb0ca39142437

See more details on using hashes here.

File details

Details for the file sinol_make-1.5.15-py3-none-any.whl.

File metadata

  • Download URL: sinol_make-1.5.15-py3-none-any.whl
  • Upload date:
  • Size: 65.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for sinol_make-1.5.15-py3-none-any.whl
Algorithm Hash digest
SHA256 5e948179398a658245bd2ac96b88f87d43061aee4a858ce5839b1bb825979bf5
MD5 f17f1011456589466adc516e80c0969c
BLAKE2b-256 cc738cc7efc855d891ceabe3b8dc3794e1e2e8cb8e2d74a555a5c2717876b798

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page