jina
jina copied to clipboard
Clarify parsers structure
Parser structure polutes our CLI interface and help usage. I suggest we avoid having all the mixins in parsers and just have a parser for each object and these parsers take them from a collection of objects parameters dictionaries:
parser.add_argument(
'--return-responses',
action='store_true',
default=False,
help="If set, return results as List of Requests instead of a reduced DocArray.",
)
For instance, we could have a dictionary liike this:
# in some args_collection
return_responses_argument = {name_or_flags: '--return-responses', action: 'store_true', default: False, help='If set, return results as List of Requests instead of a reduced DocArray."'
# in each parser object:
from args_collectgion import return_responses_argument
parser.add_argument(**return_responses_argument)
Objects to clarify:
- set_flow_parser
- set_client_parser
- set_gateway_parser
- set_deployment_parser
- set_pod_parser
@jina-ai/product This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days