Release v0.3.1
π FastAPI Testing v0.3.1
Code Quality & Testing Enhancement Release
This release significantly improves code quality, testing coverage, and development experience while maintaining full backward compatibility.
β¨ What's New
- Modern Code Formatting: Integrated [Ruff](https://github.com/astral-sh/ruff) as the primary code formatter and linter
- Comprehensive Test Coverage: Added extensive edge case and real-world scenario tests
- Enhanced CI/CD: Improved workflow reliability with better test coverage reporting
- Modern Python Syntax: Updated to Python 3.11+ type annotations throughout the codebase
π§ͺ Testing Improvements
- Edge Case Coverage: New tests for port exhaustion, invalid ranges, and connection failures
- WebSocket Testing: Enhanced WebSocket tests with type error handling and timeout scenarios
- Server Lifecycle: Comprehensive tests for server startup, shutdown, and error conditions
- Configuration Testing: Full coverage of environment variable handling and validation
- Concurrent Operations: Tests for multiple simultaneous connections and requests
π§ Code Quality Enhancements
- Type Annotations: Modernized to use
list[T]instead ofList[T]syntax - Error Handling: Replaced try/except blocks with
contextlib.suppresswhere appropriate - Import Organization: Consistent import sorting and organization across all files
- Code Formatting: Standardized formatting with Ruff configuration
- Documentation: Updated with project badges and improved README
π¦ Development Tools
- Ruff Integration: Comprehensive linter and formatter configuration
- CI Improvements: Enhanced GitHub Actions workflows with better test reporting
- Code Coverage: Improved coverage reporting with Codecov integration
π Migration Notes
This release is fully backward compatible. No changes are required for existing users. The API remains unchanged while the internal code quality has been significantly improved.
π― Benefits for Contributors
- Faster Development: Automated code formatting with Ruff
- Better Testing: Comprehensive test suite covering edge cases
- Consistent Style: Enforced code style across the entire codebase
- Modern Practices: Updated to contemporary Python development standards