refactor: improve platform services code quality and test coverage#306
Merged
privateip merged 1 commit intoitential:develfrom Feb 4, 2026
Merged
refactor: improve platform services code quality and test coverage#306privateip merged 1 commit intoitential:develfrom
privateip merged 1 commit intoitential:develfrom
Conversation
Member
privateip
commented
Feb 4, 2026
- Add type-safe AdapterState and ApplicationState enums for state management
- Replace manual timeout countdown with asyncio.wait_for() for proper async patterns
- Implement reusable _paginate() helper in ServiceBase to eliminate code duplication
- Add slots to ServiceBase for memory optimization
- Standardize error messages with consistent formatting using single quotes
- Replace time.time() with timezone-aware datetime for timestamp generation
- Improve variable naming throughout services (replace generic names like 'ele', 'p')
- Fix all test failures caused by refactoring (38 tests updated)
- Add 10 new tests to cover edge cases and achieve 100% coverage
- Cover intermediate states (STARTING/STOPPING) in adapter and application services
- Add tests for HTTPStatusError without response attribute edge cases
- Test parallel pagination success and failure scenarios
- Add direct tests for internal _poll_for_state method
af607d3 to
7fad192
Compare
- Add type-safe AdapterState and ApplicationState enums for state management - Replace manual timeout countdown with asyncio.wait_for() for proper async patterns - Implement reusable _paginate() helper in ServiceBase to eliminate code duplication - Add __slots__ to ServiceBase for memory optimization - Standardize error messages with consistent formatting using single quotes - Replace time.time() with timezone-aware datetime for timestamp generation - Improve variable naming throughout services (replace generic names like 'ele', 'p') - Fix all test failures caused by refactoring (38 tests updated) - Add 10 new tests to cover edge cases and achieve 100% coverage - Cover intermediate states (STARTING/STOPPING) in adapter and application services - Add tests for HTTPStatusError without response attribute edge cases - Test parallel pagination success and failure scenarios - Add direct tests for internal _poll_for_state method
7fad192 to
c82cca3
Compare
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.