Skip to content

Source components' descendants #44

@rkern

Description

@rkern

I'd love to be able to export a .dot file from an ObjectGraph that contains a subgraph of a garbage snapshot that contains just a specified source component and its descendants (to a configurable number of generations). With the source component subgraph highlighted in red, of course.

g = refcycle.garbage()
sources = g.source_components()
subgraph = g.subgraph_descendants(sources[0], generations=5)
subgraph.write_to_dot('garbage.dot', highlight_subgraph=sources[0])

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions