You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement singleton pattern for SecureExpressionEvaluator (#105)
* feat: implement singleton pattern for SecureExpressionEvaluator
Added performance optimization through singleton pattern implementation:
• **Singleton Pattern**: Replaced per-call SecureExpressionEvaluator() instantiation
with get_secure_expression_evaluator() singleton access for improved performance
• **Performance Benefits**: Eliminates expensive object initialization overhead on
every expression evaluation while maintaining thread safety
• **API Compatibility**: Updated evaluate_expression_safely() and validate_expression_safety()
to use singleton pattern while preserving existing function interfaces
• **Testing Support**: Added reset_secure_expression_evaluator() function for test
isolation and create_secure_expression_evaluator() factory function
• **Memory Efficiency**: Single evaluator instance reused across all expression
operations instead of creating new instances repeatedly
• **Quality Assurance**: All 997 tests passing with ruff and mypy compliance maintained
This follows the same singleton pattern established for session management, providing
consistent architecture patterns and improved resource utilization for expression-heavy
operations throughout DataBeak.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Interim commit for session dependency injection cleanup
* feat: implement comprehensive Pandera validation integration
Major enhancements to validation system:
- Added pandera dependency for industry-standard validation framework
- Replaced ColumnValidationRules with comprehensive Pandera Field/Check capabilities
- Implemented Pandera validation logic replacing manual validation
- Enhanced documentation with official Pandera API references
- Removed duplicate functionality (unused pandera_schemas module, 179 tests)
- Streamlined ValidationError model (removed 9 legacy fields)
- Updated all validation tests for new Pandera field names
Quality verification:
- MyPy: Perfect compliance (validation components)
- Tests: All 41 validation tests passing
- Functionality: Robust validation using industry-standard framework
This establishes DataBeak validation on professional-grade Pandera framework
with comprehensive rule coverage and clean architecture.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: add pandera to mypy pre-commit dependencies
Resolves mypy hook failure by adding pandera>=0.22.0 to the mypy
additional_dependencies list in pre-commit configuration.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: improve YAML formatting in pre-commit config
Breaks long description lines to comply with yamllint line length rules
using proper YAML multi-line format.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: improve pre-commit configuration and markdown formatting
- Remove docformatter from pre-commit hooks to eliminate ruff conflicts
- Add py.typed marker file for proper MyPy module resolution
- Configure MyPy pre-commit hook to check source only, add local package dependency
- Add mdformat-ruff integration for consistent Python code block formatting
- Apply comprehensive mdformat fixes across all project documentation
- Update quality-gate-runner documentation to remove docformatter references
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: implement singleton patterns for session and settings management
- Centralize SessionManager creation with thread-safe singleton
- Implement singleton pattern for DataBeakSettings initialization
- Standardize get_session_manager() calls across all servers
- Remove redundant SessionManager instantiations
- Improve dependency injection patterns throughout codebase
- Reduce code duplication and ensure consistent state management
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Final bug fixes and tweaks
* Reset is also thread-safe
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments