simplebench.reporters.reporter.prioritized module🔗

Reporter Priority class for managing prioritized reporter options.

class simplebench.reporters.reporter.prioritized.Prioritized(
*,
reporter: ReporterProtocol | Reporter,
choice: Choice,
case: Case,
)[source]🔗

Bases: object

Class for managing prioritized reporter options.

This class encapsulates the prioritized options for a reporter, determining the effective configuration based on the choice and case provided. It retrieves prioritized settings such as default targets, subdirectory, file suffix, uniqueness, append mode, and reporter options based on the hierarchy of case-specific, choice-specific, and reporter default values.

It collates the relevant values from the various Reporter().get_prioritized_… methods and makes them accessible as proxied attributes of the Prioritized instance.

default_targets🔗

The prioritized default targets.

Type:

frozenset[Target]

subdir🔗

The prioritized subdirectory for report files.

Type:

str

file_suffix🔗

The prioritized file suffix for report files.

Type:

str

file_unique🔗

The prioritized uniqueness flag for report files.

Type:

bool

file_append🔗

The prioritized append mode flag for report files.

Type:

bool

options🔗

The prioritized reporter options.

Type:

ReporterOptions

Initialize the Prioritized class with choice and case.

Parameters:
  • reporter (Reporter) – The Reporter instance.

  • choice (Choice) – The Choice instance specifying the report configuration.

  • case (Case) – The Case instance for which the report is being generated.

property default_targets: frozenset[Target]🔗

Get the prioritized default targets.

property file_append: bool🔗

Get the prioritized append mode flag for report files.

property file_suffix: str🔗

Get the prioritized file suffix for report files.

property file_unique: bool🔗

Get the prioritized uniqueness flag for report files.

property options: ReporterOptions🔗

Get the prioritized reporter options.

property subdir: str🔗

Get the prioritized subdirectory for report files.