Specialization of workflow to provide quality assurance capabilities.
General Idiom of a quality assurance facility is to provide read-only checks for possibly quaility issues and possibly a fix for them.
The interface is determined by plugs that define the capabilities of the node implementing the checks.
They specialize the respective parts of the workflow
Bases: object
Simple class defining the type of a plug and several flags that affect it. Additionally it can determine how well suited another attribute is
Nodes are automatically computable if they are affected by another plug. If this is not the case, they are marked input only and are not computed. If this flag is true, even unaffeted plugs are computable. Plugs that affect something are automatically input plugs and will not be computed. If the plug does not affect anything and this flag is False, they are seen as input plugs anyway.
The system does not allow plugs to be input and output plugs at the same time, thus your compute cannot be triggered by your own compute
cls: if True, the plug requires classes to be set ( instances of ‘type’ ) , but no instances of these classes uncached: if False, computed values may be cached, otherwise they will always be recomputed. unconnectable: if True, the node cannot be the destination of a connection check_passing_values: check each value as it flows through a connection - usually compatability is only checked on connection and once values are set, but not if they flow through an existing connection
Compute affinity for otherattr.
Returns: | rating from 0 to 255 defining how good the attribtues match each other in general - how good can we store values of otherattr ? Thus this comparison is directed. |
---|---|
Note: | for checking connections, use connectionAffinity |
Compute value’s compatability rate
Returns: | value between 0 and 255, 0 means no compatability, 255 a perfect match. if larger than 0, the plug can hold the value ( assumed the flags are set correctly ). |
---|
Compute connection affinity for given destination attribute
Returns: | rating from 0 to 255 defining the quality of the connection to otherplug. an affinity of 0 mean connection is not possible, 255 mean the connection is perfectly suited. The connection is a directed one from self -> otherplug |
---|
Returns: | default value stored for this attribute, or raise |
---|---|
Note: | handles dynamic defaults, so you should not directly access the default member variable |
Raises MissingDefaultValueError: | |
if attribute does not have a default value | |
Raises TypeError: | |
if value returned by dynamic attribute has incorrect type |
Bases: object
Descriptor allowing to easily setup callbacks for classes derived from EventSender
Send our event using the given args
Note: | if an event listener is weak referenced and goes out of scope |
---|---|
Note: | will catch all event exceptions trown by the methods called |
Returns: | False if at least one event call threw an exception, true otherwise |
Bases: object
Base class for all classes that want to provide a common callback interface to supply event information to clients.
Usage: Derive from this class and define your callbacks like:
>>> event = Event() >>> # Call it using >>> self.event.send([*args][,**kwargs]])>>> # Users register using >>> yourinstance.event = callable>>> # and deregister using >>> yourinstance.event.remove(callable)
Note: | if use_weakref is True, we will weakref the eventfunction, and deal properly with instance methods which would go out of scope immediatly otherwise |
---|---|
Note: | using weak-references to ensure one does not keep objects alive, see Event.use_weakref |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
Returns: | list of event ids that exist on our class |
---|
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Bases: mrv.dge.NodeBase
The base class for all processes, defining a common interface Inputs and Outputs of this node are statically described using plugs
Note: | the process base is able to duplcate properly as it stores in constructor arguments accordingly |
---|
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
Returns: | list of intermediate children of path, [ child1 , child2 ] |
---|---|
Parameter: | predicate – return True to include x in result |
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | list of all children of path, [ child1 , child2 ] |
---|---|
Parameters: |
|
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | Tuples of input shells defining a connection of the given type from tuple( InputNodeOuptutShell, OurNodeInputShell ) for input connections and tuple( OurNodeOuptutShell, OutputNodeInputShell ) |
---|---|
Parameters: |
|
Copy the values of ourselves onto the given instance which must be an instance of our class to be compatible. Only the common classes will be copied to instance
Returns: | altered instance |
---|---|
Note: | instance will be altered during the process |
Implements a c-style copy constructor by creating a new instance of self and applying the copyFrom methods from base to all classes implementing the copyfrom method. Thus we will call the method directly on the class
Parameters: |
|
---|
Returns: | an instance suitable to be stored in the given plug |
---|---|
Parameters: |
|
Note: | needs to be implemented by subclasses, but subclasses can just call their superclass for all unhandled plugs resulting in consistent error messages |
Returns: | sorted list of (rate,plug) tuples suitable to deal with the given attribute. Thus they could connect to it as well as get their value set. Most suitable plug comes first. Incompatible plugs will be pruned. |
---|---|
Parameters: |
|
Raises TypeError: | |
if ambiguous input was found |
Returns: | ID of this instance |
---|
Returns: | list of plugs suitable as input |
---|---|
Note: | convenience method |
Returns: | list of static plugs suitable as input |
---|---|
Note: | convenience method |
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
Returns: | list of plugs suitable to deliver output |
---|---|
Note: | convenience method |
Returns: | list of static plugs suitable to deliver output |
---|---|
Note: | convenience method |
Returns: | parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
Returns: | list of dynamic plugs as defined on this node - they are usually retrieved on class level, but may be overridden on instance level |
---|---|
Parameter: | predicate – return static plug only if predicate is true |
Returns: | list of static plugs as defined on this node - they are class members |
---|---|
Parameter: | predicate – return static plug only if predicate is true |
Note: | Use this method only if you do not have an instance - there are nodes that actually have no static plug information, but will dynamically generate them. For this to work, they need an instance - thus the plugs method is an instance method and is meant to be the most commonly used one. |
Returns: | the root of the DAG - it has no further parents |
---|
Returns: | list target types that can be output |
---|---|
Note: | targetTypes are classes, not instances |
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
Returns: | tuple( int, PlugShell ) int between 0 and 255 - 255 means target matches perfectly, 0 means complete incompatability. Any inbetweens indicate the target can be achieved, but maybe just in a basic way If rate is 0, the object will be None, otherwise its a plugShell to the input attribute that can take target as input. In process terms this means that at least one output plug exists that produces the target. |
---|---|
Parameters: |
|
Raises TypeError: | |
if the result is ambiguous and raise_on_ambiguity = 1 |
Returns: | a plugshell as suitable to for this class |
---|
Returns: | list of shells made from plugs and our node |
---|
Returns: | the workflow instance we are connected with. Its used to query global data |
---|
Epydoc: mrv.automation.qa.QACheck
Bases: mrv.dge.plug
Defines a test suitable to be run and computed by a QAProcessBase It’s nothing more than a convenience class as the actual information is held by the respective QACheckAttribute. All non-plug calls are passed on to the underlying attribute, allowing it to be treated like one
Returns: | tuple containing affected plugs ( plugs that are affected by our value ) |
---|
Returns: | tuple containing plugs that affect us ( plugs affecting our value ) |
---|
Returns: | name of plug |
---|
Returns: | True if this is an input plug that will never cause computations |
---|
Returns: | True if this is an output plug that can trigger computations |
---|
Epydoc: mrv.automation.qa.QACheckAttribute
Bases: mrv.dge.Attribute
The Test Attribute represents an interface to a specific test as implemented by the parent QAProcessBase. The QA Attribute returns specialized quality assurance results and provides additional information about the respective test
Note: | as this class holds meta information about the respective test ( see QACheck ) user interfaces may use it to adjust it’s display |
---|---|
Note: | this class depends on unknown mel implementations - on error we abort but do not throw as this would cause class creation to fail and leave the whole qa system unusable |
Compute affinity for otherattr.
Returns: | rating from 0 to 255 defining how good the attribtues match each other in general - how good can we store values of otherattr ? Thus this comparison is directed. |
---|---|
Note: | for checking connections, use connectionAffinity |
Compute value’s compatability rate
Returns: | value between 0 and 255, 0 means no compatability, 255 a perfect match. if larger than 0, the plug can hold the value ( assumed the flags are set correctly ). |
---|
Compute connection affinity for given destination attribute
Returns: | rating from 0 to 255 defining the quality of the connection to otherplug. an affinity of 0 mean connection is not possible, 255 mean the connection is perfectly suited. The connection is a directed one from self -> otherplug |
---|
Returns: | default value stored for this attribute, or raise |
---|---|
Note: | handles dynamic defaults, so you should not directly access the default member variable |
Raises MissingDefaultValueError: | |
if attribute does not have a default value | |
Raises TypeError: | |
if value returned by dynamic attribute has incorrect type |
Epydoc: mrv.automation.qa.QACheckResult
Bases: object
Wrapper class declaring test results as a type that provides a simple interface to retrieve the test results
Note: | test results are only reqtrieved by QACheckAttribute plugs |
---|
Returns: | ( list( Item, ... ) list of failed items being items that could not be fixed and are not yet in the desired state |
---|
Returns: | list( Item , ... ) list of items ( the exact type may differ depending on the actual test ) which have been fixed so they represent the desired state |
---|
Returns: | True if the test result is empty, and thus resembles a null value |
---|
Returns: | True if the check is successful, and False if there are at least some failed objects |
---|
Epydoc: mrv.automation.qa.QAProcessBase
Bases: mrv.automation.process.ProcessBase
Quality Assurance Process including a specialized QA interface
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Called when the test identified by plug should be handled
Parameters: |
|
---|---|
Returns: | QACheckResult instance keeping information about the outcome of the test |
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
Returns: | list of intermediate children of path, [ child1 , child2 ] |
---|---|
Parameter: | predicate – return True to include x in result |
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | list of all children of path, [ child1 , child2 ] |
---|---|
Parameters: |
|
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | Tuples of input shells defining a connection of the given type from tuple( InputNodeOuptutShell, OurNodeInputShell ) for input connections and tuple( OurNodeOuptutShell, OutputNodeInputShell ) |
---|---|
Parameters: |
|
Copy the values of ourselves onto the given instance which must be an instance of our class to be compatible. Only the common classes will be copied to instance
Returns: | altered instance |
---|---|
Note: | instance will be altered during the process |
Implements a c-style copy constructor by creating a new instance of self and applying the copyFrom methods from base to all classes implementing the copyfrom method. Thus we will call the method directly on the class
Parameters: |
|
---|
Returns: | sorted list of (rate,plug) tuples suitable to deal with the given attribute. Thus they could connect to it as well as get their value set. Most suitable plug comes first. Incompatible plugs will be pruned. |
---|---|
Parameters: |
|
Raises TypeError: | |
if ambiguous input was found |
Returns: | ID of this instance |
---|
Returns: | list of plugs suitable as input |
---|---|
Note: | convenience method |
Returns: | list of static plugs suitable as input |
---|---|
Note: | convenience method |
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
Returns: | list( QACheck, ... ) list of our checks |
---|---|
Parameter: | kwargs – see QAWorkflow.filterChecks |
Returns: | list of plugs suitable to deliver output |
---|---|
Note: | convenience method |
Returns: | list of static plugs suitable to deliver output |
---|---|
Note: | convenience method |
Returns: | parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
Returns: | list of dynamic plugs as defined on this node - they are usually retrieved on class level, but may be overridden on instance level |
---|---|
Parameter: | predicate – return static plug only if predicate is true |
Returns: | list of static plugs as defined on this node - they are class members |
---|---|
Parameter: | predicate – return static plug only if predicate is true |
Note: | Use this method only if you do not have an instance - there are nodes that actually have no static plug information, but will dynamically generate them. For this to work, they need an instance - thus the plugs method is an instance method and is meant to be the most commonly used one. |
Returns: | the root of the DAG - it has no further parents |
---|
Returns: | list target types that can be output |
---|---|
Note: | targetTypes are classes, not instances |
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
Returns: | tuple( int, PlugShell ) int between 0 and 255 - 255 means target matches perfectly, 0 means complete incompatability. Any inbetweens indicate the target can be achieved, but maybe just in a basic way If rate is 0, the object will be None, otherwise its a plugShell to the input attribute that can take target as input. In process terms this means that at least one output plug exists that produces the target. |
---|---|
Parameters: |
|
Raises TypeError: | |
if the result is ambiguous and raise_on_ambiguity = 1 |
Returns: | a plugshell as suitable to for this class |
---|
Returns: | list of shells made from plugs and our node |
---|
Returns: | the workflow instance we are connected with. Its used to query global data |
---|
Epydoc: mrv.automation.qa.QAWorkflow
Bases: mrv.automation.workflow.Workflow, mrv.util.EventSender
Represents a workflow of QAProcessBase instances and allows to query them more conveniently
Bases: networkx.classes.digraph.DiGraph
Simple wrapper storing a call graph, keeping the root at which the call started
Note: | this class is specialized to be used by workflows, its not general for that purpose |
---|
Returns: | root at which the call started |
---|
Returns: | length of the callstack |
---|
End the call start started previously
Parameter: | result – the result of the call |
---|
Returns: | flattened version of graph as list of ProcessData edges in call order , having the root as last element of the list |
---|---|
Parameters: |
|
Bases: object
Allows to store additional information with each process called during the workflow
Returns: | time to process the call |
---|
Returns: | result stored in this instance, or None if it is not present or not alive |
---|
Set the given result
Note: | uses weak references as the tracking structure should not cause a possible mutation of the program flow ( as instances stay alive although code expects it to be deleted |
---|
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
Returns: | current callgraph instance |
---|---|
Note: | its strictly read-only and may not be changed |
Returns: | list of intermediate children of path, [ child1 , child2 ] |
---|---|
Parameter: | predicate – return True to include x in result |
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | list of all children of path, [ child1 , child2 ] |
---|---|
Parameters: |
|
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Remove all event receivers for all events registered in this instance.
Note: | This usually doesn’t need to be called directly, but might be useful in conjunction with other system that do not release your strongly bound instance |
---|
Connect this plug to destinationshell such that destinationshell is an input plug for our output
Parameters: |
|
---|---|
Returns: | self on success, allows chained connections |
Raises PlugAlreadyConnected: | |
if destinationshell is connected and force is False |
|
Raises PlugIncompatible: | |
if destinationshell does not appear to be compatible to this one |
Copy the values of ourselves onto the given instance which must be an instance of our class to be compatible. Only the common classes will be copied to instance
Returns: | altered instance |
---|---|
Note: | instance will be altered during the process |
Create a report instance that describes how the previous target was made
Parameter: | reportType – Report to populate with information - it must be a Plan based class that can be instantiated and populated with call information. A report analyses the call dependency graph generated during dg evaluation and presents it. |
---|---|
Returns: | report instance whose makeReport method can be called to retrieve it |
Implements a c-style copy constructor by creating a new instance of self and applying the copyFrom methods from base to all classes implementing the copyfrom method. Thus we will call the method directly on the class
Parameters: |
|
---|
As listChecks, but allows you do define the processes to use
Parameter: | predicate – func( p ) for plug p returns True for it to be included in the result |
---|
Returns: | True if the node is in this graph, false otherwise |
---|
Returns: | the connected input plug of plugshell or None if there is no such connection |
---|---|
Note: | input plugs have on plug at most, output plugs can have more than one connected plug |
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
Returns: | generator returning all nodes that are connected in this graph, in no particular order. For an ordered itereration, use iterShells. |
---|---|
Parameter: | predicate – if True for node, it will be returned |
Returns: | generator returning all nodes in this graph |
---|---|
Parameter: | predicate – if True for node, it will be returned |
Note: | there is no particular order |
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
List all checks as supported by QAProcessBase es in this QA Workflow
Parameter: | predicate – include check c in result if func( c ) returns True |
---|
Returns: | list of event ids that exist on our class |
---|
Returns: | list( Process, ... ) list of QA Processes known to this QA Workflow |
---|---|
Parameter: | predicate – include process p in result if func( p ) returns True |
Returns: | list of tuple( shell, DirtyReport|None ) If a process ( shell.node ) is dirty, a dirty report will be given explaining why the process is dirty and needs an update |
---|---|
Parameters: |
|
Parameter: | target – target to make - can be class or instance |
---|---|
Returns: | result when producing the target |
batch module compatible method allowing to make mutliple targets at once
Parameters: |
|
---|
Returns: | instance of a node according to the given node id |
---|---|
Raises NameError: | |
if no such node exists in graph |
Returns: | immutable copy of the nodes used in the graph |
---|
Returns: | number of nodes in the graph |
---|
Returns: | a list of plugs being the destination of the connection to plugshell |
---|---|
Parameter: | predicate – plug will only be returned if predicate is true for it - shells will be passed in |
Returns: | parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
Returns: | the root of the DAG - it has no further parents |
---|
Run the given checks in the given mode and return their results
Parameters: |
|
---|---|
Returns: | list( tuple( QACheckShell, QACheckResult ), ... ) list of pairs of QACheckShells and the check’s result. The test result will be empty if the test did not run or failed with an exception |
Note: | Sends the following events: e_preCheck , e_postCheck, e_checkError e_checkError may set the abort_on_error variable to True to cause the operation not to proceed with other checks |
Returns: | instance which sent the event you are currently processing |
---|---|
Raises ValueError: | |
if no event is currently in progress |
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
Returns: | int range(0,255) indicating how well a target can be made 0 means not at all, 255 means perfect. Return value is tuple ( rate, PlugShell ), containing the process and plug with the highest rating or None if rate is 0 Walk the dependency graph such that leaf nodes have higher ratings than non-leaf nodes |
---|---|
Note: | you can use the process.ProcessBase enumeration for comparison |
Returns: | list of all supported target type |
---|---|
Note: | this method is for informational purposes only |
Bases: mrv.dge.Graph
Implements a workflow as connected processes
Note: | if you have to access the processes directly, use the DiGraph methods |
---|
Bases: networkx.classes.digraph.DiGraph
Simple wrapper storing a call graph, keeping the root at which the call started
Note: | this class is specialized to be used by workflows, its not general for that purpose |
---|
Returns: | root at which the call started |
---|
Returns: | length of the callstack |
---|
End the call start started previously
Parameter: | result – the result of the call |
---|
Returns: | flattened version of graph as list of ProcessData edges in call order , having the root as last element of the list |
---|---|
Parameters: |
|
Bases: object
Allows to store additional information with each process called during the workflow
Returns: | time to process the call |
---|
Returns: | result stored in this instance, or None if it is not present or not alive |
---|
Set the given result
Note: | uses weak references as the tracking structure should not cause a possible mutation of the program flow ( as instances stay alive although code expects it to be deleted |
---|
Returns: | item with separator added to it ( just once ) |
---|---|
Note: | operates best on strings |
Parameters: |
|
Returns: | basename of this path, ‘/hello/world’ -> ‘world’ |
---|
Returns: | current callgraph instance |
---|---|
Note: | its strictly read-only and may not be changed |
Returns: | list of intermediate children of path, [ child1 , child2 ] |
---|---|
Parameter: | predicate – return True to include x in result |
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Returns: | list of all children of path, [ child1 , child2 ] |
---|---|
Parameters: |
|
Note: | the child objects returned are supposed to be valid paths, not just relative paths |
Connect this plug to destinationshell such that destinationshell is an input plug for our output
Parameters: |
|
---|---|
Returns: | self on success, allows chained connections |
Raises PlugAlreadyConnected: | |
if destinationshell is connected and force is False |
|
Raises PlugIncompatible: | |
if destinationshell does not appear to be compatible to this one |
Copy the values of ourselves onto the given instance which must be an instance of our class to be compatible. Only the common classes will be copied to instance
Returns: | altered instance |
---|---|
Note: | instance will be altered during the process |
Create a report instance that describes how the previous target was made
Parameter: | reportType – Report to populate with information - it must be a Plan based class that can be instantiated and populated with call information. A report analyses the call dependency graph generated during dg evaluation and presents it. |
---|---|
Returns: | report instance whose makeReport method can be called to retrieve it |
Implements a c-style copy constructor by creating a new instance of self and applying the copyFrom methods from base to all classes implementing the copyfrom method. Thus we will call the method directly on the class
Parameters: |
|
---|
Returns: | True if the node is in this graph, false otherwise |
---|
Returns: | the connected input plug of plugshell or None if there is no such connection |
---|---|
Note: | input plugs have on plug at most, output plugs can have more than one connected plug |
Returns: | True if self is a part of other, and thus can be found in other |
---|---|
Note: | operates on strings only |
Returns: | True if this path is the root of the DAG |
---|
Returns: | True other starts with self |
---|---|
Note: | operates on strings |
Note: | we assume other has the same type as self, thus the same separator |
Returns: | generator returning all nodes that are connected in this graph, in no particular order. For an ordered itereration, use iterShells. |
---|---|
Parameter: | predicate – if True for node, it will be returned |
Returns: | generator returning all nodes in this graph |
---|---|
Parameter: | predicate – if True for node, it will be returned |
Note: | there is no particular order |
Returns: | generator retrieving all parents up to the root |
---|---|
Parameter: | predicate – returns True for all x that you want to be returned |
Returns: | list of tuple( shell, DirtyReport|None ) If a process ( shell.node ) is dirty, a dirty report will be given explaining why the process is dirty and needs an update |
---|---|
Parameters: |
|
Parameter: | target – target to make - can be class or instance |
---|---|
Returns: | result when producing the target |
batch module compatible method allowing to make mutliple targets at once
Parameters: |
|
---|
Returns: | instance of a node according to the given node id |
---|---|
Raises NameError: | |
if no such node exists in graph |
Returns: | immutable copy of the nodes used in the graph |
---|
Returns: | number of nodes in the graph |
---|
Returns: | a list of plugs being the destination of the connection to plugshell |
---|---|
Parameter: | predicate – plug will only be returned if predicate is true for it - shells will be passed in |
Returns: | parent of this path, ‘/hello/world’ -> ‘/hello’ or None if this path is the dag’s root |
---|
Returns: | all parents of this path, ‘/hello/my/world’ -> [ ‘/hello/my’,’/hello’ ] |
---|
Returns: | the root of the DAG - it has no further parents |
---|
Returns: | True if this instance supports the interface of the given type |
---|---|
Parameter: | interface_type – Type of the interface you require this instance to support |
Note: | Must be used in case you only have a weak reference of your interface instance or proxy which is a case where the ordinary isinstance( obj, iInterface ) will not work |
Returns: | int range(0,255) indicating how well a target can be made 0 means not at all, 255 means perfect. Return value is tuple ( rate, PlugShell ), containing the process and plug with the highest rating or None if rate is 0 Walk the dependency graph such that leaf nodes have higher ratings than non-leaf nodes |
---|---|
Note: | you can use the process.ProcessBase enumeration for comparison |
Returns: | list of all supported target type |
---|---|
Note: | this method is for informational purposes only |
Bases: mrv.dge.iPlug
Defines an interface allowing to compare compatabilies according to types.
Plugs are implemented as descriptors, thus they will be defined on node class level, and all static information will remain static
As descriptors, they are defined statically on the class, and some additional information such as connectivity, is stored on the respective class instance. These special methods are handled using NodeBase class
Plugs are implemented as descriptors as all type information can be kept per class, whereas only connection information changes per node instance.
Plugs can either be input plugs or output plugs - output plugs affect no other plug on a node, but are affected by 0 or more plugs
Note: | class is lowercase as it is used as descriptor ( acting more like a function ) |
---|
Returns: | tuple containing affected plugs ( plugs that are affected by our value ) |
---|
Returns: | tuple containing plugs that affect us ( plugs affecting our value ) |
---|
Returns: | name of plug |
---|
Returns: | True if this is an input plug that will never cause computations |
---|
Returns: | True if this is an output plug that can trigger computations |
---|
Epydoc: mrv.automation.qa.CheckIncompatibleError
Bases: mrv.dge.ComputeFailed
Raised if a check cannot accomdate the requested mode and thus cannot run
Bases: mrv.dge.ComputeError
Raised by the derived class computing a value if the computational goal cannot be achieved ( anymore )