cadrumo.application.wizard.compiler module¶
Pure projection of the wizard descriptor catalogue into profile-key records.
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 callers can safely cache the compiled profile-key
tuple when an application projection needs it.
- compile_profile_keys(flows)[source]¶
Project the wizard catalogue into application profile-key records.
- Parameters:
flows (
Sequence[WizardFlow]) – The wizard catalogue to walk.- Return type:
- Returns:
A tuple of
ProfileKeyrecords, one per distinctWizardQuestion.profile_key. None-bound questions are skipped.