A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/RagnarGrootKoerkamp/BAPCtools below:

RagnarGrootKoerkamp/BAPCtools: Tools for developing ICPC-style programming contest problems.

BAPCtools is a tool for creating and developing problems following the CLICS (DOMjudge/Kattis) problem format specified here.

The aim of this tool is to run all necessary compilation, validation, and testing commands while working on an ICPC-style problem. Ideally one should never have to manually run any compilation or testing command themselves.

I'm interested to know who's using this, so feel free to inform me (e.g. via an issue) if so ;) The current state is relatively stable, but things do change from time to time since I'm not aware of usage outside of BAPC yet.

You can install the bapctools-git AUR package, mirrored here, or use the Docker image.

Otherwise, clone this repository and install the required dependencies manually. (If you know how to make a Debian package, feel free to help out.)

Optional dependencies, required for some subcommands:

After cloning the repository, symlink bin/tools.py to somewhere in your $PATH. E.g., if ~/bin/ is in your $PATH, you can do:

% ln -s ~/git/BAPCtools/bin/tools.py ~/bin/bt

For Windows, the preferred way to use BAPCtools is inside the Windows Subsystem for Linux (WSL).

Note that BAPCtools makes use of symlinks for building programs. By default, users are not allowed to create symlinks on Windows. This can be fixed by enabling Developer Mode on Windows (only since Windows 10 version 1703, or newer).
In case you're still having problems with symlinks in combination with Git after enabling this setting, please try the suggestions at https://stackoverflow.com/a/59761201. Specifically, git config -g core.symlinks true should do the trick, after which you can restore broken symlinks using git checkout -- path/to/symlink.

If you cannot or do not want to use WSL, you'll need the following in your %PATH%:

Resource limits (memory limit/hard cpu time limit) are not supported.

A docker image containing this git repo and dependencies, together with commonly used languages, is provided at ragnargrootkoerkamp/bacptools. This version may be somewhat outdated, but we intend to update it whenever dependencies change. Ping me if you'd like it to be updated. Alternatively, inside the Docker container, you can run git -C /opt/BAPCtools pull to update to the latest version of BAPCtools, and use pacman -Sy <package> to install potential missing dependencies.

This image can be used for e.g.:

For maintainers, these are the steps to build and push an updated image:

$ sudo systemctl start docker
$ docker pull archlinux:latest
$ docker login
$ docker build . -t ragnargrootkoerkamp/bapctools
$ docker push ragnargrootkoerkamp/bapctools
$ ssh <server> sudo docker pull ragnargrootkoerkamp/bapctools

The last step is needed when your CI server is not automatically pulling the latest version.

BAPCtools can be run either from a problem directory or a contest directory. This is automatically detected by searching for the problem.yaml file.

The most common commands and options to use on an existing repository are:

The list of all available commands and options is at doc/commands.md#synopsis, and more information regarding the implementation is at doc/implementation_notes.md.

Without arguments, the run command runs all submissions against all testcases. Specify one or more submissions and one or more testcases to only run the given submissions against the given testcases.

Before running the given submissions, this command first makes sure that all generated testcases are up to date (in case generators/generators.yaml was found). To disable automatically regenerating testcases, pass -G (--no-generate), or add no_generate: true to a .bapctools.yaml file in the problem or contest directory.

By default, bt run only prints one summary line per submission, and one additional line for each testcase with an unexpected result. Use -v to print one line per testcase instead.

Use the test command to run a single submission on some testcases. The submission stdout and stderr are printed to the terminal instead of verified as an answer file. Use --samples to run on the samples, or pass a list of testcases or directories containing testcases. Use --interactive/-i to run in interactive mode, where console input is forwarded to the submission. This rebuilds and reruns the program until either control-C or control-D is pressed. It's also possible to supply the test case on the command line directly using e.g. < /path/to/file.in or <<< "10 20".

Use the generate command to generate the testcases specified in generators/generators.yaml. See doc/generators.md for the specification of generators.yaml and see doc/commands.md#generate for the full list of arguents. Use -j 0 to disable running multiple jobs in parallel (the default is 4).

Validate all the .in and .ans for all (given) testcases. It runs all validators from input_validators, answer_validators, and output_validators.

Validators can be one of

You can use --remove to delete all failing testcases or --move <dir> to move them to a separate directory.

Use this command to compile the problem.en.pdf from the problem_statement/problem.en.tex LaTeX statement. problem.en.pdf is written to the problem directory itself.

This can also be used to create the contest pdf by running it from the contest directory.

Personal configuration file

For some command-line flags, it is convenient if they are always set to the same value, which differs per user (e.g., --username or --password for commands that access a CCS like DOMjudge, or --jobs to limit parallel execution) or per contest (e.g., which statement languages are used). For this, you can create a configuration YAML file containing key-value pairs in one of the following locations, from low to high priority:

The keys in this config file can be any option that can be passed on the command-line. Note that the keys should be written out in full (e.g., username: jury rather than u: jury) and any hyphens should be replaced with an underscore (e.g., no_bar: True rather than no-bar: True).

Contributing / Style guide

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4