Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Compile a graph descriptor into a graph

        def compile_graph(descriptor):
    """Compile a graph descriptor into a graph"""

    nodes = build_nodes(keys.simplify(descriptor))
    deps = build_dependency_tree(nodes)
    node_names = graph_nodes(deps)
    req, opt, out = graph_parameters(nodes)

    return {
        "descriptor": descriptor,
        "nodes": nodes,
        "dependencies": deps,
        "required_inputs": req,
        "optional_inputs": opt,
        "outputs": out,
        "node_names": node_names,
    }
        


src/g/r/graffiti-HEAD/graffiti/__init__.py   graffiti(Download)
from pprint import pformat
 
from core import compile_graph, run_graph
from keys import desimplify
 
    def __init__(self, descriptor):
        self.graph = compile_graph(descriptor)
 
    @property
    def descriptor(self):