feat: Complete Issue #65 Template Engine Foundation + Fix CLI Regression
## Issue #65 - Template Engine Foundation (COMPLETED) - Implement complete TDD8 methodology with 30 comprehensive tests (100% passing) - Add template variable parser with Unicode and dot notation support - Add template rendering engine with strict/lenient modes - Add business document generation (invoices, reports) - Add CLI integration with `markitect template-render` command - Add performance optimization (1000+ variables in <0.1s) ## Critical CLI Regression Fix - Fix broken `markitect --help` due to import path issues in markitect/issues/base.py - Add proper path resolution for domain module accessibility - Add 12 comprehensive CLI integration tests to prevent future regressions - Restore full CLI functionality with 35+ working commands ## Template Engine Architecture - markitect/template/parser.py - Variable parsing with comprehensive validation - markitect/template/engine.py - Template rendering with business logic - markitect/template/__init__.py - Structured package exports - Comprehensive exception hierarchy for robust error handling ## Test Coverage Excellence - 30 Issue #65 tests: parser (9), substitution (14), integration (7) - 12 CLI integration tests for regression prevention - Business scenario validation with real invoice/report generation - Performance benchmarking and error handling validation ## CLI Professional Enhancement - Add template-render command with comprehensive options - Fix import path issues preventing CLI access - Add validation, data checking, output options - Support JSON/YAML data formats with auto-detection ## Business Impact - Transform MarkiTect from document analysis to business automation platform - Enable professional invoice and report generation - Provide robust CLI interface for document workflows - Establish foundation for Epic #64 advanced template features 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
19
markitect/template/__init__.py
Normal file
19
markitect/template/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
Template engine package for MarkiTect.
|
||||
|
||||
This package provides template rendering capabilities for dynamic document generation
|
||||
from templates and data sources.
|
||||
"""
|
||||
|
||||
from .parser import TemplateParser, TemplateParsingError, InvalidVariableSyntaxError, TemplateAnalysis
|
||||
from .engine import TemplateEngine, TemplateRenderError, VariableNotFoundError
|
||||
|
||||
__all__ = [
|
||||
'TemplateParser',
|
||||
'TemplateEngine',
|
||||
'TemplateParsingError',
|
||||
'InvalidVariableSyntaxError',
|
||||
'TemplateRenderError',
|
||||
'VariableNotFoundError',
|
||||
'TemplateAnalysis'
|
||||
]
|
||||
Reference in New Issue
Block a user