libka.kagraph namespace

Submodules

libka.kagraph.ka_graph module

This module just provides the KAGraph class.

class libka.kagraph.ka_graph.KAGraph(title='')[source]

Bases: object

Generic graph class, if you feed in packages and edges you will be able to dump this graph to a dot, ps or pdf file and/or view the graph with a pdf viewer.

add_edge(package1, package2)[source]

Add an arrow (edge) from package1 to package2.

add_legend()[source]

Add box with the graph node status legend.

add_package(package_name)[source]

Add a package (node) to the graph.

display_graph(file_name=None)[source]

Display the graph in a pdf viewer.

dump_graph_to_dot(file_name)[source]

Generate a *.dot file with the graph.

dump_graph_to_pdf(file_name)[source]

Generate a PDF file with the graph.

dump_graph_to_ps(file_name)[source]

Generate a PS file with the graph.

get_pgv_graph()[source]

Return the internal pygraphviz object.

highlight_package(package)[source]

Highlight a package (node) of the graph drawing a triple octagon around it.

populate_from_bd_relations_map(bd_relations_map)[source]

Populate the graph with bd_relations_map.

set_arch_list(arch_list_str)[source]

Set architecture list, arch_list_str is a string like “amd64,i386”.

set_different_versions(diff_version_list)[source]

Set the list of packages with different versions.

set_expected_version(version)[source]

Set the expected version for most of the packages in the graph.

set_package_status(package, status)[source]

Set the status of the given package (node).

set_package_status_list(status_list)[source]

Set the package status list.

set_package_url(package, url)[source]

Set an url clickable link for a specific package (node).

transitive_reduction()[source]

Perform transitive reduction.

update_timestamp()[source]

Update the graph label timestamp.

libka.kagraph.ka_graph_archive_build_status module

This module just provides the KAGraphArchiveBuildStatus class.

class libka.kagraph.ka_graph_archive_build_status.KAGraphArchiveBuildStatus(dist, title='')[source]

Bases: KAGraph

Class to represent a build status graph for the official archive; in addition to packages(nodes) and edges you must feed in the packages status retrieved with launchpadlib.

set_package_status_from_lp_sources_and_builds(all_sources, all_builds, lpseries)[source]

Sets the package status info from LP.

If you set the lpseries parameter as None, the new queue won’t be checked, that’s interesting for PPA builds.

libka.kagraph.ka_graph_node_status module

This module just provides KAGraphNodeStatus

class libka.kagraph.ka_graph_node_status.KAGraphNodeStatus(name, color, text='', url='')[source]

Bases: object

Class to represent a package node status

libka.kagraph.ka_graph_ppa_build_status module

This module just provides the KAGraphPPABuildStatus class.

class libka.kagraph.ka_graph_ppa_build_status.KAGraphPPABuildStatus(dist, title='')[source]

Bases: KAGraphArchiveBuildStatus

Class to represent a graph containing a PPA build status, its difference compared with KAGraphArchiveBuildStatus is that this class doesn’t consider the NEW queue (that doesn’t make sense for PPAs)

set_package_status_from_lp_sources_and_builds(all_sources, all_builds)[source]

Sets the package status usign the given LP info.

libka.kagraph.ka_graph_proposed_migration_status module

This module just provides the KAGraphProposedMigrationStatus class.

class libka.kagraph.ka_graph_proposed_migration_status.KAGraphProposedMigrationStatus(dist, title='')[source]

Bases: KAGraph

Class to represent a graph with our current proposed migration status, it’s meant to point out which packages are stuck in -proposed.

set_check_excuses(enabled)[source]

Determine if we should use the excuses output to set the package status.

set_excuses_url(url)[source]

Set the excuses output url.

set_package_status_from_lp_sources_and_builds(all_sources, all_builds, lpseries)[source]

Set the package status info from Launchpad.