Skip to content

docs: polish README for accuracy and clarity#12

Merged
Merkost merged 3 commits into
mainfrom
docs/readme-polish
Jun 5, 2026
Merged

docs: polish README for accuracy and clarity#12
Merkost merged 3 commits into
mainfrom
docs/readme-polish

Conversation

@Merkost

@Merkost Merkost commented Jun 5, 2026

Copy link
Copy Markdown
Member

Summary

Builds on #9. The README documented an API surface that has drifted from the code, so this corrects the inaccuracies and tightens the prose. Verified every signature against the source before editing.

Accuracy fixes

  • Instance API throughout — the examples used CurrencyFormatter.format*(...) as static calls, but CurrencyFormatter is a locale-bound class; only getFractionDigits / getFractionDigitsOrDefault are on the companion.
  • CurrencyKurrency — there is no public Currency type, no Currency(code, fractionDigits) constructor, and no fromCode(code, locale) overload. Documented Kurrency.fromCode + predefined constants.
  • Compose locale interop — it's KurrencyLocale.fromComposeLocale(locale), not locale.toKurrencyLocale().
  • CurrencyFormat interface — corrected to the real members (String-returning format* methods + getFractionDigitsOrDefault).
  • Versions — artifacts 0.2.3 → 0.3.1; Kotlin badge 2.2.0 → 2.4.0.

Polish

  • Removed redundant inline comments and changelog-style wording.
  • Replaced bullet lists with tables for errors and platform support.
  • Light restructuring for flow; section set and TOC unchanged.

No code changes.

🤖 Generated with Claude Code

Merkost and others added 2 commits June 5, 2026 11:20
The README documented an API that no longer matches the code. Corrected the
inaccuracies and tightened the prose.

- Use the instance-based API throughout; there are no static
  CurrencyFormatter.format* methods (only getFractionDigits* are on the companion)
- Currency -> Kurrency: no public constructor and no fromCode(code, locale) /
  Currency(code, fractionDigits) overloads; show fromCode + predefined constants
- Compose locale interop is KurrencyLocale.fromComposeLocale(...), not toKurrencyLocale()
- Fix the CurrencyFormat interface (String-returning methods, getFractionDigitsOrDefault)
- Bump versions: artifacts 0.2.3 -> 0.3.1, Kotlin badge 2.2.0 -> 2.4.0
- Trim redundant inline comments and changelog-style wording; tables for errors/platforms

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 5, 2026 01:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project documentation to better reflect the current public API, but it also includes several non-doc changes: formatter behavior adjustments, Android currency validation changes, build configuration updates, and test suite restructuring/expansion.

Changes:

  • Refined README.md to match the current API surface (instance-based formatting, Kurrency type, Compose interop, updated versions).
  • Adjusted formatter implementations (notably JVM fraction-digit handling; Android currency code normalization/validation logic).
  • Reworked/added tests (new common regression test, new Android device tests, removed older Android instrumented test) and updated build tooling/versions.

Reviewed changes

Copilot reviewed 13 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
sample/shared/src/commonMain/kotlin/org/kimplify/kurrency/sample/KurrencySample.kt Updates import to compose.rememberCurrencyState after package/API organization changes.
sample/shared/src/commonMain/kotlin/org/kimplify/kurrency/sample/CurrencyListScreen.kt Updates import to compose.rememberCurrencyState for consistency with compose package.
README.md Large doc refresh to align examples and API reference with current code and versions.
kurrency-core/src/jvmMain/kotlin/org/kimplify/kurrency/CurrencyFormatterImpl.kt Ensures JVM currency formatting uses the currency’s own fraction digits.
kurrency-core/src/commonTest/kotlin/org/kimplify/kurrency/JpyFractionDigitsTest.kt Adds regression coverage for JPY having 0 fraction digits outside JP locale.
kurrency-core/src/androidTest/kotlin/org/kimplify/kurrency/CurrencyStateTestInstrumented.kt Removes prior Android instrumented tests for CurrencyState.
kurrency-core/src/androidMain/kotlin/org/kimplify/kurrency/CurrencyFormatterImpl.kt Switches Android formatting/validation pieces toward ICU types and adds cached validity check.
kurrency-core/src/androidDeviceTest/kotlin/org/kimplify/kurrency/LocaleFormattingTestInstrumented.kt Adds device-level locale formatting tests (symbol/ISO/fraction digits).
kurrency-core/src/androidDeviceTest/kotlin/org/kimplify/kurrency/KurrencyLocaleTestInstrumented.kt Adds device tests for locale parsing/system/predefined constants.
kurrency-core/src/androidDeviceTest/kotlin/org/kimplify/kurrency/KurrencyErrorTestInstrumented.kt Adds device tests for KurrencyError behavior and messages.
kurrency-core/src/androidDeviceTest/kotlin/org/kimplify/kurrency/JpyFractionDigitsTestInstrumented.kt Adds Android device regression test for JPY decimals.
kurrency-core/src/androidDeviceTest/kotlin/org/kimplify/kurrency/CurrencyTestInstrumented.kt Adds broader Android device tests for Kurrency formatting/validation edge cases.
kurrency-core/src/androidDeviceTest/kotlin/org/kimplify/kurrency/CurrencyMetadataTestInstrumented.kt Adds Android device tests for CurrencyMetadata.
kurrency-core/build.gradle.kts Updates KMP/Android and JS target configuration and test source set dependency wiring.
kurrency-compose/src/commonTest/kotlin/org/kimplify/kurrency/compose/CurrencyStateTest.kt Fixes test package to org.kimplify.kurrency.compose and updates imports accordingly.
kurrency-compose/src/commonMain/kotlin/org/kimplify/kurrency/compose/CurrencyState.kt Moves CurrencyState into the compose package and removes debug logging lines.
kotlin-js-store/yarn.lock Updates JS dependency lockfile (large dependency churn).
gradle/wrapper/gradle-wrapper.properties Updates Gradle wrapper version.
gradle/libs.versions.toml Updates Kotlin/AGP/Compose and other dependency versions; bumps SDK targets.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread kurrency-core/build.gradle.kts
Comment thread kurrency-core/build.gradle.kts
@Merkost Merkost merged commit d5c9ff0 into main Jun 5, 2026
1 check passed
@Merkost Merkost deleted the docs/readme-polish branch June 5, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants