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

kp-forks / txtai / 22883144220
100%

Build:
DEFAULT BRANCH: master
Ran 11 Mar 2026 02:04AM UTC
Jobs 1
Files 250
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

09 Mar 2026 06:39PM UTC coverage: 100.0%. Remained the same
22883144220

push

github

web-flow
Fix translation chunk concatenation when showmodels is enabled (#1052)

* Fix translation chunk concatenation when showmodels is enabled

When translating long text that gets split into multiple chunks by the
tokenizer, the translate() method combines results from the same source
text segment. With showmodels=True, each result is a tuple (path, text).
Using += to combine tuples produces (path, text1, path, text2) instead
of the expected (path, text1+text2). This causes a ValueError when the
caller unpacks with "model, op = outputs[y]" since there are too many
values.

Fix by explicitly concatenating only the text portion of the tuple when
showmodels is enabled.

Signed-off-by: JiangNan <1394485448@qq.com>

* Add unit test for showmodels with chunked translation

Adds testLongTranslationWithShowmodels to verify that when text is long
enough to be chunked by the tokenizer, the showmodels result is still a
proper 3-tuple (translation, language, model) and not a malformed tuple
from incorrect concatenation.

Signed-off-by: JiangNan <1394485448@qq.com>

* Shorten test method name to fix build

Rename testLongTranslationWithShowmodels -> testShowmodelsChunked
as the previous name was too long for the test runner.

Signed-off-by: JiangNan <1394485448@qq.com>

---------

Signed-off-by: JiangNan <1394485448@qq.com>

5 of 5 new or added lines in 1 file covered. (100.0%)

9591 of 9591 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 22883144220.1 11 Mar 2026 02:04AM UTC 250
100.0
GitHub Action Run
Source Files on build 22883144220
  • Tree
  • List 250
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 79908eee on github
  • Prev Build on master (#22290040966)
  • 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