Package mbuild :: Module dag :: Class dag_t
[frames] | no frames]

Class dag_t

source code

object --+
         |
        dag_t

This object builds a DAG of files an sequences their submission to the parallel work queue of type work_queue_t.

This takes plan_t objects representing command strings or python functions, and creates command_t objects suitable for use in the work_queue_t.

As the work_queue_t executes, it queries this DAG for more ready commands or functions to execute.

Instance Methods
 
__del__(self) source code
 
__init__(self, name='default', env=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
command_t
add(self, env, d)
Create a command based on the input dictionary or plan_t object.
source code
 
check_for_skipped(self)
Return a list of things that did not build but were tagged as required for the build.
source code
bool
cycle_check(self)
Check the DAG for illegal cycles in the include structure.
source code
 
dag_write_signatures(self)
Write a dictionary of _mbuild_storage_object_t's to the given file name
source code
 
dump(self)
print a string representing the DAG.
source code
list
results(self)
Return a list of command_t's that were executed for analysis of the build.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, name='default', env=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

add(self, env, d)

source code 

Create a command based on the input dictionary or plan_t object. It may have inputs and outputs. Things may have no input or output files. Return the created command_t. The command object dependence tracking mechanism will control their execution.

Parameters:
  • env (env_t) - the environment
  • d (dict or plan_t) - a dictionary or plan_t from a builder describing the command.
Returns: command_t
A command object for the dependence DAG

check_for_skipped(self)

source code 

Return a list of things that did not build but were tagged as required for the build. This list could be nonempty because (1)there was an error in the build or (2) there is a circularity in the dependence structure.

cycle_check(self)

source code 

Check the DAG for illegal cycles in the include structure.

Returns: bool
True if the DAG contains cycles (and thus is not a DAG).

results(self)

source code 

Return a list of command_t's that were executed for analysis of the build. If a command was not executed, it is not returned.

Returns: list
A list of command_t objects.