|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## [0.1.13] - 2025-01-19 |
| 4 | + |
| 5 | +### 🏗️ **Architecture Improvements** |
| 6 | + |
| 7 | +### Added |
| 8 | +- **Dependency Injection System**: Implemented comprehensive DI container (`container.py`) for better testability and modularity |
| 9 | + - Support for singleton, factory, and transient service lifetimes |
| 10 | + - Scoped containers for isolated testing |
| 11 | + - Automatic dependency resolution with type checking |
| 12 | +- **Focused Component Architecture**: Broke down monolithic classes into single-responsibility components |
| 13 | + - `PromptLoader`: Handles prompt loading and caching logic |
| 14 | + - `VariableValidator`: Manages schema validation and type checking |
| 15 | + - `TemplateRenderer`: Processes Jinja2 template rendering |
| 16 | + - `VersionManager`: Manages prompt versioning logic |
| 17 | + - `ModelConfigBuilder`: Builds model configurations for different providers |
| 18 | +- **Standardized Exception Hierarchy**: Comprehensive custom exception system (`exceptions.py`) |
| 19 | + - Base `PromptixError` class with structured error details |
| 20 | + - Specialized exceptions for different error categories (validation, storage, tools, etc.) |
| 21 | + - Enhanced error messages with contextual information and debugging details |
| 22 | + - Support for error chaining and detailed error reporting |
| 23 | + |
| 24 | +### Changed |
| 25 | +- **Refactored Main Classes**: `Promptix` and `PromptixBuilder` classes now use dependency injection |
| 26 | + - Maintained backward compatibility while improving internal structure |
| 27 | + - Better separation of concerns following Single Responsibility Principle |
| 28 | + - Enhanced testability through dependency injection |
| 29 | +- **Improved Error Handling**: Consistent error handling patterns across the entire codebase |
| 30 | + - All components now use standardized exceptions |
| 31 | + - Better error context and debugging information |
| 32 | + - Graceful error recovery where appropriate |
| 33 | + |
| 34 | +### Technical Improvements |
| 35 | +- **Better Testability**: All components can be easily mocked and tested in isolation |
| 36 | +- **Improved Maintainability**: Clear separation of responsibilities makes code easier to understand and modify |
| 37 | +- **Enhanced Modularity**: Components can be replaced or extended without affecting other parts of the system |
| 38 | +- **Type Safety**: Enhanced type checking throughout the dependency injection system |
| 39 | +- **Logging Integration**: Better logging integration across all components |
| 40 | + |
| 41 | +### Backward Compatibility |
| 42 | +- All existing public APIs remain unchanged |
| 43 | +- Existing code will continue to work without modifications |
| 44 | +- Internal refactoring does not affect end-user experience |
| 45 | + |
| 46 | +### Developer Experience |
| 47 | +- Cleaner, more maintainable codebase |
| 48 | +- Better error messages with actionable information |
| 49 | +- Improved debugging capabilities through structured error details |
| 50 | +- Enhanced testing infrastructure for better reliability |
| 51 | + |
3 | 52 | ## [0.1.12] - 2025-01-19 |
4 | 53 |
|
5 | 54 | ### 🚨 BREAKING CHANGES |
|
0 commit comments