4.1 Task

4.1.1 Overall

class task.Dependency

Note

This attributes and methods are basic task configuration.

Task.dependencys

List of all dependecys. This attribute must be reimplemented.

Task.output_file

Path to a file which will be created. This file will be checked testing which file is newwer.

Task.build()

What to do with this task to rebuild it. This method needs to be reimplemented after inheriting.

4.1.2 Dependency methods

Note

This methods creates dependency, that can be used in different tasks.

classmethod Task.dependency_FileExists()

Dependency that will run this task if not crated before.

Returns:dependency
classmethod Task.dependency_FileChanged()

Dependency that will run this task if nessesery and return True if file is newwer then task.output_file.

Returns:dependency

4.1.3 Inner methods

Note

This methods describe how the inner mechanizm works. This section is only for advaced users.

classmethod Task.name()
Returns:name of the tasks provided by class value _name, or just classname if _name is None.
Return type:str
classmethod Task._get_runned()

Was this task runned.

classmethod Task._set_runned(value)

Sets runned flag.

Parameters:value – bool flag
classmethod Task.test_dependencys([dependency_force=False])

Test all dependency of the task and rebuild the dependency tasks.

Parameters:dependency_force – force dependency of task to rebuild
Returns:True if this task needs to be rebuilded.
Return type:bool
classmethod Task.run([log_uptodate=True, force=False, dependency_force=False, parent=None])

Test dependency of this task, and rebuild it if nessesery.

Parameters:
  • log_uptodate – show ‘task is up to date’ information
  • force – force task to rebuild
  • dependency_force – force dependency of task to rebuild
  • parent – parent task which invoked this one
Returns:

True if this task needs to be rebuilded.

Return type:

bool

4.1.4 Graph specyfic methods

Note

This methods are responsible for drawing a graph.

classmethod Task.write_graph_detailed(datalog)

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

classmethod Task.get_graph_details()

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

Return type:str

Table Of Contents

Previous topic

3. Command line

Next topic

4.2 Dependency

This Page