4.2 Dependency

4.2.1 Avalible depedencys

  • class dependecy.FileChanged

    Dependency returns true if file provided was changed. If task argument is provided, then run that task if it should be done.

  • class dependecy.FileDoesNotExists

    Dependency returns ture if file does not exists.

  • class dependecy.AlwaysRebuild

    Dependency will always make a task rebuild.

4.2.2.1 Dependency class

class dependecy.Dependency
Dependency.__call__(task[, dependency_force=False])

Method that will be called to check if dependency need to be rebuilded (if it is a task), and return True if task assigned will have to rebuild.

Note

Use this to make a dependency test, but put your code into the do_test method if you have your own dependency.

Parameters:
  • task – task in which the dependency is listed
  • dependency_force – force dependency of task to rebuild
Return type:

bool

Returns:

was task runned

Dependency.do_test(task[, dependency_force=False])

Method that will be called to check if dependency need to be rebuilded (if it is a task), and return True if task assigned will have to rebuild.

Note

This method is only for inheritance. If you have your own Dependancy, make you code here instead of in __call__.

4.2.2.2 Graph specyfic methods

Note

This methods are responsible for drawing a graph.

Dependency.extra()

Options for the links (like adding comments, or changing color) :rtype: str

Dependency.get_graph_details()

Returns graph data details (in dot language) of task object.

Return type:str
Dependency.write_graph_detailed(datalog)

Writes graph data (in dot language) to datalog file pipe.

Dependency.get_graph_name()

Returns name of dependency

Return type:str
Dependency._get_shape_color()

Returns shape of dependency.

Return type:str

4.2.3 InnerDependency

Note

This class is a base class for all the dependency that will be used as a task-to-task dependency.

Dependency.__init__(parent)
Parameters:parent – Task from which the dependency was creted.

Table Of Contents

Previous topic

4.1 Task

Next topic

4.3 Errors

This Page