ryanw-mobile / OctoMeter

🔥Kotlin Multiplatform Desktop/Android/iOS Energy Tracker app
Other
78 stars 7 forks source link

(#174) Cache user profile in repository #230

Closed ryanw-mobile closed 2 weeks ago

ryanw-mobile commented 2 weeks ago

Set up in-memory cache for the Account object that valids within the same day within the repository. External callers should not be aware of this change.

Also implement some more unit tests for the repository to troubleshoot Codecov - currently it is not picking up the coverage of the entire repository package.

codacy-production[bot] commented 2 weeks ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +7.35% (target: -1.00%) :white_check_mark: 75.00%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (3af398e65f6d6677a0c8a3cee51de1acb6a400a0) | 1780 | 930 | 52.25% | | | Head commit (f2019848d8e9a6ece3e982612a15aeb3b2386113) | 1906 (+126) | 1136 (+206) | 59.60% (**+7.35%**) | **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 (#230) | 36 | 27 | **75.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 2 weeks ago

Codecov Report

Attention: Patch coverage is 61.76471% with 13 lines in your changes missing coverage. Please review.

Project coverage is 54.72%. Comparing base (3af398e) to head (f201984).

Files Patch % Lines
...nigami/data/repository/OctopusRestApiRepository.kt 25.00% 8 Missing and 4 partials :warning:
...bi/kunigami/data/repository/mapper/TariffMapper.kt 94.44% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #230 +/- ## ========================================== + Coverage 48.99% 54.72% +5.73% ========================================== Files 95 97 +2 Lines 1541 1831 +290 Branches 222 283 +61 ========================================== + Hits 755 1002 +247 - Misses 713 725 +12 - Partials 73 104 +31 ```

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