Skip to content

[IMP-3] Migrate pinger to async/await#8

Merged
shineRR merged 28 commits into
mainfrom
feature/refactoring
Jul 13, 2025
Merged

[IMP-3] Migrate pinger to async/await#8
shineRR merged 28 commits into
mainfrom
feature/refactoring

Conversation

@shineRR
Copy link
Copy Markdown
Owner

@shineRR shineRR commented Jul 13, 2025

PR-Codex overview

This PR focuses on significant updates to the pingx library, including a major version upgrade, updates to the Swift language version, and various structural and functional improvements across models, error handling, and network functionality.

Detailed summary

  • Major version bump of pingx from 1.0.9 to 1.1.0
  • Updated platform requirement from iOS 10.0 to 16.0
  • Refactored ICMPPacket, ICMPHeader, and Payload to conform to Equatable
  • Introduced PingResult as a public typealias for Result<Response, PingError>
  • Enhanced error handling in PingError with descriptive messages and error codes
  • Updated AsyncPinger and Pinger protocols for better async handling
  • Added AsyncPingView and CallbackPingView for improved UI interaction
  • Removed deprecated files and streamlined the codebase
  • Improved test structure and added mock implementations for better testing coverage
  • Added Interval type for time management across the library
  • Enhanced socket handling in SocketFactory and PingxSocket implementations

The following files were skipped due to too many changes: Sources/pingx/Pinger/Pingers/Pinger.swift, Example/pingx/Views/CallbackPingView/CallbackPingViewModel.swift, Tests/pingxTests/Tests/Request/RequestTests.swift, Sources/pingx/Pinger/Api/Pinger.swift, README.md, Tests/pingxTests/Tests/Request/DemandTests.swift, Sources/pingx/Pinger/Sequence/PingSequence.swift, Tests/pingxTests/Extenstions/Assertion+Extensions.swift, Tests/pingxTests/Tests/Pinger/PingerTests.swift, Sources/pingx/Model/Request/Request.swift, Sources/pingx/Pinger/Pingers/AsyncPinger.swift, Tests/pingxTests/Tests/ICMPPackageExtractor/ICMPPackageExtractorTests.swift, Example/pingx.xcodeproj/project.pbxproj, Tests/pingxTests/Tests/Pinger/AsyncPingerTests.swift

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@shineRR shineRR added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 13, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 13, 2025

Codecov Report

❌ Patch coverage is 88.63841% with 126 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.21%. Comparing base (66c2541) to head (c7487ec).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
Tests/pingxTests/Mocks/MockFunc.swift 0.00% 18 Missing ⚠️
Sources/pingx/Model/Response/PingError.swift 51.85% 13 Missing ⚠️
Tests/pingxTests/Mocks/ThreadSafeMockFunc.swift 38.88% 11 Missing ⚠️
Sources/pingx/Model/Interval/Interval.swift 58.33% 10 Missing ⚠️
...Generated/AsyncPinger+AutoMockable.generated.swift 52.38% 10 Missing ⚠️
Sources/pingx/Model/Request/Request.swift 77.50% 9 Missing ⚠️
...es/pingx/Factory/SocketFactory/SocketFactory.swift 0.00% 8 Missing ⚠️
Sources/pingx/Pinger/Pingers/AsyncPinger.swift 92.30% 7 Missing ⚠️
.../pingxTests/Extenstions/Assertion+Extensions.swift 87.50% 7 Missing ⚠️
Sources/pingx/Pinger/Pingers/Pinger.swift 78.57% 6 Missing ⚠️
... and 10 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
+ Coverage   81.82%   84.21%   +2.38%     
==========================================
  Files          38       52      +14     
  Lines         996     1330     +334     
==========================================
+ Hits          815     1120     +305     
- Misses        181      210      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shineRR shineRR merged commit 3fd8211 into main Jul 13, 2025
6 checks passed
@shineRR shineRR deleted the feature/refactoring branch July 13, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant