ryanw-mobile / OctoMeter

🔥Kotlin Multiplatform Desktop/Android/iOS Energy Tracker app
Other
126 stars 10 forks source link

(#240) Create local cache data source #242

Closed ryanw-mobile closed 3 months ago

ryanw-mobile commented 3 months ago

ChatGPT believes we violates the Clean Architecture if we keep in-memory cache variables in repository rather than data source, therefore this is a quick refactoring to move the variable to the data source.

codacy-production[bot] commented 3 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.13% (target: -1.00%) :white_check_mark: 100.00%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (27c065f9cb38c2443202289e28f3b747791386ca) | 2085 | 1388 | 66.57% | | | Head commit (277e9defb8d8c58f5db167836229267d8872208b) | 2093 (+8) | 1396 (+8) | 66.70% (**+0.13%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#242) | 14 | 14 | **100.00%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences


:rocket: Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Project coverage is 61.80%. Comparing base (27c065f) to head (277e9de).

Files Patch % Lines
...data/source/local/cache/InMemoryCacheDataSource.kt 77.77% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #242 +/- ## ========================================== + Coverage 61.61% 61.80% +0.18% ========================================== Files 102 103 +1 Lines 2001 2008 +7 Branches 321 322 +1 ========================================== + Hits 1233 1241 +8 Misses 649 649 + Partials 119 118 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.