Add option "add_help=False" when creating an ArgumentParser object.
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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)
- Ngôn ngữ chính
- VHDL
- Star
- 850
- Fork
- 305
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của VUnit/vunit
-
KeyError in test scheduler when using TestBench.scan_tests_from_file()Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
GHDL: generics leak between configurations when `ghdl.sim_flags` is setCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
VUnit/vunit#1223 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
AXI slave VCs have identical stalling behaviorCó thể đã có người làm @Lay007 đã nhận 27 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
VUnit/vunit#1219 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug CLI documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
openai/codex#56630 · 3 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug:wrong-behaviour domain:cli source:agent status:ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
statusgen: acceptance transition refuses a relative --brief path (cannot resolve brief path)Đang mởbug effort:s impact:low raised-by:verifier risk:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
medici-finance/assay#4246 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add CLI help commandĐang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dominikgobel/kern#5 ·