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

Add code gen configuration #52

Merged
merged 7 commits into from
Jan 2, 2019
Merged

Add code gen configuration #52

merged 7 commits into from
Jan 2, 2019

Conversation

kyuridenamida
Copy link
Owner

@kyuridenamida kyuridenamida commented Jan 1, 2019

~/.atcodertools.tomlにコード生成用の設定ファイルを記述できるようにした。
一般的な名前のファイルなのは将来的にcodegenだけじゃなくて一般の設定とかもこのファイルで取り扱いたいため。

tomlファイルの例:

[codegen]
indent_type = 'space' # 'tab' or 'space'
indent_width = 4

現状で設定できるのは2つ

  • indent_type スペース(space)もしくは(tab)を指定する
  • indent_width 一回のインデントで指定したindent_typeが何回繰り返されるか
kyuridenamida@name:~/atcoder-tools$ ./atcoder-tools gen --help
usage: ./atcoder-tools gen [-h] [--without-login] [--workspace WORKSPACE]
                           [--lang LANG] [--template TEMPLATE]
                           [--replacement REPLACEMENT] [--parallel]
                           [--save-no-session-cache] [--config CONFIG]
                           contest_id

positional arguments:
  contest_id            contest ID (e.g. arc001)

optional arguments:
(省略)
  --config CONFIG       file path to your config file
                        [Default (Primary)] /home/kyuridenamida/.atcodertools.toml
                        [Default (Secondary)] /home/kyuridenamida/atcoder-tools/atcodertools/tools/atcodertools-default.toml

@codecov-io
Copy link

codecov-io commented Jan 1, 2019

Codecov Report

Merging #52 into master will increase coverage by 0.02%.
The diff coverage is 93.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
+ Coverage   91.04%   91.07%   +0.02%     
==========================================
  Files          31       32       +1     
  Lines        1541     1579      +38     
==========================================
+ Hits         1403     1438      +35     
- Misses        138      141       +3
Impacted Files Coverage Δ
atcodertools/tools/submit.py 53.44% <ø> (ø) ⬆️
atcodertools/tools/tester.py 83.11% <ø> (ø) ⬆️
atcodertools/release_management/version_check.py 54.05% <100%> (ø) ⬆️
atcodertools/codegen/cpp_code_generator.py 94.23% <100%> (+0.11%) ⬆️
atcodertools/tools/envgen.py 81.57% <88.88%> (+0.41%) ⬆️
atcodertools/codegen/code_gen_config.py 95.45% <95.45%> (ø)

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 a2dd3b3...8dbb771. Read the comment docs.

atcodertools/codegen/code_gen_config.py Outdated Show resolved Hide resolved
atcodertools/tools/envgen.py Outdated Show resolved Hide resolved
atcodertools/tools/envgen.py Outdated Show resolved Hide resolved
atcodertools/tools/envgen.py Outdated Show resolved Hide resolved
@asi1024 asi1024 merged commit e67a223 into master Jan 2, 2019
@asi1024 asi1024 added this to the 1.0.5 milestone Jan 2, 2019
@kyuridenamida kyuridenamida deleted the feature/code_gen_option branch April 17, 2021 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants