domino_admin_toolkit.analyzers.base module

pydantic model domino_admin_toolkit.analyzers.base.AnalyzerBase

Bases: _AnalyzerCommon, Generic[TRow]

Base class for row-level analyzers. The Runner iterates DataFrame rows and calls analyze() once per row dict.

Type parameter TRow is the static type of data passed to analyze(). At runtime the Runner passes one row as a dict (from DataFrame.iterrows()); bind TRow to that row type (often a TypedDict). Use AnalyzerBase[dict[str, Any]] for untyped legacy checks until migrated.

Fields:

abstract analyze(data)

Analyzes one row and returns a list of CheckResult instances.

Return type:

list[CheckResult]

Args:

data: One row dict (TRow). The Runner calls this once per DataFrame row.

Returns:

List[CheckResult]: A list containing the results of the analysis.

Raises:

NotImplementedError: If this method is not implemented by subclasses.

pydantic model domino_admin_toolkit.analyzers.base.AnalyzerBase

Bases: _AnalyzerCommon, Generic[TRow]

Base class for row-level analyzers. The Runner iterates DataFrame rows and calls analyze() once per row dict.

Type parameter TRow is the static type of data passed to analyze(). At runtime the Runner passes one row as a dict (from DataFrame.iterrows()); bind TRow to that row type (often a TypedDict). Use AnalyzerBase[dict[str, Any]] for untyped legacy checks until migrated.

Fields:

abstract analyze(data)

Analyzes one row and returns a list of CheckResult instances.

Return type:

list[CheckResult]

Args:

data: One row dict (TRow). The Runner calls this once per DataFrame row.

Returns:

List[CheckResult]: A list containing the results of the analysis.

Raises:

NotImplementedError: If this method is not implemented by subclasses.

pydantic model domino_admin_toolkit.analyzers.base.AnalyzerBase

Bases: _AnalyzerCommon, Generic[TRow]

Base class for row-level analyzers. The Runner iterates DataFrame rows and calls analyze() once per row dict.

Type parameter TRow is the static type of data passed to analyze(). At runtime the Runner passes one row as a dict (from DataFrame.iterrows()); bind TRow to that row type (often a TypedDict). Use AnalyzerBase[dict[str, Any]] for untyped legacy checks until migrated.

Fields:

abstract analyze(data)

Analyzes one row and returns a list of CheckResult instances.

Return type:

list[CheckResult]

Args:

data: One row dict (TRow). The Runner calls this once per DataFrame row.

Returns:

List[CheckResult]: A list containing the results of the analysis.

Raises:

NotImplementedError: If this method is not implemented by subclasses.

pydantic model domino_admin_toolkit.analyzers.base.DataFrameAnalyzerBase

Bases: _AnalyzerCommon

Base class for analyzers that operate on a full DataFrame (aggregate/cross-row analysis).

Deliberately a separate hierarchy from AnalyzerBase — row vs. DataFrame iteration is a control-flow difference, not a typing difference. The Runner’s check_df() / check_and_present_df() methods accept only DataFrameAnalyzerBase subclasses and pass the full DataFrame to analyze() once (no row iteration). Passing a DataFrameAnalyzerBase subclass to check() / check_any() raises TypeError at runtime.

Use for checks that compute aggregates, percentiles, or cross-row correlations where per-row analysis is unnatural. For per-row threshold checks, use AnalyzerBase[SomeTypedDict].

Fields:

abstract analyze(data)

Analyzes the full DataFrame and returns a list of CheckResult instances.

Return type:

list[CheckResult]

Args:

data: The full DataFrame. Called once per check_df() invocation.

Returns:

List[CheckResult]: A list containing the results of the analysis.

Raises:

NotImplementedError: If this method is not implemented by subclasses.