Skip to content

Conversation

@ryanw-mobile
Copy link
Owner

A basic implementation to cache Standard Unit Rates, Day Rates, Night Rates and Standing Charges in the Room DB.

Certain limitations are to be refined later:

  • The cache will be considered as "hit" when the entire range of data exists in the DB, otherwise repository will try to download them again, even we have cached a portion of it
  • We are still unclear when we a tariff has Direct Debit/Non-Direct-Debit or Unknown payment types. Right now we just pretty sure fixed and Agile should return "Unknown" while variable tariffs have DD/Non-DD. Future usage tickets have to look at this.
  • We will need to migrate current standing charge data source from Tariff to the new repository standing charge method, which provides the true half-hourly data
  • We do not have day/night rate tariff test data, and the app currently does not support such tariffs. We have the code here but we cannot unit test them yet.

* main:
  [chore] Renovate: Update dependency androidx.test:core-ktx 1.6.0 to v1.6.1
  [chore] Renovate: Update dependency androidx.test.ext:junit 1.2.0 to v1.2.1
  [chore] Renovate: Update dependency androidx.test.espresso:espresso-core 3.6.0 to v3.6.1
* main:
  [chore] Renovate: Update dependency org.jetbrains.kotlinx.kover 0.8.1 to v0.8.2
@ryanw-mobile ryanw-mobile added the feature A new feature for the user, not a new feature for a build script. label Jun 28, 2024
@ryanw-mobile ryanw-mobile added this to the v1.3.0 milestone Jun 28, 2024
@ryanw-mobile ryanw-mobile requested a review from rwmobi June 28, 2024 00:10
@ryanw-mobile ryanw-mobile self-assigned this Jun 28, 2024
@ryanw-mobile ryanw-mobile linked an issue Jun 28, 2024 that may be closed by this pull request
@ryanw-mobile ryanw-mobile enabled auto-merge June 28, 2024 00:10
@codacy-production
Copy link
Contributor

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+2.38% (target: -1.00%) 87.58%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (23f4d37) 1978 1269 64.16%
Head commit (0e9fb65) 2086 (+108) 1388 (+119) 66.54% (+2.38%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#237) 161 141 87.58%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences


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

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

@ryanw-mobile ryanw-mobile merged commit 8338194 into main Jun 28, 2024
@ryanw-mobile ryanw-mobile deleted the feature/228-agile-screen-cache-unit-rates branch June 28, 2024 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new feature for the user, not a new feature for a build script.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agile Screen: Cache unit rates in the DB

3 participants