v2.0.0
Pre-release📌 Refactor & Enhance dbus-opendtu
Hi Team! 👋
This release introduces a series of improvements and refactorings to the dbus-opendtu
project. The main highlights include enhanced code readability, better testing coverage, and streamlined business logic. Here’s a detailed breakdown:
✨ Main Changes:
-
🧪 Added Unit Tests:
- Implemented unit tests for core functionalities.
- Mocked
requests.get
to simulate different responses for robust testing scenarios. - Configured different test scenarios for comprehensive test coverage.
-
🔄 Business Logic Updates:
- Refactored the main Python file for better readability.
- Centralized update triggers to avoid service-based updates for a more modular design.
🔧 Refactoring Highlights:
-
📂 Code Structure:
- Renamed and refactored
dbus-opendtu
for improved readability and maintainability. - Cleaned up
test_dbus-opendtu.py
by removing unused parameters and constants. - Moved constants to appropriate modules for better code organization.
- Improved import structure for clarity and consistency.
- Renamed and refactored
-
🛠️ Code Simplification:
- Consolidated redundant code and removed unused paths in the
DbusService
constructor. - Updated logging statements for better traceability.
- Unified file naming convention to use underscores (
_
) instead of hyphens (-
). - Shifted utility functions to helper modules and included unit tests to boost test coverage.
- Refactored
_get_serial
,_get_name
, and_get_status_url
methods for better encapsulation and readability.
- Consolidated redundant code and removed unused paths in the
🚀 Enhancements:
-
📝 Test Coverage:
- Achieved 66% code coverage with a focus on critical paths.
- Added template and inverter-specific tests to cover more edge cases.
- Adjusted
ahoy_0.5.93_live.json
to reflect new test configurations. - Relocated tests to the appropriate folder structure for clearer organization.
-
🔍 Code Quality:
- Replaced hardcoded values with constants to enhance maintainability.
- Configured test coverage tools and scripts to ensure ongoing code quality.
🙋♂️ Request for Support:
I could use your help to push the project towards 100% code coverage. It's a time-consuming task, so any support would be appreciated! If you can contribute by adding tests or enhancing existing ones, that would be fantastic. Let's aim for perfection together! 🚀
Thanks for reviewing! 😊 Feel free to comment or provide feedback.
What's Changed
- Update issue-report.md by @henne49 in #225
- Download latest stable release by @henne49 in #230
- 📌 Pull Request: Refactor & Enhance dbus-opendtu by @0x7878 in #227
Full Changelog: v1.2.40...v2.0.0
What's Changed
- Update issue-report.md by @henne49 in #225
- Download latest stable release by @henne49 in #230
- 📌 Pull Request: Refactor & Enhance dbus-opendtu by @0x7878 in #227
Full Changelog: v1.2.40...v2.0.0