Classes
BaseValidator
abstract
Base class for all health check validators.
Each validator should:
1. Have a clear name (e.g., "Na…
BaseValidator
abstract Base class for all health check validators.
Each validator should:
- Have a clear name (e.g., "Navigation", "Cache Integrity")
- Implement validate() to return a list of CheckResult objects
- Be fast (target: < 100ms for most validators)
- Be independent (no dependencies on other validators)
Inherits from
ABCAttributes
| Name | Type | Description |
|---|---|---|
name |
str |
|
description |
str |
|
enabled_by_default |
bool |
Methods 2
validate
Run validation checks and return results.
validate
def validate(self, site: Site, build_context: BuildContext | Any | None = None) -> list[CheckResult]
Run validation checks and return results.
Parameters 2
site |
Site |
The Site object being validated |
build_context |
BuildContext | Any | None |
Optional BuildContext with cached artifacts (e.g., knowledge graph). Use Any in type hint to avoid circular imports at runtime. |
Returns
List of CheckResult objects (errors, warnings, info, or success)list[CheckResult]
—
is_enabled
Check if this validator is enabled in config.
is_enabled
def is_enabled(self, config: dict[str, Any]) -> bool
Check if this validator is enabled in config.
Parameters 1
config |
dict[str, Any] |
Site configuration dictionary |
Returns
True if validator should runbool
—
Internal Methods 1
__repr__
__repr__
def __repr__(self) -> str
Returns
str