src/pybel/cli.py
def compile(
    manager, path, allow_naked_names, disallow_nested, disallow_unqualified_translocations,
    no_identifier_validation, no_citation_clearing, required_annotations, upgrade_urls, skip_tqdm,
):
    """Compile a BEL script to a graph."""
    logger.debug('using connection: %s', manager.engine.url)

    click.secho('Compilation', fg='red', bold=True)
    if skip_tqdm:
        click.echo('```')
    graph = from_bel_script(
        path,
        manager=manager,
        use_tqdm=(not skip_tqdm),
        disallow_nested=disallow_nested,
        allow_naked_names=allow_naked_names,
        disallow_unqualified_translocations=disallow_unqualified_translocations,
        citation_clearing=(not no_citation_clearing),
        required_annotations=required_annotations,
        no_identifier_validation=no_identifier_validation,
        allow_definition_failures=True,
        upgrade_urls=upgrade_urls,
    )
    if skip_tqdm:
        click.echo('```')
    to_pickle(graph, get_corresponding_pickle_path(path))

    click.echo('')
    _print_summary(graph, ticks=skip_tqdm)

    sys.exit(0 if 0 == graph.number_of_warnings() else 1)
Compile a BEL script to a graph.
Compile a BEL script to a graph.
Compile a BEL script to a graph .
def compile(
    manager, path, allow_naked_names, disallow_nested, disallow_unqualified_translocations,
    no_identifier_validation, no_citation_clearing, required_annotations, upgrade_urls, skip_tqdm,
):
    logger.debug('using connection: %s', manager.engine.url)
    click.secho('Compilation', fg='red', bold=True)
    if skip_tqdm:
        click.echo('```')
    graph = from_bel_script(
        path,
        manager=manager,
        use_tqdm=(not skip_tqdm),
        disallow_nested=disallow_nested,
        allow_naked_names=allow_naked_names,
        disallow_unqualified_translocations=disallow_unqualified_translocations,
        citation_clearing=(not no_citation_clearing),
        required_annotations=required_annotations,
        no_identifier_validation=no_identifier_validation,
        allow_definition_failures=True,
        upgrade_urls=upgrade_urls,
    )
    if skip_tqdm:
        click.echo('```')
    to_pickle(graph, get_corresponding_pickle_path(path))
    click.echo('')
    _print_summary(graph, ticks=skip_tqdm)
    sys.exit(0 if 0 == graph.number_of_warnings() else 1)
def compile ( manager , path , allow_naked_names , disallow_nested , disallow_unqualified_translocations , no_identifier_validation , no_citation_clearing , required_annotations , upgrade_urls , skip_tqdm , ) : logger . debug ( 'using connection: %s' , manager . engine . url ) click . secho ( 'Compilation' , fg = 'red' , bold = True ) if skip_tqdm : click . echo ( '```' ) graph = from_bel_script ( path , manager = manager , use_tqdm = ( not skip_tqdm ) , disallow_nested = disallow_nested , allow_naked_names = allow_naked_names , disallow_unqualified_translocations = disallow_unqualified_translocations , citation_clearing = ( not no_citation_clearing ) , required_annotations = required_annotations , no_identifier_validation = no_identifier_validation , allow_definition_failures = True , upgrade_urls = upgrade_urls , ) if skip_tqdm : click . echo ( '```' ) to_pickle ( graph , get_corresponding_pickle_path ( path ) ) click . echo ( '' ) _print_summary ( graph , ticks = skip_tqdm ) sys . exit ( 0 if 0 == graph . number_of_warnings ( ) else 1 )
Compile a BEL script to a graph.
Compile a BEL script to a graph .
"""Compile a BEL script to a graph."""
manager
path
allow_naked_names
disallow_nested
disallow_unqualified_translocations
no_identifier_validation
no_citation_clearing
required_annotations
upgrade_urls
skip_tqdm