Add default values to command line help

This commit is contained in:
Yin Li 2020-04-21 13:01:17 -04:00
parent 356e28c31f
commit 28d7cc9e9b

View File

@ -1,11 +1,18 @@
from argparse import ArgumentParser
import argparse
def get_args():
parser = ArgumentParser(description='Transform field(s) to field(s)')
parser = argparse.ArgumentParser(
description='Transform field(s) to field(s)')
subparsers = parser.add_subparsers(title='modes', dest='mode', required=True)
train_parser = subparsers.add_parser('train')
test_parser = subparsers.add_parser('test')
train_parser = subparsers.add_parser(
'train',
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
test_parser = subparsers.add_parser(
'test',
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
add_train_args(train_parser)
add_test_args(test_parser)