• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jqueguiner / num2words2 / 29613473861
95%
main: 95%

Build:
Build:
LAST BUILD BRANCH: fix/scheduled-editable-install
DEFAULT BRANCH: main
Ran 17 Jul 2026 09:08PM UTC
Jobs 6
Files 167
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jul 2026 09:04PM UTC coverage: 95.176% (+0.1%) from 95.056%
29613473861

Pull #127

github

jqueguiner
refactor: thin num2words2 Python binder — move all logic to Rust

num2words2/ is now a pure thin binder like words2num2/: every public function is
a `return _RUST.x(...)` pass-through, with no conversion/dispatch/presentation
logic left in Python.

Moved into num2words2-core (new pyo3-free `presentation.rs`, so the crate still
publishes standalone) + the num2words2-py binder:
- `_normalize_lang` -> `presentation::resolve_lang` (locale resolution).
- `_apply_style` -> `presentation::apply_style` (style=terse/us output post-processing).
- `_normalize_cents` -> `presentation::normalize_cents` (cents kwarg handling).
- `_rust_kw_items` kwarg marshalling -> the binder (`extras_to_kwargs`).
- the whole `num2words`/`num2words_sentence` dispatch pipeline -> `#[pyfunction]`s
  (type inspection + raw-lang resolve + style, sharing the core converters).
- grouping.py: drop the pure-Python western/indian/chinese fallback; it's now a
  pass-through to `_RUST.group_digits` (which raises the same ValueError/TypeError).

__init__.py 300 -> 77 lines. num2words2-core 0.1.0 -> 0.1.1 (published).

Verified: cargo test 579; unittest OK (2780, 33 expected-failures, exit 0);
E2E 16/16; coverage source 84% / tests 98%; flake8 0; isort clean. Output parity
preserved (style/cents/lang-resolve produce identical results).
Pull Request #127: refactor: thin num2words2 Python binder (move all logic to Rust)

1257 of 1412 branches covered (89.02%)

Branch coverage included in aggregate %.

9 of 10 new or added lines in 3 files covered. (90.0%)

24489 of 25639 relevant lines covered (95.51%)

5.73 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
80.95
3.43% num2words2/__init__.py
Jobs
ID Job ID Ran Files Coverage
1 3.10 - 29613473861.1 17 Jul 2026 09:13PM UTC 167
95.17
GitHub Action Run
2 3.12 - 29613473861.2 17 Jul 2026 09:13PM UTC 167
95.17
GitHub Action Run
3 3.11 - 29613473861.3 17 Jul 2026 09:13PM UTC 167
95.17
GitHub Action Run
4 3.14 - 29613473861.4 17 Jul 2026 09:13PM UTC 167
95.18
GitHub Action Run
5 3.13 - 29613473861.5 17 Jul 2026 09:13PM UTC 167
95.17
GitHub Action Run
6 3.15 - 29613473861.6 17 Jul 2026 09:13PM UTC 167
95.18
GitHub Action Run
Source Files on build 29613473861
  • Tree
  • List 167
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Pull Request #127
  • PR Base - main (#29608550150)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc