No project description provided
Project description
Online Judge Verify Helper
What is this?
This is a tool to easily automate the verify process of your code library for competitive programming.
How to use
Set up the repository for the library
Please read this: https://kmyk.github.io/online-judge-verify-helper/installer.en.html
Running the program
Installation
$ pip3 install online-judge-verify-helper
Python 3.6 or above is required.
Automating the verification
First, add the problem URL to be used to verify the library in the file ending with .test.cpp
as follows (#define PROBLEM "https://judge.yosupo.jp/problem/unionfind"
). Then, run the following command to check if the verification can be performed.
$ oj-verify run
Currently, problems on Library Checker and Aizu Online Judge are supported. It is probable that problems on HackerRank can also be used, but it is not guaranteed at the moment.
Other judging platforms do not currently publish the test cases in usable forms, and so are not currently supported.
Autoexpansion of #include
s
The include
statements in your files in the form of #include "foo.hpp"
can be expanded,
similar to the functionality provided by webpack for JavaScript. This is to solve the problems that most online judges do not support submitting multiple files.
The function can be used by running the following command:
$ oj-bundle main.cpp
If your competitive programming library resides outside the current directory, please specify the flag in the form of -I path/to/your/library
. I recommend make shell aliases like alias oj-bundle='\oj-bundle -I path/to/your/library'
.
Include guards like #pragma once
are partially supported. If you have files that will be included multiple times but you only want them to appear once in the generated code, add #pragma once
to the first line of the files.
Generating Documentation
Run the following command to generate documentation in .verify-helper/markdown/
. Example: https://kmyk.github.io/online-judge-verify-helper/
$ oj-verify docs
If documentation generators like Doxygen are found when generating documentation, they will be automatically used. Available tags are shown below.
Tag name | Description | Remarks |
---|---|---|
@title |
Library file title | If a title was not specified, the @brief element which appears first is used as a title. If there was no @brief elements, a filename is used as a title. |
@category |
Category | If a category was not specified, a directory name is used as a category. |
@brief |
Description of library file | If a title was not specified, the @brief element which appears first is not used as a description, but it is used as a title. |
@see , @sa |
Create a hyperlink to an URL which is written right after this tag. We recommend to use this tag when you have some reference web pages. | Usage: @see https://example.com/ |
@docs |
When a description of your library is too long to handle by using @brief tags, you can add a description which is written in Markdown file. |
Usage: @docs path/to/markdown.md |
@depends |
You can this tag when you want to write dependencies explicitly. | This application supports the automatic recognization of dependencies for some languages such as C++, so there are some cases you need not to write this. |
@ignore |
This application does not generate the documentation of the library file which this tag is specified. |
TeX expressions like $(N \sum_i A_i)$
are also supported by the MathJax library.
Tips
- If you cannot find problems to verify your library, you can refer to other users' libraries. You can find all users of
online-judge-verify-helper
at https://github.com/search?q=online-judge-verify-helper+path%3A.github. - If you cannot find problems to verify your library anywhere, we suggest that you add a problem to Library Checker.
- If you want to accelerate the verify process, you can accelerate by about 100 times: https://kmyk.github.io/online-judge-verify-helper/speedup.html (Japanese)
- You do not need to display the MIT License if you call
online-judge-verify-helper
from GitHub Actions (Details, in Japanese). - This is tool to efficiently verify your library, not to check or prettify your code. If you need such functions, you can try formatters like clang-format or linters like cppcheck.
- Languages other than C++ are also supported (Example: examples/circle.test.awk). You need a file like
.verify-helper/config.toml
that specifies the commands for compiling and running the program (Example: .verify-helper/config.toml).
Authors
- committer: @kmyk (AtCoder: kimiyuki): distribution on
pip
and miscellaneous tasks on online-judge-tools - committer: @beet-aizu (AtCoder: beet): verify function
- committer: @tsutaj (AtCoder: tsutaj): documents generation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for online_judge_verify_helper-4.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef932f3141a6ee6926aab4bd3817c29f73dda04a9e90471e53b1975450d95ef1 |
|
MD5 | d2fc75d05b3237abb2bd9bb389e91769 |
|
BLAKE2b-256 | 2dc0174c4c4a9599f0228f550566a68c598f3c07827b232d2a2e2b61ab2b566b |