Skip to content

← special_purpose package

DeclareGraphSignature

Declare arguments that can be passed into the graph, when the graph is called as a function.

The purpose of this node is to annotate a graph as a whole to have a specific call signature (e.g., defining positional and/or keyword-only arguments when the graph is called as a function, for example from Python). See documentation of the "signature" property for more details on the format. A graph may have at most one such node in it, and the node must be freestanding (i.e., not connected to anything). Version 0.3.0

Ports/Properties

signature

Argument signature of the overall graph. This is formatted the same way as signatures in graph-accepting ports. This is mostly used to annotate a graph with a positional argument list so as to make it callable with positional arguments, i.e., mygraph(arg1,arg2). As in normal graph signatures, this is specified as in (myargument1, myargument2), using whichever placeholder names you wish to bind in this fashion. You may optionally also speciff arguments that can be passed only by name, by listing these after a + symbol, as in: (myargument1, myargument2, +, mykeywordargument1, mykeywordargument2). However, note that the latter serves mostly a documentation purpose, since the user can always pass in unlisted keyword arguments, which inside the graph with be picked up by any free (i.e., not otherwise bound) Placeholder and ParameterPort names. Also note that the * and ~ symbols have no meaning in the context of the overall graph, but may be added to document the original signature that may have been used to define the graph.

  • verbose name: Signature
  • default value: (myargument1,myargument2)
  • port type: Port
  • value type: object (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)