aeat.application.wizard._compiler module

Pure projection of the wizard descriptor catalogue into the PROFILE_KEYS registry shape.

compile_profile_keys walks every WizardFlow in the catalogue, emits one ProfileKey per distinct WizardQuestion.profile_key, and derives the requirement flag plus the conditional required_when_* pair from the question’s required and visible_when declarations. The function is import-time pure: it performs no file I/O, no environment lookups, and no side effects, so PROFILE_KEYS can be assigned to its output at module-load time.

compile_profile_keys(flows)[source]

Project the wizard catalogue into the PROFILE_KEYS shape.

Parameters:

flows (Sequence[WizardFlow]) – The wizard catalogue to walk.

Return type:

tuple[ProfileKey, ...]

Returns:

A tuple of ProfileKey records, one per distinct WizardQuestion.profile_key. None-bound questions are skipped.