Sources#

class ipyforcegraph.sources.dataframe.DataFrameSource(**kwargs)[source]#

Bases: ForceBase

A Graph Source that stores the nodes and links as DataFrame instances.

Public constructor

the name of the column for a links’s identifier, or 0-based position in the column if None

columns to preserve when updating links

the name of the column for a link’s source, defaulting to source

the name of the column for a link’s target, defaulting to target

the DataFrame of link data

node_id_column Unicode('id')#

the name of the column for a node’s identifier, or 0-based position in the column if None

node_preserve_columns TypedTuple()#

columns to preserve when updating nodes

nodes PandasType(Empty DataFrame Columns: [] Index: [])#

the DataFrame of node data

class ipyforcegraph.sources.widget.WidgetSource(widgets, **kwargs)[source]#

Bases: DataFrameSource

A source that displays the widgets, traits, links, and other features of one or more Widget (or, technically, HasTraits) instances.

Detect IPython, then continue with normal widget initialization.

add_widget_node(widget, graph_data)[source]#

Add a single widget node.

Return type:

Dict[str, Any]

find_graph_data()[source]#
Return type:

Dict[str, Any]

find_trait_graph_data(trait_name, widget, graph_data)[source]#
Return type:

None

find_trait_notifier_graph_data(widget, graph_data)[source]#

Discover trait notifiers from the observed has_traits.

Return type:

None

find_widget_graph_data(widget, graph_data)[source]#

Discover a widget and its traits.

Return type:

None

graph_data Dict()#

an internal collection of observed Data

ignore_classes TypedTuple()#

widget classes that should never be collected

ignore_modules TypedTuple()#

modules from which instances should never be collected

ignore_traits TypedTuple()#

names of traits that should never be collected

observed_has_traits TypedTuple()#

the traitleted from which to discover data

should_discover(candidate, graph_data)[source]#

Whether the candidate is a HasTraits, and has not been otherwise ignored.

Return type:

bool

A DataFrameSource which inspects a dodo.py and its tasks.

class ipyforcegraph.sources.dodo.DodoSource(**kwargs)[source]#

Bases: DataFrameSource

A source that displays the files, tasks, and dependencies of a dodo.py.

Public constructor

backend Unicode('sqlite3')#

the backend for doit’s dependency state

dep_file Unicode('.doit.db')#

the path to doit’s dep_file, relative to the project_root

discover_file_parents(path, path_id, graph_data)[source]#

Discover parent paths.

Return type:

None

discover_one_file(path_name, field, task_id, graph_data)[source]#

Update nodes and links for a single file referenced by a Task.

Return type:

None

discover_one_task(task, graph_data)[source]#

Update nodes and links from a single Task.

Return type:

None

dodo_file Unicode('dodo.py')#

the path to a dodo.py, relative to the project_root

find_graph_data()[source]#

Find all of the nodes and links.

Return type:

Dict[str, Any]

graph_data Dict()#

an internal collection of observed Data

group_files(graph_data)[source]#

Collapse all task_dep and targets.

Return type:

Dict[str, Any]

project_root Union()#

a path to a folder that contains a dodo.py

refresh()[source]#

Refresh the nodes and links.

Return type:

None

show_directories Bool(False)#

create nodes for directories, and links for containment

show_files Bool(True)#

create a node for each file, or collapse to dep groups