"""Module containing the base parser for arguments of Jina."""importargparsefromjina.parsers.helperimport_chf
[docs]defset_base_parser():"""Set the base parser :return: the parser """fromjinaimport__version__fromjina.helperimportcolored,get_full_version,format_full_version_info# create the top-level parserurls={'Code':('💻','https://github.com/jina-ai/jina'),'Docs':('📖','https://docs.jina.ai'),'Help':('💬','https://slack.jina.ai'),'Hiring!':('🙌','https://career.jina.ai'),}url_str='\n'.join(f'- {v[0]:<10}{k:10.10}\t{colored(v[1],"cyan",attrs=["underline"])}'fork,vinurls.items())parser=argparse.ArgumentParser(epilog=f'''Jina (v{colored(__version__,"green")}) is the cloud-native neural search framework powered by deep learning.{url_str}''',formatter_class=_chf,description='Command Line Interface of `%(prog)s`',)parser.add_argument('-v','--version',action='version',version=__version__,help='Show Jina version',)parser.add_argument('-vf','--version-full',action='version',version=format_full_version_info(*get_full_version()),help='Show Jina and all dependencies\' versions',)returnparser