def doc(attribute=None, list_supported=False, init_seq=False, config=False, **kwargs): """ Quick documentation from command-line. """ system = System() if attribute is not None: if attribute in system.__dict__ and hasattr(system.__dict__[attribute], 'doc'): if init_seq is True: system.__dict__[attribute].get_init_order() return logger.info(system.__dict__[attribute].doc()) else: logger.error('Model <%s> does not exist.', attribute) elif list_supported is True: logger.info(system.supported_models()) else: logger.info( 'info: no option specified. Use \'andes doc -h\' for help.')
def doc(attribute=None, list_supported=False, **kwargs): system = System() if attribute is not None: if attribute in system.__dict__ and hasattr(system.__dict__[attribute], 'doc'): logger.info(system.__dict__[attribute].doc()) else: logger.error(f'Model <{attribute}> does not exist.') elif list_supported is True: logger.info(system.supported_models()) else: logger.info( 'info: no option specified. Use \'andes doc -h\' for help.')