python-humanize / python-humanize/humanize
Percentages and ratios
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 757
- 派生
- 148
- 平均合并
- 6 天 1 小时
- 30 天内合并 PR
- 12
描述
Hello, thanks a lot for this great package !
If I'm not mistaken there is no feature yet to humanize a ratio (between 0 and 1) or a percentage (between 0-100).
It could be a great addition ! It can be just one function to handle both, with two possible inputs (ratio= or percent=). The outcome would in both cases, be a truncated percent string with optional decimal coma up to a given precision, as in 12,5%. Customization of precision with a number of decimal could be similar to precisedelta's precision customization with the units.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,将提议的 ratio 和 percent API 与 precisedelta 的精度自定义进行比较。验证 ratio 和 percent 输入、截断、可选的小数精度以及所要求的 percent 字符串格式;完成时应包括项目现有测试中的覆盖率。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100