src/pybel/cli.py
def examples(manager: Manager, debug: bool):
    """Load examples to the database."""
    level = logging.DEBUG if debug else logging.INFO
    logging.basicConfig(level=level)
    logging.getLogger('pybel').setLevel(level)

    for graph in (sialic_acid_graph, statin_graph, homology_graph, braf_graph, egf_graph):
        if manager.has_name_version(graph.name, graph.version):
            click.echo('already inserted {}'.format(graph))
            continue
        click.echo('inserting {}'.format(graph))
        manager.insert_graph(graph, use_tqdm=True)
Load examples to the database.
Load examples to the database.
Load examples to the database .
def examples(manager: Manager, debug: bool):
    level = logging.DEBUG if debug else logging.INFO
    logging.basicConfig(level=level)
    logging.getLogger('pybel').setLevel(level)
    for graph in (sialic_acid_graph, statin_graph, homology_graph, braf_graph, egf_graph):
        if manager.has_name_version(graph.name, graph.version):
            click.echo('already inserted {}'.format(graph))
            continue
        click.echo('inserting {}'.format(graph))
        manager.insert_graph(graph, use_tqdm=True)
def examples ( manager : Manager , debug : bool ) : level = logging . DEBUG if debug else logging . INFO logging . basicConfig ( level = level ) logging . getLogger ( 'pybel' ) . setLevel ( level ) for graph in ( sialic_acid_graph , statin_graph , homology_graph , braf_graph , egf_graph ) : if manager . has_name_version ( graph . name , graph . version ) : click . echo ( 'already inserted {}' . format ( graph ) ) continue click . echo ( 'inserting {}' . format ( graph ) ) manager . insert_graph ( graph , use_tqdm = True )
Load examples to the database.
Load examples to the database .
"""Load examples to the database."""
manager
Manager
debug
bool