Esempio n. 1
0
        return


class ActionCodes(Enum):
    preview = auto(
    ),  # Choose cells which would go into a string but don't assemble it
    assemble = auto(
    )  # Assemble a new string moving the chosen cells from the pool to individual blocks


if __name__ == "__main__":
    structlog.configure(
        wrapper_class=structlog.make_filtering_bound_logger(logging.INFO),
        logger_factory=structlog.PrintLoggerFactory(file=sys.stderr))
    load_plugins()

    parser = argparse.ArgumentParser(
        description=
        'Select cells to build a string of blocks connected in series. Monte-Carlo optimization.'
    )
    parser.add_argument('--loglevel',
                        choices=LOG_LEVEL_NAMES,
                        default='INFO',
                        help='Change log level')
    add_plugin_args(parser)
    add_backend_selection_args(parser)
    add_cell_selection_args(parser)

    parser.add_argument('--cell-voltage',
                        type=float,
Esempio n. 2
0
 def __call__(self, parser, args, values, option_string=None):
     load_plugins(pkgutil.resolve_name(values))