Classes | |
class | Node |
Functions | |
def | cli (ctx) |
def | is_string (x) |
def | is_list (x) |
def | is_list_of_string (x) |
def | dotify (edge_dat, attrs) |
def | jsonnet_try_path (path, rel) |
def | jsonnet_import_callback (path, rel) |
def | resolve_path (obj, jpath) |
def | uses_to_params (uses) |
def | cmd_dotify (ctx, jpath, params, json_file, out_file) |
def | main () |
Fixme: make this into a proper click main
def wirecell.pgraph.main.cli | ( | ctx | ) |
def wirecell.pgraph.main.cmd_dotify | ( | ctx, | |
jpath, | |||
params, | |||
json_file, | |||
out_file | |||
) |
Convert a JSON file for a WCT job configuration based on the Pgraph app into a dot file. The JSON file needs to at least contain a list of edges found at the given jpath. Use, eg, "-1" to locate the last element of a configuration sequence which is typically the config for a Pgrapher. If indeed it is, its [jpath].data.edges attribution will be located and the overall JSON data structure will be used as a list of nodes. Otherwise [jpath].edges will be used and [jpath].uses will be used to provide an initial list of node objects.
Definition at line 216 of file main.py.
def wirecell.pgraph.main.dotify | ( | edge_dat, | |
attrs | |||
) |
Return GraphViz text. If attrs is a dictionary, append to the node a list of its items.
Definition at line 85 of file main.py.
def wirecell.pgraph.main.is_list | ( | x | ) |
Definition at line 79 of file main.py.
def wirecell.pgraph.main.is_string | ( | x | ) |
Definition at line 77 of file main.py.
def wirecell.pgraph.main.jsonnet_import_callback | ( | path, | |
rel | |||
) |
Definition at line 161 of file main.py.
def wirecell.pgraph.main.resolve_path | ( | obj, | |
jpath | |||
) |
def wirecell.pgraph.main.uses_to_params | ( | uses | ) |
Given a list of nodes, return a dictionary of their "data" entries keyed by 'type' or 'type:name'
Definition at line 192 of file main.py.