manifest

Chargement et validation du manifeste OKF YAML.

OKF manifest loading and validation.

class okflint.manifest.BaseConfig(name, roots, reserved_files, external_refs)[source]

Bases: object

Documentary base configuration.

external_refs: set[str]
name: str
reserved_files: dict[str, str]
roots: list[RootConfig]
class okflint.manifest.HygieneConfig(broken_links, split_candidates, reserved_files, unknown_fields, split)[source]

Bases: object

Configuration of hygiene checks (opt-in).

reserved_files: Literal['off', 'warn', 'error']
split: SplitConfig
split_candidates: Literal['off', 'warn', 'error']
unknown_fields: Literal['off', 'warn', 'error']
class okflint.manifest.Manifest(okf_version, base, profile, hygiene)[source]

Bases: object

Loaded and validated OKF manifest.

base: BaseConfig
hygiene: HygieneConfig | None
okf_version: str | None
profile: ProfileConfig | None
exception okflint.manifest.ManifestError[source]

Bases: Exception

Invalid or unreadable OKF manifest.

class okflint.manifest.ProfileConfig(types, date_fields)[source]

Bases: object

Profile configuration of the documentary base.

date_fields: list[str]
types: dict[str, TypeConfig]
class okflint.manifest.RootConfig(path, exclude_patterns)[source]

Bases: object

Configuration of a single root in the documentary base.

exclude_patterns: list[str]
path: Path
class okflint.manifest.SplitConfig(min_lines, exempt_types, exempt_paths, tau=0.15)[source]

Bases: object

Gate configuration for the S202 semantic cohesion check.

exempt_paths: list[str]
exempt_types: frozenset[str]
min_lines: int
tau: float = 0.15
class okflint.manifest.TypeConfig(required, optional, controlled_values, aliases)[source]

Bases: object

Configuration of a concept type declared in the profile.

aliases: list[str]
controlled_values: dict[str, list[str]]
optional: list[str]
required: list[str]
okflint.manifest.load_manifest(path)[source]

Load and validate an OKF YAML manifest.

Parameters:

path (Path) – Path to the YAML file.

Return type:

Manifest

Returns:

Typed and validated Manifest.

Raises:

ManifestError – If the file is unreadable, invalid, or violates constraints.