Skip to main content

Preparing contests made easy

Project description

Cprep - preparing contests made easy

Cprep is a project inspired by Codeforces Polygon, that aims to provide an open-source extensible alternative to programming contest creation.

Installation

Via pip (recommended)

  • Run pip3 install cprep

Via source code

  • Clone the repository
  • Run pip3 install .

How to use

Create a problem

To create a problem, go to some folder and type cprep create [PROBLEM_NAME].

This will create a folder with the name you provided, as well as some files inside that folder to get you started.

Generate tests

To generate tests, you have to write one or more generators, and modify the tests.sh script to generate each test. You can also optionally include validators.

To generate the actual tests, you can use the command cprep generate.

Evaluate tests

To evaluate the solutions without (re-)generating test cases by using cprep evaluate. This will show a table with results of all the submissions.

You can optionally specify which submissions to evaluate.

Run-all

You can also opt to run all of the above steps in order by typing cprep runall.

Note: You can always check the available options by running cprep --help, and even cprep [COMMAND] --help.

Configuration

When running the tool, there will always be a configuration dictating how the process will happen. It can be printed by using cprep config.

Note: The configuration printed by the above command may depend on the directory you are in.

Global configuration

In order to modify any of the global configuration values, you can add a file called .cprep.yaml in your home directory, where you can override any of the defaults.

For example, if you want to use a different C++ compiler, you can save:

compilation:
  languages:
    C++:
      compile: "g++ -O0 {src_path} -o {exec_path}"

to destination path ~/.cprep.yaml.

Local configuration

For local-level (per problem) configuration, edit the config.yaml file inside the problem directory (created by running cprep create [NAME]). This will override the global configuration, when running the tool from inside the problem folder (it will not affect other problems, though).

This is generally useful for modifying problem-level details like time limit, input/output files, as well as test name structure.

IMPORTANT: This project is still in early stages of development, therefore the config structure is always subject to change.

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

cprep-0.1.14.tar.gz (16.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page