Skip to content

symfonic.cli.init_template

init_template

Template-tree walking, per-file component gating, and the render context.

Split out of :mod:symfonic.cli.init (334 lines against the 300-line budget). init owns the scaffold pass -- locate the templates, write the tree, print next steps. This module owns the two decisions that pass makes for every file: what context a .j2 file is rendered with, and whether the file belongs to a component the caller did not select.

Both are pure functions of their arguments, which is what makes them worth reading on their own: the component-gating rules in _should_skip are the half of symfonic init most likely to be wrong for a new component.