lisa.wlgen.rta.RTAPhase#

class lisa.wlgen.rta.RTAPhase(properties=None, **kwargs)[source]#

Bases: RTAPhaseBase, ABC

Leaf in a tree of RTAPhaseTree.

Parameters:

Attributes

__reversed__ inherited

See collections.abc.Mapping.__reversed__

Properties

is_empty

True if the phase has no content and will result in an empty JSON phase(s).

phases

Topological sort of the phases in the tree, with the properties merged along each path from the root to the leaves.

Methods

get_rtapp_repr()

rt-app JSON representation of the phase.

to_json()

JSON content of the properties of the phase.

topo_sort()

Topological sort of the subtree.

HASH_COERCE() inherited

Used to coerce the values of self.__dict__ to hashable values.

__add__() inherited

Compose two phases together by running one after the other.

__await__() inherited

__class_getitem__() inherited

See collections.abc.Iterable.__class_getitem__()

__contains__() inherited

See collections.abc.Mapping.__contains__()

__getitem__() inherited

Lookup the value of the given property on that phase.

__init_subclass__() inherited

Update the docstring used as a str.format() template with the following keys:.

__iter__() inherited

__len__() inherited

__mul__() inherited

Multiply the phase by n, in order to repeat it.

__rmul__() inherited

get() inherited

See collections.abc.Mapping.get()

items() inherited

See collections.abc.Mapping.items()

keys() inherited

See collections.abc.Mapping.keys()

split_prop_kwargs() inherited

Split the kwargs into two categories:.

values() inherited

See collections.abc.Mapping.values()

with_delete_props() inherited

Delete all the given property names, equivalent to with_props(foo=delete()).

with_phase_properties() inherited

Return a cloned instance with the properties combined with the given properties using RTAPhaseProperties.__and__() (&). The properties parameter is the left operand. If properties is None, just return the phase itself.

with_properties_map() inherited

Same as with_phase_properties() but with properties passed to RTAPhaseProperties.from_polymorphic() first.

with_props() inherited

Same as with_phase_properties() but using keyword arguments to set each property. The resulting dictionary is passed to RTAPhaseProperties.from_polymorphic() first.

Attributes#

RTAPhase.__reversed__ = None#

Properties#

property RTAPhase.is_empty[source]#

True if the phase has no content and will result in an empty JSON phase(s).

property RTAPhase.phases#

Topological sort of the phases in the tree, with the properties merged along each path from the root to the leaves.

Methods#

RTAPhase.get_rtapp_repr(task_name, plat_info, force_defaults=False, no_force_default_keys=None, **kwargs)#

rt-app JSON representation of the phase.

Parameters:
  • task_name (str) – Name of the task this phase will be attached to.

  • plat_info (lisa.platforms.platinfo.PlatformInfo) – Platform information used to compute default properties and validate them.

  • force_defaults (bool) – If True, a default value will be provided for all properties that are not set. If False, the defaults will not be provided if the user-provided properties don’t touch a given JSON key.

  • no_force_default_keys (list(str) or None) – List of JSON keys for which no default will be emitted when force_defaults=True.

Variable keyword arguments:

Forwarded to RTAPhase.to_json()

RTAPhase.to_json(**kwargs)[source]#

JSON content of the properties of the phase.

RTAPhase.topo_sort()[source]#

Topological sort of the subtree.

Return type:

list(RTAPhase)

The merge of :class`PhaseProperties` object is done from root to leaf (pre-order traversal). This is important for some classes that are not semigroup like OverridenProperty.

RTAPhase.HASH_COERCE(x, coerce)#

Inherited method, see lisa.utils.SimpleHash.HASH_COERCE()

Used to coerce the values of self.__dict__ to hashable values.

RTAPhase.__add__(other)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.__add__()

Compose two phases together by running one after the other.

RTAPhase.__await__()#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.__await__()

classmethod RTAPhase.__class_getitem__()#

Inherited method, see collections.abc.Iterable.__class_getitem__()

RTAPhase.__contains__()#

Inherited method, see collections.abc.Mapping.__contains__()

RTAPhase.__getitem__(key)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.__getitem__()

Lookup the value of the given property on that phase.

classmethod RTAPhase.__init_subclass__(**kwargs)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.__init_subclass__()

Update the docstring used as a str.format() template with the following keys:.

RTAPhase.__iter__()#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.__iter__()

RTAPhase.__len__()#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.__len__()

RTAPhase.__mul__(n)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.__mul__()

Multiply the phase by n, in order to repeat it.

RTAPhase.__rmul__(n)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.__rmul__()

RTAPhase.get()#

Inherited method, see collections.abc.Mapping.get()

RTAPhase.items()#

Inherited method, see collections.abc.Mapping.items()

RTAPhase.keys()#

Inherited method, see collections.abc.Mapping.keys()

static RTAPhase.split_prop_kwargs(kwargs, properties=None)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.split_prop_kwargs()

Split the kwargs into two categories:.

RTAPhase.values()#

Inherited method, see collections.abc.Mapping.values()

RTAPhase.with_delete_props(properties)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.with_delete_props()

Delete all the given property names, equivalent to with_props(foo=delete()).

RTAPhase.with_phase_properties(properties)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.with_phase_properties()

Return a cloned instance with the properties combined with the given properties using RTAPhaseProperties.__and__() (&). The properties parameter is the left operand. If properties is None, just return the phase itself.

RTAPhase.with_properties_map(properties, **kwargs)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.with_properties_map()

Same as with_phase_properties() but with properties passed to RTAPhaseProperties.from_polymorphic() first.

RTAPhase.with_props(**kwargs)#

Inherited method, see lisa.wlgen.rta.RTAPhaseBase.with_props()

Same as with_phase_properties() but using keyword arguments to set each property. The resulting dictionary is passed to RTAPhaseProperties.from_polymorphic() first.