Skip to main content

Logo 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 sio2jail.

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 sio2jail 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 available 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 sio2jail, unless specified otherwise. After running the solutions, it compares the solutions' scores with the ones saved in config.yml. Group scores take the subtask_dependencies key from config.yml into account, so they match the scores given by sio2. If you're using sio2jail, make sure you are not running on efficiency cpu cores. You can check if you have them like this. To run on normal cpu cores, use taskset -c 8-15 sinol-make ..., assuming that cpu cores 8-15 are not efficiency cores. 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 ingen -- Generate input files using ingen program (for example prog/abcingen.cpp for abc task). You can also specify your ingen source file which will be used. Run sinol-make ingen --help to see available flags.
  • sinol-make outgen -- Generate output files using the model solutions. Output files which weren't generated by sinol-make (for example hand-written example outputs) are never overwritten. Instead, they are verified against the model solution's output -- with the checker, if the package has one -- and outgen fails if any of them is wrong. Use the --overwrite flag to replace them with the model solution's outputs. Run sinol-make outgen --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.
  • sinol-make verify -- Verifies the package. This command runs stress tests (if available), verifies the config, generates tests, generates problem statements, runs inwer and run all solutions. Ingen and inwer are compiled with address and UB sanitizers. Run sinol-make verify --help to see all available flags.
  • sinol-make chkwer -- Run checker with model solution and print results. Prints a table with points and checker's comments. This command fails if the model solution didn't score maximum points. Run sinol-make chkwer --help to see all available flags.
  • sinol-make init [id] -- Creates package from template on github and sets task id to provided [id]. Requires an internet connection to run.

You can also run multiple commands at once, for example:

sinol-make gen prog/abcingen2.cpp inwer --cpus 4 run --tests abc1*.in doc export --no-statement

There are also available short aliases for the commands:

  • sinol-make r for sinol-make run
  • sinol-make g for sinol-make gen
  • sinol-make i for sinol-make inwer
  • sinol-make e for sinol-make export
  • sinol-make d for sinol-make doc
  • sinol-make v for sinol-make verify
  • sinol-make c for sinol-make chkwer
  • sm for sinol-make

Contest types

sinol-make changes its behavior depending on the contest type specified in config.yml. You can specify the contest type with the sinol_contest_type key in config. Here is the table of available contest types and their features:

Feature default oi oij icpc
Max score 100 100 100 1
Default time tool sio2jail sio2jail sio2jail time
Full score if took less than half of the time limit,
otherwise linearly decreasing to 1.
❌ ✔️ ❌ ❌
Full score if took less than the time limit ✔️ ❌ ✔️ ✔️
Scores must sum up to 100 ❌ ✔️ ✔️ ❌
Limits can be set for individual tests ✔️ ❌ ✔️ ✔️
Verifies if tests are named correctly
(letters within groups increase, group numbers increase)
❌ ✔️ ✔️ ✔️

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.

Metadata

Release files for sinol-make 1.9.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinol-make 1.9.16
File Size Uploaded
sinol_make-1.9.16.tar.gz 91.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinol-make 1.9.16
File Interpreter ABI Platform
sinol_make-1.9.16-py3-none-any.whl Python 3 none any Details

Total release size: 197.8 kB

Release files / sinol_make-1.9.16.tar.gz

Download URL sinol_make-1.9.16.tar.gz
Size 91.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d83ab15f6071c327fb0bde3e5aaa8a0bd7a0b0047c5cd4906179471816cf340a
BLAKE2b-256 checksum
How to use checksums
f1aeda489aac84014d1a5880fb157e472960a9fb6151ecad5bc5396f7e12e37e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / sinol_make-1.9.16-py3-none-any.whl

Download URL sinol_make-1.9.16-py3-none-any.whl
Size 106.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03804d37619c068f7e85c809b853024be9e6098a4897c7121b2cf87768c8731c
BLAKE2b-256 checksum
How to use checksums
0998137ac1d09316b3cb8a9bcb6b11e818f450431bc440cfb47d8a5a36f16c90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

1.9.16 This release

2 release files

1.9.15

2 release files

1.9.14

2 release files

1.9.13

2 release files

1.9.12

2 release files

1.9.11

2 release files

1.9.10

2 release files

1.9.9

2 release files

1.9.8

2 release files

1.9.7

2 release files

1.9.6

2 release files

1.9.5

2 release files

1.9.4

2 release files

1.9.3

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.30

2 release files

1.5.29

2 release files

1.5.28

2 release files

1.5.26

2 release files

1.5.25

2 release files

1.5.24

2 release files

1.5.23

2 release files

1.5.22

2 release files

1.5.21

2 release files

1.5.20

2 release files

1.5.16

2 release files

1.5.15

2 release files

1.5.14

2 release files

1.5.13

2 release files

1.5.11

2 release files

1.5.10

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page