The python program has multiple options such as download data, build model or both. Example:
parser.add_argument('-m', '--mode', required=True, choices=['dload', 'predict', 'both'],
help='dload = download data\n '
'predict = build prediction model\n,'
'both = download and predict')
but I want to make sure some of the other arguments are only need to appear when its download. I can easily set required=False
but that doesn't look like a good solution.
parser.add_argument('-s', '--start-year-month', required=False,
help="start year to download data, separate year and month by '- ' "\
"ex: 2010-01")
parser.add_argument('-e', '--end-year-month', required=False,
help="ending year of data set separate year and month by '- ' " \
"ex: 2010-01")
above two arguments should only be required when the choice for -m
is dload
or both