selfdoc v0.15.1 /selfdoc.config
On this page

Config loader module that reads and validates selfdoc.json, resolves source paths, applies defaults, and raises ConfigError on missing or invalid settings.

#selfdoc.config

#selfdoc.config

Config loader for selfdoc.json.

#FieldType

Supported field types for config validation.

#FieldSpec

Specification for a single configuration field.

#ConfigError

Raised when selfdoc.json is present but invalid.

#_validate_field

python
def _validate_field(spec: FieldSpec, value, path: str) -> Any

Validate a single config value against its FieldSpec.

Returns the validated (and possibly transformed) value. Raises ConfigError on validation failure.

#_post_validate

python
def _post_validate(config: dict) -> dict

Apply cross-field validation rules after individual field validation.

Handles twitter merge, feedback at-least-one, and deploy.project conditional. Returns the modified config dict.

#load_config

python
def load_config(dir_path='.')

Load and validate selfdoc.json from dir_path.

Returns the validated config dict, or None if selfdoc.json does not exist. Raises ConfigError on malformed or invalid configuration.