Add option "add_help=False" when creating an ArgumentParser object.
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
The issue points to lines 44–82 of vunit_cli.py and proposes passing an add_help option through VUnitCLI to the argparse.ArgumentParser it creates. Start by reading that constructor and _create_argument_parser, then check nearby CLI tests for parser creation and parent parser use. Done means callers can disable the help option when creating a VUnitCLI parser; run the relevant CLI tests.
索引モデルが issue の本文から書いたものです。
説明
Right now there is no option for creating an ArgumentParser object without the help option. ArgumentParser() allows for the add_help=False option. Adding this option to the init of VUnitCLI would allow us to then use the resulting ArgumentParser object as a parent of other ArgumentParser() commands.
The argument for this is when I want to have Vunit as part of a larger script, and therefore add other options to the --help tag.
Changing the lines (line 44-82 in vunit_cli.py) to add this would be simple and only add usability.
class VUnitCLI(object):
"""
VUnit command line interface
"""
def __init__(self, description=None, add_help_descr=True):
"""
:param description: A custom short description of the command line tool
"""
self.parser = _create_argument_parser(description, add_help_descr=add_help_descr)
self.add_help_descr = add_help_descr
def parse_args(self, argv=None):
"""
Parse command line arguments
:param argv: Use explicit argv instead of actual command line argument
:returns: The parsed argument namespace object
"""
return self.parser.parse_args(args=argv)
def _create_argument_parser(description=None, for_documentation=False, add_help_descr=True):
"""
Create the argument parser
:param description: A custom short description of the command line tool
:param for_documentation: When used for user guide documentation
:returns: The created :mod:`argparse` parser object
"""
if description is None:
description = f"VUnit command line tool version {version()!s}"
if for_documentation:
default_output_path = "./vunit_out"
else:
default_output_path = str(Path(os.getcwd()).resolve() / "vunit_out")
parser = argparse.ArgumentParser(description=description, add_help=add_help_descr)
- 主要言語
- VHDL
- スター
- 850
- フォーク
- 305
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
VUnit/vunit のほかの issue
-
KeyError in test scheduler when using TestBench.scan_tests_from_file()対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
GHDL: generics leak between configurations when `ghdl.sim_flags` is set対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
AXI slave VCs have identical stalling behavior対応中かも @Lay007 が 25 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
OpenLakeForge/openlakeforge#494 ·
メンテナーはふだん 1 日以内に返信
-
data only (no code) good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
dbcli/cli_helpers#121 ·