Skip to content
forked from bicsi/cprep

A very handy utility for preparing tests for contests.

License

Notifications You must be signed in to change notification settings

theodormoroianu/cprep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A very handy utility for preparing tests for contests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.9%
  • Other 1.1%