Kida Report
Version updated for https://github.com/lbliii/kida to version v0.4.0.
- This action is used across all versions by ? repositories.
Action Type
This is a Composite action.
Go to the GitHub Marketplace to find the latest changes.
Action Summary
Kida is a versatile template engine that compiles to Python AST and renders content for multiple outputs, including HTML, terminal, markdown, and CI reports, while scaling efficiently across Python’s free-threaded environments. It automates and streamlines the generation of dynamic content, such as test reports or user interfaces, by providing a unified syntax and built-in templates for popular tools like pytest and coverage. Its key capabilities include template inheritance, reusable components, pattern matching, streaming, and integration with GitHub Actions for automating CI/CD workflows.
What’s Changed
v0.4.0
Released 2026-04-10.
Kida 0.4.0 is the biggest feature release since the project’s inception — list comprehensions, error boundaries, i18n with Babel extraction, scoped slots, and a two-phase partial evaluator that widens the compile-time optimization surface.
Highlights
- List comprehensions —
[x.name for x in users if x.active]works natively in template expressions. - Error boundaries —
{% boundary %}blocks catch render errors and fall back to safe defaults without aborting the whole page. - i18n
{% trans %}blocks — Full internationalization support with pluralization, variable interpolation, and Babel-compatible message extraction. - Scoped slots — Components can expose data back to the caller via
{% slot name expose x, y %}. - Two-phase partial evaluator — Constant folding, dead branch elimination, and loop unrolling at compile time for measurable render speedups.
Added
Expressions
- List comprehensions —
[expr for var in iterable if condition]with full parser, compiler, analysis (dependency tracking, purity), and CLI integration. (#62)
Template Control Flow
- Error boundaries —
{% boundary %}...{% fallback %}...{% endboundary %}catches exceptions during rendering and substitutes fallback content. Integrates with the environment’s error handler. (#61) - Scoped slots —
{% slot name expose x, y %}lets parent components bind slot-exposed variables, enabling inversion-of-control patterns. (#61)
Internationalization
{% trans %}/{% pluralize %}blocks — Mark translatable strings with variable interpolation and plural forms. The compiler generatesgettext/ngettextcalls. (#61)- Babel extraction —
kida.babel.extractentry point letspybabel extractpull translatable strings from Kida templates. (#63) kida i18nCLI —kida i18n extractandkida i18n analyzecommands for standalone message extraction and translation coverage analysis. (#63)- Analysis integration — i18n analysis module tracks translatable strings, detects missing translations, and integrates with the dependency and purity analyzers. (#63)
Compiler
- Partial evaluator phase 1 — Constant folding, filter inlining for pure built-in filters,
dead branch elimination, and loop unrolling for small static iterables. Configurable via
Environment(partial_eval=True)with per-strategy controls. (#64) - Partial evaluator phase 2 — Extends optimization to conditional expressions, nested structures, string operations, comprehension folding, and cross-block constant propagation. (#65)
kida compile --optimizeCLI — Inspect the optimized AST and see before/after comparisons. (#64, #65)
Changed
- Performance docs — Updated to cover partial evaluation strategies and benchmarks. (#64)
- Compiler docs — New sections on the optimization pipeline and custom filter purity. (#64)
- Configuration docs — Documents
partial_evaland related environment options. (#64)
Upgrade Notes
- No breaking changes. Drop-in upgrade from 0.3.4.
- Partial evaluation is opt-in — enable with
Environment(partial_eval=True). - i18n requires no new dependencies; Babel integration is optional.
- GitHub Action version tag updated to
@v0.4.0.