lisa.wlgen.rta.RTAPhaseBase#

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

Bases: SimpleHash, Mapping, ABC

Base class for rt-app phase modelisation.

Parameters:

Attributes

__reversed__ inherited

See collections.abc.Mapping.__reversed__

Methods

__add__()

Compose two phases together by running one after the other.

__await__()

__getitem__()

Lookup the value of the given property on that phase.

__init_subclass__()

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

__iter__()

__len__()

__mul__()

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

__rmul__()

get_rtapp_repr()

rt-app JSON representation of the phase.

split_prop_kwargs()

Split the kwargs into two categories:.

with_delete_props()

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

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.

with_properties_map()

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

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.

HASH_COERCE() inherited

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

__class_getitem__() inherited

See collections.abc.Iterable.__class_getitem__()

__contains__() inherited

See collections.abc.Mapping.__contains__()

get() inherited

See collections.abc.Mapping.get()

items() inherited

See collections.abc.Mapping.items()

keys() inherited

See collections.abc.Mapping.keys()

values() inherited

See collections.abc.Mapping.values()

Attributes#

RTAPhaseBase.__reversed__ = None#

Methods#

RTAPhaseBase.__add__(other)[source]#

Compose two phases together by running one after the other.

Since this operation returns an RTAPhaseTree, it is possible to set properties on it that will only apply to its children.

RTAPhaseBase.__await__()#
RTAPhaseBase.__getitem__(key)[source]#

Lookup the value of the given property on that phase.

classmethod RTAPhaseBase.__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:.

RTAPhaseBase.__iter__()[source]#
RTAPhaseBase.__len__()[source]#
RTAPhaseBase.__mul__(n)[source]#

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

RTAPhaseBase.__rmul__(n)[source]#
abstract RTAPhaseBase.get_rtapp_repr(*, task_name, plat_info, force_defaults=False, no_force_default_keys=None, **kwargs)[source]#

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()

static RTAPhaseBase.split_prop_kwargs(kwargs, properties=None)[source]#

Split the kwargs into two categories:

  • Arguments with a name starting with prop_. They are then merged with the optional properties.

  • The others

Returns a tuple (properties, other_kwargs).

RTAPhaseBase.with_delete_props(properties)[source]#

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

RTAPhaseBase.with_phase_properties(properties)[source]#

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.

RTAPhaseBase.with_properties_map(properties, **kwargs)[source]#

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

RTAPhaseBase.with_props(**kwargs)[source]#

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

RTAPhaseBase.HASH_COERCE(x, coerce)#

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

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

classmethod RTAPhaseBase.__class_getitem__()#

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

RTAPhaseBase.__contains__()#

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

RTAPhaseBase.get()#

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

RTAPhaseBase.items()#

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

RTAPhaseBase.keys()#

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

RTAPhaseBase.values()#

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