evariste.plugins.action

Actions performed to compile files.

The result of an action (Was it sucessful? Which files were used? What is the log? etc.) is stored as a report.

If you plan to write your own action plugin, see Write action plugins.

Action

class evariste.plugins.action.Action(shared)[source]

Generic action

Subclass this to create a new action (see Write action plugins).

abstract compile(path: Tree) Report[source]

Compile path.

This function must be thread-safe. It can use Action.lock if necessary.

lock: threading.Lock = <unlocked _thread.lock object>

A lock shared by every action. Can be used for parts of the compilation which are not thread-safe.

match(value: Tree) bool[source]

Return True if value can be compiled by this action.

plugin_type: str = 'action'

Type of the plugin. Plugins of the same type gather some common behaviour.

Report

class evariste.plugins.action.Report(path, targets=None, success=False, log=None, depends=None)[source]

Report of an action. Mainly a namespace with very few methods.

property full_depends: Set[Path]

Set of files this action depends on, including self.path.

property success: bool

Was compilation sucessful?