Skip to content

feat: add kg_to_lbs and lbs_to_kg conversions (#13) - #68

Closed
marupakalaharsith20-beep wants to merge 1 commit into
codepiyusss:mainfrom
marupakalaharsith20-beep:feat-weight-conversions
Closed

marupakalaharsith20-beep wants to merge 1 commit into
codepiyusss:mainfrom
marupakalaharsith20-beep:feat-weight-conversions

Conversation

@marupakalaharsith20-beep

Copy link
Copy Markdown
Contributor

Summary

Adds weight conversion functions (\kg_to_lbs\ and \lbs_to_kg) and exposes them as CLI choices \kg2lb\ and \lb2kg\ in \ ixit convert.

Changes

  • Defined \LBS_PER_KG = 2.20462\ and implemented \kg_to_lbs(kg: float) -> float\ and \lbs_to_kg(lbs: float) -> float\ with full docstrings in \ ixit/convert.py.
  • Registered \kg2lb\ and \lb2kg\ in the \CONVERSIONS\ dictionary in \ ixit/cli.py.
  • Added unit tests in \ ests/test_convert.py\ for both functions.
  • Added CLI integration tests in \ ests/test_cli.py\ for \ ixit convert kg2lb\ and \ ixit convert lb2kg.

Closes #13

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.

Feature: add kg_to_lbs and lbs_to_kg

2 participants