Results#

exception yaflux._results.FlagError[source]#

Bases: Exception

Raised when attempting to modify a flag that has already been set.

class yaflux._results.FlagLock[source]#

Bases: ThreadSafeLock

Context manager for controlling flag mutation.

Methods

allow_mutation()

Context manager for allowing mutation.

can_mutate()

Check if the current thread is allowed to mutate.

class yaflux._results.Results[source]#

Bases: object

Dynamic container for analysis results.

_data#

The results data. Indexed by the creates items in the step definition.

Type:

dict[str, Any]

_metadata#

The metadata for each result. Indexed by the step name.

Type:

dict[str, Metadata]

Methods

get_step_metadata(step_name)

Get the metadata for a result.

get_step_results(step_name)

Get the results for a step.

set_metadata(step_name, metadata)

Set the metadata for a result.

get_step_metadata(step_name)[source]#

Get the metadata for a result.

Return type:

Metadata

get_step_results(step_name)[source]#

Get the results for a step.

Return type:

dict[str, Any]

set_metadata(step_name, metadata)[source]#

Set the metadata for a result.

class yaflux._results.ResultsLock[source]#

Bases: ThreadSafeLock

Context manager for controlling results mutation.

Methods

allow_mutation()

Context manager for allowing mutation.

can_mutate()

Check if the current thread is allowed to mutate.

exception yaflux._results.UnauthorizedMutationError[source]#

Bases: Exception

Raised when attempting to modify results outside of a step decorator.