██████╗ ██╗ ██╗██╗ ██████╗██╗ ██╗
██╔══██╗██║ ██║██║██╔════╝██║ ██╔╝
██████╔╝██║ ██║██║██║ █████╔╝
██╔══██╗██║ ██║██║██║ ██╔═██╗
██████╔╝╚██████╔╝██║╚██████╗██║ ██╗
╚═════╝ ╚═════╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
A command-line tool to simplify the testing of competitive programming problems.
quick is a command-line tool designed to streamline the process of testing solutions for competitive programming problems. It automates running your code against multiple input/output files, saving you time and effort.
To get started, make sure you have Go installed on your system. Then, you can install quick with a single command:
go installThis will build the binary and place it in your $GOPATH/bin directory. If this directory is in your system's PATH, you'll be able to run quick from anywhere.
quick is built around two main commands: run and create.
Use the run command to execute your solution against a set of test cases.
quick run <your_solution.py>By default, quick scans the current directory for all *.in files and their corresponding *.out files, and runs your script against each pair.
For more targeted testing, especially when you have multiple problems in the same directory, use the --strict or -s flag.
quick run --strict <your_solution.py>In strict mode, the tool will only run on test files that are associated with your solution's name. For a script named solution.py, it will look for test files like 1solution.in, 1solution.out, 2solution.in, 2solution.out, etc.
To quickly generate empty .in and .out file pairs, use the create command.
Usage: quick create <number_of_pairs> [problem_name]
<number_of_pairs>: The number of pairs to create.[problem_name]: An optional name to associate the files with a specific problem.
Examples:
To create 3 generic test file pairs:
quick create 3This will create 1.in, 1.out, 2.in, 2.out, 3.in, 3.out.
To create 2 test file pairs for a problem named solution:
quick create 2 solutionThis will create 1solution.in, 1solution.out, 2solution.in, 2solution.out. These files will be automatically picked up when you run quick run --strict solution.py.
You can customize the shell and the run command used by quick to execute your scripts.
To set a configuration value, use the config set command.
quick config set <key> <value>For example, to change the shell to zsh:
quick config set shell zshFor Windows, you need to configure the shell to cmd.exe (or powershell.exe) and the run command to python.
quick config set shell cmd.exe
quick config set run_command pythonYou can also use powershell.exe as your shell:
quick config set shell powershell.exequick is actively being developed, and here are some of the features we're planning to add:
- 🌐 Support for More Languages: Add a
-langflag to specify other languages (e.g., C++, Java, Node.js) and their corresponding execution commands. - ✍️ Interactive Test Case Creation: An interactive mode for the
createcommand (quick create -i) that prompts the user to paste the input and expected output directly in the terminal. - ⏱️ Configurable Limits: Allow users to configure the timeout and memory limits for test case execution.
- ⚡ Parallel Test Execution: Run test cases in parallel to speed up the verification process.
We welcome contributions from the community! If you have an idea for a new feature or want to help improve quick, please check out our Contributing Guide (you'll need to create this file).
This project is licensed under the MIT License. See the LICENSE file for details (you'll need to create this file).