Add option "add_help=False" when creating an ArgumentParser object.
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 45/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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)
- Lenguaje dominante
- VHDL
- Estrellas
- 850
- Forks
- 305
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 7
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de VUnit/vunit
-
KeyError in test scheduler when using TestBench.scan_tests_from_file()Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
GHDL: generics leak between configurations when `ghdl.sim_flags` is setPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
VUnit/vunit#1223 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
AXI slave VCs have identical stalling behaviorPosiblemente ocupada @Lay007 la tomó hace 26 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
VUnit/vunit#1219 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de VUnit/vunit
Issues similares
-
ll-builder shell completions omit existing lockfile commands and --lockedPosiblemente ocupada @project-nju-learner la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
OpenAtom-Linyaps/linyaps#2291 ·
Los mantenedores suelen responder en 1 día
-
roadmap-100
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
ggml-org/whisper.cpp#4126 ·
Los mantenedores suelen responder en 4 días
-
area:sim good first issue kind:feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día
-
docs good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
Usenova-Labs/usenova-backend#35 ·
Los mantenedores suelen responder en 1 día