Online Judge Verify Helper
なにこれ
競プロライブラリの verify をお手軽に自動化するためのツールです。
使い方
競プロライブラリのリポジトリに設定する
これ読んで: https://kmyk.github.io/online-judge-verify-helper/installer.html
手元で実行する
インストール
$ pip3 install online-judge-verify-helper
verify 自動実行
まず .test.cpp という拡張子の名前のファイルに #define PROBLEM "https://judge.yosupo.jp/problem/unionfind" のような形で verify 用問題の URL を書いておきます。このとき、次のコマンドで verify できているかを確認してくれます。
$ oj-verify run
利用できる問題は主に Library Checker の問題と Aizu Online Judge の問題です。 HackerRank の問題もたぶん動きますが保証はしません。 その他サービスについてはテストケースが利用できる形で公開されていないために対応していません。
#include の自動展開
与えられたファイル中の #include "foo.hpp" の形の include 文を展開して出力します。
JavaScript で言うところの webpack のような機能です。
以下のように実行します。
$ oj-verify bundle main.cpp
競プロライブラリのディレクトリの外側にいる状態で実行する場合は -I path/to/your/library のように指定してください。
#pragma once などの include guard に部分的に対応しています。複数回の include の対象になっているが出力には一度のみ含まれてほしいようなファイルがあれば、その 1 行目に #pragma once と書いておいてください。
ドキュメント生成
以下のコマンドを実行すると、ドキュメントが生成されます。例: https://kmyk.github.io/online-judge-verify-helper/
$ oj-verify docs
ドキュメント生成時に Doxygen 風のコメントが見つかれば、それらは自動で利用されます。
TeX 記法の数式 (例: $O(N \sum_i A_i)$) の MathJax による表示にも対応しています。
(TODO: どのようなコメントが認識されるかについてのドキュメントを書く)
Tips
- ライブラリを verify するための問題が見つからないときは他の人のライブラリを参考にするとよいでしょう。online-judge-verify-helper のユーザの一覧は https://github.com/search?q=online-judge-verify-helper+path%3A.github から見ることができます
- ライブラリを verify するための問題がそれでも見つからないときは Library Checker に問題を追加してください
- 高速化したい場合は頑張れば全体で 100 倍速ぐらいにできます: https://kmyk.github.io/online-judge-verify-helper/speedup.html
- GitHub Actions から online-judge-verify-helper を呼び出すといった通常想定される利用法においては MIT License に関する著作権表示は要求されません (詳細)
Authors
- committer: @kmyk (AtCoder: kimiyuki): pip での配布や online-judge-tools などその他の諸々の担当
- committer: @beet-aizu (AtCoder: beet): verify 機能担当
- committer: @tsutaj (AtCoder: Tsuta_J): documents 生成担当
Metadata
Release files for online-judge-verify-helper 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| online_judge_verify_helper-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / online_judge_verify_helper-3.1.0-py3-none-any.whl
| Download URL | online_judge_verify_helper-3.1.0-py3-none-any.whl |
|---|---|
| Size | 24.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8f0a93aeb0e9dc9c87f43cd25d9127c6547a2f5725f459771ff9f1608180572
|
|
BLAKE2b-256 checksum How to use checksums |
c076fa29f67dbe0cca57105d5f16abdf374344046d8cd6956b562d9c84fe42e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
|
Security for online-judge-verify-helper 3.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.