Fix: Comprehensive CI/CD Pipeline and Code Quality Overhaul#13
Merged
Fix: Comprehensive CI/CD Pipeline and Code Quality Overhaul#13
Conversation
This commit addresses multiple CI/CD pipeline issues and improves code quality: **Configuration Fixes:** - Enhanced src/config.py with robust project root detection for pytest compatibility - Added _find_project_config() method that searches upwards for project indicators (.git, pyproject.toml, etc.) - Added _create_minimal_config() fallback for CI/CD environments - Fixed pytest configuration errors when config.yaml is not found **Type Safety Improvements:** - Resolved all mypy type checking errors across the codebase - Added proper type annotations to fix union-attr and assignment errors - Fixed TypedDict issues in benchmark.py (missing "summary" key) - Added type ignore comments for missing library stubs (textstat, requests, etc.) - Fixed strategy factory argument passing in src/strategies.py **Code Quality Enhancements:** - Ran Black formatter across entire codebase (16 files reformatted) - Fixed most flake8 linting errors including unused imports and style violations - Removed trailing whitespace and fixed line length issues - Improved import organization and removed unused dependencies **CI/CD Pipeline Updates:** - Updated GitHub Actions from deprecated v3 to v4 versions - Fixed actions/upload-artifact, actions/download-artifact, actions/cache versions - Updated codecov/codecov-action to v4 for security and compatibility **Integration Testing Improvements:** - Made examples/basic_usage.py non-interactive for CI environments - Added CI detection using environment variables (CI, GITHUB_ACTIONS) - Added automatic fallback to dummy model in CI mode - Preserved interactive functionality for local development **Technical Details:** - Fixed union type issues in benchmark.py validation methods - Added proper Dict[str, Any] type annotations for validation_report - Resolved complexity_counts type annotation issues - Fixed evaluator.py metrics and details dictionary typing - Enhanced error handling in configuration loading This comprehensive overhaul ensures the CI/CD pipeline runs reliably while maintaining code quality standards and preserving all existing functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses multiple CI/CD pipeline issues and implements comprehensive code quality improvements across the MEQ-Bench codebase.
🔧 Configuration Fixes
src/config.pywith robust project root detection that searches upwards for project indicators (.git,pyproject.toml, etc.)_create_minimal_config()for CI/CD environments whenconfig.yamlis not found🏗️ CI/CD Pipeline Improvements
actions/cache@v3→actions/cache@v4actions/upload-artifact@v3→actions/upload-artifact@v4actions/download-artifact@v3→actions/download-artifact@v4codecov/codecov-action@v3→codecov/codecov-action@v4examples/basic_usage.pynon-interactive for CI environments while preserving interactive functionality for local development🔍 Type Safety & Code Quality
🧪 Testing Enhancements
CI,GITHUB_ACTIONSenv vars)Test Plan
Breaking Changes
None - all changes are backward compatible and preserve existing functionality.
Additional Notes
This comprehensive overhaul ensures the CI/CD pipeline runs reliably while maintaining high code quality standards. The changes are designed to be non-disruptive to existing workflows while significantly improving developer experience and automated testing reliability.
🤖 Generated with Claude Code