Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yosupo judge の checker対応 #19

Closed
beet-aizu opened this issue Nov 30, 2019 · 10 comments
Closed

yosupo judge の checker対応 #19

beet-aizu opened this issue Nov 30, 2019 · 10 comments

Comments

@beet-aizu
Copy link
Collaborator

https://judge.yosupo.jp から testlib.h 形式のジャッジプログラムを拾ってきて自動で利用してほしい

とりあえずは oj のライブラリ部分の機能として対応し (コマンドとしては足すかどうかは後回しにしたいので)、その呼び出しはこっちでやるのがいいかなと思っています

これoj t --yosupo "問題名" とかにしてしまいたいです(コード読んだ感じojの中にhttps://github.com/yosupo06/library-checker-problems をgit cloneしてきているんですよね?

Originally posted by @beet-aizu in #1 (comment)

  1. checker.cpp をレポジトリから持ってくる このときディレクトリを特定するのにproblems.tomlを読む必要がある

  2. checker.cpp をコンパイルする 実行ファイルをどこに置くかは考える必要がありそう

  • ojを実行したディレクトリ 衝突するかも?(checkerなんて置いておくことあるか?)
  • ojの内部 まあこっちかなあ
  1. oj t --judge-command を呼ぶ

yosupoジャッジでcheckerを使わない問題は今の所ないのでこの一連の操作をコマンドにしてしまった方が楽な気がします

@beet-aizu beet-aizu changed the title checker対応 yosupo judge の checker対応 Nov 30, 2019
@beet-aizu
Copy link
Collaborator Author

@kmyk
Copy link
Member

kmyk commented Nov 30, 2019

とりあえず一番変更量が少なくなる感じでプルリクしておきました。オプションやコマンドを増やそうとるすと仕様に関する議論をしたりテストを書いたりがする必要がでてくるためです
online-judge-tools/oj#624

@beet-aizu
Copy link
Collaborator Author

プロプロプロプロ

@beet-aizu
Copy link
Collaborator Author

@kmyk
Copy link
Member

kmyk commented Nov 30, 2019

あー、なるほど 🙇
そこを両方 stderr に出すプルリクを投げるか、python3 -c 'import onlinejudge, sys ; open("hoge", "wb").write(onlinejudge.dispatch.problem_from_url("https://judge.yosupo.jp/problem/unionfind").download_checker_cpp())' して回避するか、test.sh 全体を Python で書き直すかのどれかをお願いします

@beet-aizu
Copy link
Collaborator Author

二つ目の方法にしました

@kmyk
Copy link
Member

kmyk commented Nov 30, 2019

ドキュメント生成器が judge.yosupo.jp のための test/9cee1c300646c09ec8db07886051a645/testlib.h を巻き込んでしまってたのでとりあえずディレクトリを移しました。
@beet-aizu なにもしなかったらすべて verify しなおしです。必要なら mv test .verify-helper とか実行してください

INFO:onlinejudge_verify.main:generate documents...
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.0/x64/bin/oj-verify", line 11, in <module>
    load_entry_point('online-judge-verify-helper==2.0.2', 'console_scripts', 'oj-verify')()
  File "/opt/hostedtoolcache/Python/3.8.0/x64/lib/python3.8/site-packages/onlinejudge_verify/main.py", line 124, in main
    subcommand_docs()
  File "/opt/hostedtoolcache/Python/3.8.0/x64/lib/python3.8/site-packages/onlinejudge_verify/main.py", line 107, in subcommand_docs
    onlinejudge_verify.docs.main(html=False)
  File "/opt/hostedtoolcache/Python/3.8.0/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 528, in main
    builder = PagesBuilder(cpp_source_path='.', config=config)
  File "/opt/hostedtoolcache/Python/3.8.0/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 364, in __init__
    self.build_library_files(cpp_source_path, md_destination_path)
  File "/opt/hostedtoolcache/Python/3.8.0/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 480, in build_library_files
    page.build(self.path_to_title, self.path_to_verification, category, categorize_library_cond)
  File "/opt/hostedtoolcache/Python/3.8.0/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 245, in build
    self.write_contents(file_object, path_to_title, path_to_verification)
  File "/opt/hostedtoolcache/Python/3.8.0/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 199, in write_contents
    mark = self.get_mark(path_to_verification[depends])
KeyError: 'test/9cee1c300646c09ec8db07886051a645/testlib.h'
##[error]Process completed with exit code 1.

@kmyk
Copy link
Member

kmyk commented Nov 30, 2019

これ終わってるぽいので閉じておきます

@kmyk kmyk closed this as completed Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants