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

vispy / vispy / 12913396666
75%

Build:
DEFAULT BRANCH: main
Ran 22 Jan 2025 05:11PM UTC
Jobs 4
Files 344
Run time 2min
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

22 Jan 2025 05:09PM UTC coverage: 74.794% (+0.03%) from 74.767%
12913396666

push

github

web-flow
Ignore all flat triangles in triangulation (#2248)

This partially fixes #2247. By ignoring flat/zero-area triangles (i.e.
where all three points are collinear), we avoid the assertion failure
associated with overwriting the entry in `_edges_lookup`. But there is
still an unexpected triangle and vertex in the output.

I added a few simple and similar tests to capture what I expect from the
output, and where the behavior breaks down. Before the change both
`test_triangulate_collinear_path` and
`test_triangulate_collinear_path_with_repeat` fail with the assertion
failure. After the change, only
`test_triangulate_collinear_path_with_repeat` fails, not due to the
assertion, but because a triangle is found, which also contains a vertex
that is not in the input - instead I would expect no triangles to be
returned.

I think this PR represents a small improvement from `main` for two
reasons.
1. The original assertion failure makes me think that the triangulation
algorithm assumed that it would never see duplicate edges based on the
way it was implemented (i.e. the state is not just exceptional, it
should be impossible). This PR prevents one way of reaching that state.
2. Before this change there was an implementation comment `# ignore flat
tris`, which suggested that the `_add_tri` was trying to skip zero-area
triangles. But the implementation only ignored triangles with at least 2
points that have duplicate coordinates. This PR adds a proper check for
that condition.

However, I have some reservations about this PR in its current state.
- I'm not exactly sure what to expect from the output of triangulation.
It looks like we always get some vertices that weren't in the input, but
in most cases they are not actually used in any of the output triangles,
so that seems fine (as reflected by the tests).
- It doesn't fix all the issues described in #2247 (i.e. there is still
an unexpected triangle and vertex).
- It does a little re... (continued)

5801 of 10530 branches covered (55.09%)

44 of 45 new or added lines in 2 files covered. (97.78%)

24017 of 32111 relevant lines covered (74.79%)

2.45 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
96.1
0.29% vispy/geometry/tests/test_triangulation.py
Jobs
ID Job ID Ran Files Coverage
1 run-3 - 12913396666.1 22 Jan 2025 05:21PM UTC 344
51.89
2 run-1 - 12913396666.2 22 Jan 2025 05:21PM UTC 344
46.61
3 run-4 - 12913396666.3 22 Jan 2025 05:21PM UTC 344
72.35
4 run-2 - 12913396666.4 22 Jan 2025 05:21PM UTC 344
74.04
Source Files on build 12913396666
  • Tree
  • List 344
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • d1c4d941 on github
  • Prev Build on main (#12889341015)
  • Next Build on main (#13635859118)
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