8000 enable compiler config by toml by trickstar0301 · Pull Request #243 · kyuridenamida/atcoder-tools · GitHub
[go: up one dir, main page]

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

enable compiler config by toml #243

Merged
merged 4 commits into from
Aug 19, 2021

Conversation

trickstar0301
Copy link
Contributor

Why is this change needed?

I want to specify the options of atcoder-tools compile command in atcoder-tools.toml file.

(Japanese)
atcoder-tools compileコマンドのオプション(compile_command, compile_only_when_diff_detected)について、tomlファイルで設定可能にしたいため。

What did you implement?

  • Add compiler_config.py (refer to tester_config.py).
  • Add function importing config from compiler directive in atcoder-tools.toml on config.py.
  • Add function setting config from atcoder-tools.toml on compiler.py.

(Japanese)

  • compiler_config.pyを新規作成(tester_config.pyを参考に)。
  • config.pyに、tomlファイルにおけるcompilerディレクティブを読み込む設定を追加。
  • compiler.pyに、tomlからのconfigを設定する処理を追加。

What behavior do you expect?

When you add the following config in atcoder-tools.toml, you can get the result in the case of setting the command options of atcoder-tools compile --compile-command 'g++ main.cpp -o main -std=c++17' --compile-only-when-diff-detected true.

[compiler]
compile_command='g++ main.cpp -o main -std=c++17'
compile_only_when_diff_detected=true

(Japanese)
atcoder-tools.tomlファイルに、下記設定を追加することで、atcoder-tools compilerのcommand optionで指定した場合と同様の結果が得られる。

@kyuridenamida
Copy link
Owner

挙動はよさそうです

@codecov-commenter
Copy link
codecov-commenter commented Aug 15, 2021

Codecov Report

Merging #243 (ad0cf42) into stable (8ff1461) will decrease coverage by 0.60%.
The diff coverage is 35.48%.

❗ Current head ad0cf42 differs from pull request most recent head c44ed46. Consider uploading reports for the commit c44ed46 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           stable     #243      +/-   ##
==========================================
- Coverage   89.27%   88.66%   -0.61%     
==========================================
  Files          61       62       +1     
  Lines        2582     2612      +30     
==========================================
+ Hits         2305     2316      +11     
- Misses        277      296      +19     
Impacted Files Coverage Δ
atcodertools/tools/compiler.py 56.89% <20.00%> (-17.47%) ⬇️
atcodertools/config/config.py 94.02% <42.85%> (-5.98%) ⬇️
atcodertools/config/compiler_config.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8ff1461...c44ed46. Read the comment docs.

@kyuridenamida kyuridenamida changed the title enable compiler config enable compiler config by toml Aug 19, 2021
@kyuridenamida kyuridenamida merged commit 45582b9 into kyuridenamida:stable Aug 19, 2021
@kyuridenamida kyuridenamida added this to the 2.7.0 milestone Aug 19, 2021
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

Successfully merging this pull request may close these issues.

3 participants
0