src/bio2bel/cli.py
def populate(connection, reset, force, skip):
    """Populate all."""
    for idx, name, manager in _iterate_managers(connection, skip):
        click.echo(
            click.style(f'[{idx}/{len(MANAGERS)}] ', fg='blue', bold=True) +
            click.style(f'populating {name}', fg='cyan', bold=True)
        )

        if reset:
            click.echo('deleting the previous instance of the database')
            manager.drop_all()
            click.echo('creating new models')
            manager.create_all()

        elif manager.is_populated() and not force:
            click.echo(f'👍 {name} is already populated. use --force to overwrite', color='red')
            continue

        try:
            manager.populate()
        except Exception:
            logger.exception('%s population failed', name)
            click.secho(f'👎 {name} population failed', fg='red', bold=True)
def populate(connection, reset, force, skip):
    """Populate all."""
    for idx, name, manager in _iterate_managers(connection, skip):
        click.echo(
            click.style(f'[{idx}/{len(MANAGERS)}] ', fg='blue', bold=True) +
            click.style(f'populating {name}', fg='cyan', bold=True)
        )

        if reset:
            click.echo('deleting the previous instance of the database')
            manager.drop_all()
            click.echo('creating new models')
            manager.create_all()

        elif manager.is_populated() and not force:
            click.echo(f'👍 {name} is already populated. use --force to overwrite', color='red')
            continue

        try:
            manager.populate()
        except Exception:
            logger.exception('%s population failed', name)
            click.secho(f'👎 {name} population failed', fg='red', bold=True)
Populate all.