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

vispy / vispy / 10848415194
75%

Build:
DEFAULT BRANCH: main
Ran 13 Sep 2024 11:39AM UTC
Jobs 4
Files 344
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

13 Sep 2024 11:37AM UTC coverage: 74.77% (+0.001%) from 74.769%
10848415194

push

github

web-flow
fix: prevent zerodiv error when auto-calculating clims in scalable textures (#2621)

small change here. I very frequently hit a ZeroDivisionError with
scaling in vispy:

```python
  File "/Users/talley/dev/self/orGANelle/.venv/lib/python3.12/site-packages/vispy/visuals/visual.py", line 505, in draw
    if self._prepare_draw(view=self) is False:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/talley/dev/self/orGANelle/.venv/lib/python3.12/site-packages/vispy/visuals/image.py", line 677, in _prepare_draw
    self._build_texture()
  File "/Users/talley/dev/self/orGANelle/.venv/lib/python3.12/site-packages/vispy/visuals/image.py", line 613, in _build_texture
    pre_clims = self._texture.clim_normalized
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/talley/dev/self/orGANelle/.venv/lib/python3.12/site-packages/vispy/visuals/_scalable_textures.py", line 296, in clim_normalized
    clim_min = (clim_min - range_min) / (range_max - range_min)
               ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
ZeroDivisionError: float division by zer
```

I could of course try to check ahead of time to prevent asking vispy to
autoscale something where the min and max value are the same, but this
small change also catches it and works in all the cases i tried. let me
know if you see any problems with it

5794 of 10522 branches covered (55.07%)

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

23981 of 32073 relevant lines covered (74.77%)

2.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-2 - 10848415194.1 13 Sep 2024 11:48AM UTC 0
74.02
2 run-3 - 10848415194.2 13 Sep 2024 11:48AM UTC 0
52.12
3 run-4 - 10848415194.3 13 Sep 2024 11:48AM UTC 0
72.32
4 run-1 - 10848415194.4 13 Sep 2024 11:48AM UTC 0
46.55
Source Files on build 10848415194
Detailed source file information is not available for this build.
  • Back to Repo
  • c877a323 on github
  • Prev Build on main (#10575873655)
  • Next Build on main (#10891117284)
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