INNER CODE UNIT · Python

summarize

pybel/pybel · src/pybel/cli.py:567

def summarize(manager: Manager):
    """Summarize the contents of the database."""
    click.echo(f"Networks: {manager.count_networks()}")
    click.echo(f"Edges: {manager.count_edges()}")
    click.echo(f"Nodes: {manager.count_nodes()}")
    click.echo(f"Namespaces: {manager.count_namespaces()}")
    click.echo(f"Namespaces entries: {manager.count_namespace_entries()}")
    click.echo(f"Annotations: {manager.count_annotations()}")
    click.echo(f"Annotation entries: {manager.count_annotation_entries()}")


def echo_warnings_via_pager(warnings: list[WarningTuple], sep: str = "\t") -> None:
    """Output the warnings from a BEL graph with Click and the system's pager."""
    # Exit if no warnings
    if not warnings:
        click.echo("Congratulations! No warnings.")
        sys.exit(0)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…