INNER CODE UNIT · Python
check_required_items
nianticlabs/simplerecon · options.py:349
def check_required_items(self):
"""Raises a flag if options isn't defined."""
for required_flag in self.required_flags:
if self.options.__getattribute__(required_flag) is None:
raise Exception(f"Error! Missing required config argument '{required_flag}'")
def merge_config_options(self, config_options):
""""""
# loop over loaded config and update those in self.options.
for field_name in config_options.__dict__.keys():
value = config_options.__getattribute__(field_name)
self.options.__setattr__(field_name, value)
def merge_cl_args(self, cl_args):
# loop over loaded args and update those in self.options.
for arg_pair in cl_args._get_kwargs():
# this should be the only argument that doesn't match here.