Skip to content

Add currency symbol and conversion rate to cost module#111

Open
bronwynbarnett-gif wants to merge 1 commit intostephenleo:mainfrom
bronwynbarnett-gif:feature/currency-config
Open

Add currency symbol and conversion rate to cost module#111
bronwynbarnett-gif wants to merge 1 commit intostephenleo:mainfrom
bronwynbarnett-gif:feature/currency-config

Conversation

@bronwynbarnett-gif
Copy link
Copy Markdown

Summary

  • Adds currency_symbol config option to [cship.cost] — defaults to $, can be set to any string (e.g. £, )
  • Adds conversion_rate config option — defaults to 1.0, multiplies the USD value before display
  • Includes tests for both new options

Example config

[cship.cost]
currency_symbol = "£"
conversion_rate = 0.79

This displays the cost as £0.79 instead of $1.00.

Closes #110

Test plan

  • Existing cost tests still pass
  • New test: custom currency symbol renders correctly
  • New test: conversion rate applies correctly

🤖 Generated with Claude Code

Allows users to configure a custom currency symbol (e.g. £ instead of $)
and an optional conversion rate from USD to their local currency.

Config example:
  [cship.cost]
  currency_symbol = "£"
  conversion_rate = 0.79

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@stephenleo
Copy link
Copy Markdown
Owner

@bronwynbarnett-gif love this! Can I pls get your help to fix the formatting CI error here? https://github.com/stephenleo/cship/actions/runs/23205208600/job/67521200820?pr=111

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.

Support currency configuration (e.g. GBP/£ instead of USD/$)

2 participants