Skip to content

Conversation

@selimfirat
Copy link
Member

Kaira v0.2.1 Release

Release Date: June 15, 2025

This release focuses on improving code quality, expanding test coverage, and enhancing the development experience with better CI/CD pipeline and documentation improvements.

🚀 Key Highlights

New Features

  • Comprehensive Test Suite: Enhanced SSIM and EVM metrics testing with stateful methods and error handling
  • PlottingUtils Module: Centralized plotting utilities for consistent visualization
  • Enhanced CI/CD Pipeline: Improved caching, error handling, and BPG tools installation reliability

Major Improvements

  • Code Quality: Refactored codebase with improved structure and readability
  • Documentation: Enhanced guidelines and better visualizations for FEC/LDPC examples
  • Development Experience: Better path handling, error messages, and mock file handling

Bug Fixes

  • Installation: Fixed BPG download links and system dependencies
  • Core Functionality: Improved file operations and setup process
  • Testing: More stable test execution with better isolation

Breaking Changes

  • CapacityAnalyzer Removal: Removed for improved code organization

📋 Changes Summary

This PR includes all the changes documented in the CHANGELOG.md for version 0.2.1:

  • Comprehensive test suite additions
  • PlottingUtils module implementation
  • CI/CD pipeline enhancements
  • Code refactoring and cleanup
  • Bug fixes for installation and core functionality
  • Documentation improvements

🎯 Migration Notes

Users upgrading from v0.2.0 should note the removal of CapacityAnalyzer and update their code accordingly.

✅ Checklist

  • Version updated to 0.2.1 in version.py
  • CHANGELOG.md updated with all changes
  • All tests passing
  • Documentation updated
  • Breaking changes documented

Ready for review and merge to create the v0.2.1 release.

… to Comments #34

feat: Refactor plotting code and improve example readability

- Created a new utilities module for reusable plotting functions in .
- Refactored 11 example files to utilize the new plotting utilities, enhancing code organization and readability.
- Converted print statements to structured comments for better documentation.
- Removed  conditionals, streamlining plotting integration.
- Maintained full functionality of visualizations while improving code clarity and separation of concerns.
- Established a consistent commenting structure across examples.
- Documented progress and future enhancements for ongoing refactoring efforts.
… to Comments #34

Enhance visualization and utility functions

- Updated BenchmarkVisualizer to use custom color maps for throughput and execution time bar plots.
- Refactored visualize_metrics_comparison to simplify bar plotting logic and improve error handling.
- Improved SoftBitEnsembleThresholder to handle weight normalization more robustly.
- Added validation for code_length and code_dimension in LDPCCodeEncoder, ensuring proper error messages for missing parameters.
- Introduced PlottingUtils class for centralized plotting utilities, including functions for LDPC matrix comparison, BER performance, and more.
- Added comprehensive plotting functions for signal analysis, channel effects, and capacity analysis.
- Updated variable names for clarity and consistency in modulation examples.
- Ensured SNR values are explicitly converted to float where necessary.
- Improved type hints for functions returning matplotlib figures and axes.
- Refactored noise variance handling in demodulators to ensure proper tensor usage.
- Added numpy array conversion in PolarCodeEncoder for rank handling.
- Removed deprecated QAM modulation example and replaced it with a new implementation.
- Enhanced plotting functions to return both figure and axes for better usability.
- Updated comments and documentation for clarity and consistency across examples.
…ils methods

- Replaced direct plotting function calls with PlottingUtils methods in various examples.
- Enhanced signal property measurement and power constraint analysis in `plot_basic_constraints.py`.
- Updated performance metrics visualization in `plot_performance_metrics.py` and `plot_signal_metrics.py`.
- Improved FEC blockwise processing visualizations in `plot_fec_blockwise_processing.py`.
- Refined FEC encoders tutorial and visualization in `plot_fec_encoders_tutorial.py`.
- Enhanced LDPC advanced visualization and simulation in `plot_fec_ldpc_advanced_visualization.py` and `plot_fec_ldpc_simulation.py`.
- Added new plotting methods for belief propagation, blockwise operations, and Hamming code visualizations in `kaira/utils/plotting.py`.
…enhance tooltip descriptions, and improve comment formatting in various example scripts.
…onality

- Implemented a new method `close_all_figures` in PlottingUtils to close all matplotlib figures and free memory.
- Updated `setup_plotting_style` to suppress warnings about too many open figures in testing environments.
- Enhanced `plot_ldpc_matrix_comparison` to handle cases with all zero values by using a linear scale.
- Modified boxplot labels in `plot_latency_distribution` for better clarity.
- Created a comprehensive test suite for the PlottingUtils class, achieving 100% code coverage.
- Included tests for various plotting methods, edge cases, and error handling scenarios.
… model, including model configuration, evaluation, visualization, and performance comparison across different channels.
- Improved OFDM signal analysis with comprehensive plots for I/Q components, instantaneous power, constellation, and power distribution.
- Added detailed MIMO constraint analysis with per-antenna power and PAPR comparisons.
- Updated FEC decoder tutorial to clarify concepts and improve output formatting.
- Enhanced LDPC visualization with improved Tanner graph and added GIF animations for belief propagation iterations.
- Introduced GIF animations for successive cancellation decoding process in polar codes.
…ses in CapacityAnalyzer

- Implement tests for processing SNR for mutual information with various modulators and channel types.
- Add tests for estimating mutual information with real signals and edge cases.
- Include tests for parallel processing and caching functionality.
- Enhance error handling tests for modulators and channels without state_dict.
- Validate numerical stability in binary entropy and MIMO capacity calculations.
- Cover additional edge cases and scenarios for complete test coverage.
… directory, improve dependency checks, and enhance error handling during compilation.
… integration examples; improve comments and remove unnecessary print statements in FEC tutorials.
…t checks, error handling, and installation verification; ensure non-critical failures do not halt the process.
…m dependency installation, and implementing multiple download sources for BPG. Include better error handling and logging during the installation process.
- Removed unnecessary print statements from plot_channel_aware_base_model.py to streamline output.
- Updated plot_fec_decoders_tutorial.py and plot_fec_encoders_tutorial.py by removing redundant section headers for better readability.
- Added comprehensive tests for Structural Similarity Index Measure (SSIM) and Multi-Scale SSIM (MS-SSIM) metrics, ensuring various scenarios are covered.
- Introduced Error Vector Magnitude (EVM) metric tests, including basic computation, edge cases, and stateful methods.
- Enhanced Bit Error Rate (BER) tests to cover stateful methods and complex data handling.
- Improved test coverage for Signal-to-Noise Ratio (SNR) and Block Error Rate (BLER) metrics, addressing edge cases and ensuring robustness.
Copilot AI review requested due to automatic review settings June 15, 2025 00:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prepares the v0.2.1 release by integrating centralized plotting utilities across examples, cleaning up documentation and examples, and strengthening the CI/CD pipeline with robust BPG tooling support.

  • Integrated PlottingUtils and safe conversion helpers in example scripts for consistent visuals
  • Updated docs to remove deprecated CapacityAnalyzer entries, bump versions, and correct installation links
  • Enhanced CI/CD workflows with BPG caching, multi-source installation fallback, and stronger validation

Reviewed Changes

Copilot reviewed 74 out of 74 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
examples/channels/plot_composite_channels.py Convert heatmap tick labels to strings and guard colorbar usage
examples/channels/plot_binary_channels.py Added PlottingUtils style setup and refactored visual flows
docs/installation.rst Fixed BPG download tarball name
docs/conf.py Bumped project version to 0.2.1
.github/workflows/tests.yml Added BPG tools cache, installation steps, and validation logs
Comments suppressed due to low confidence (2)

.github/workflows/tests.yml:45

  • The BPG installation logic is duplicated in both tests.yml and ci.yml. Consider extracting these steps into a single reusable workflow or composite action to avoid divergence.
- name: Cache BPG tools

docs/contributing.rst:90

  • The pre-commit step was removed but no replacement guidance was provided. Update the contributing guide to reflect the current recommended linting or formatting checks.
- Run pre-commit checks: `pre-commit run -a`

python -c "import kaira; print(f'Kaira version: {kaira.__version__}')" || echo "⚠️ Kaira not importable"
echo "📊 Installed packages:"
echo "� Validating BPG tools..."
Copy link

Copilot AI Jun 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove or replace the invalid leading replacement character () before the message so the echo statement reads correctly.

Suggested change
echo " Validating BPG tools..."
echo "🔍 Validating BPG tools..."

Copilot uses AI. Check for mistakes.
echo "❌ BPG tools not found in PATH"
fi
echo "�📊 Installed packages:"
Copy link

Copilot AI Jun 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial character appears unintended. Please remove it or replace with a valid emoji/literal.

Suggested change
echo "📊 Installed packages:"
echo "📦📊 Installed packages:"

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Jun 15, 2025

@selimfirat selimfirat merged commit 755ccc9 into main Jun 15, 2025
20 checks passed
@selimfirat selimfirat deleted the release/v0.2.1 branch June 15, 2025 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants