Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
parser.add_argument('-n', '--model-name', dest='model_name',
help='Model name where all files are in the working '
'directory and follow PEtab naming convention. '
'Specifying -[smcp] will override defaults')
args = parser.parse_args()
if args.model_name:
if not args.sbml_file_name:
args.sbml_file_name = petab.get_default_sbml_file_name(
args.model_name)
if not args.measurement_file_name:
args.measurement_file_name = \
petab.get_default_measurement_file_name(args.model_name)
if not args.condition_file_name:
args.condition_file_name = petab.get_default_condition_file_name(
args.model_name)
if not args.parameter_file_name:
args.parameter_file_name = petab.get_default_parameter_file_name(
args.model_name)
if not args.model_name and \
(not args.sbml_file_name
or not args.condition_file_name
or not args.measurement_file_name):
parser.error('When not specifying a model name, sbml, '
'condition and measurement file must be specified')
return args
parser.add_argument('-n', '--model-name', dest='model_name',
help='Model name where all files are in the working '
'directory and follow PEtab naming convention. '
'Specifying -[smcp] will override defaults')
args = parser.parse_args()
if args.model_name:
if not args.sbml_file_name:
args.sbml_file_name = petab.get_default_sbml_file_name(
args.model_name)
if not args.measurement_file_name:
args.measurement_file_name = \
petab.get_default_measurement_file_name(args.model_name)
if not args.condition_file_name:
args.condition_file_name = petab.get_default_condition_file_name(
args.model_name)
if not args.parameter_file_name:
args.parameter_file_name = petab.get_default_parameter_file_name(
args.model_name)
if not args.model_name and \
(not args.sbml_file_name
or not args.condition_file_name
or not args.measurement_file_name):
parser.error('When not specifying a model name, sbml, '
'condition and measurement file must be specified')
return args