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('-c', '--conditions', dest='condition_file_name',
help='Conditions table')
parser.add_argument('-p', '--parameters', dest='parameter_file_name',
help='Parameter table')
# or with model name, following default naming
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, '
parser.add_argument('-c', '--conditions', dest='condition_file_name',
help='Conditions table')
parser.add_argument('-p', '--parameters', dest='parameter_file_name',
help='Parameter table')
# or with model name, following default naming
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, '