Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

sanity_check_attributes bodies are mostly empty across visuals

Open
#23 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python

Research direction

Start by auditing the listed sanity_check_attributes and sanity_check_attributes_buffer methods across gsp/visuals, gsp/geometry, gsp/materials, and gsp/core, beginning with the pass implementations and shallow Buffer checks. Use the existing rgba8 enforcement in gsp/materials/mesh_basic_material.py and the related #20 Bug 6 context as reference. Done means each class has defined BufferType, count, and applicable shape or range validation that fails clearly at construction or the buffer boundary.

Written by the indexing model from the issue text.

Description

Short tracking issue — most sanity_check_attributes / sanity_check_attributes_buffer static methods across the visuals/geometry/material/texture classes are either pass or limited to isinstance(x, Buffer) checks. As a result, malformed input (wrong dtype, wrong shape, mismatched counts) crashes deep in numpy at render time instead of failing clearly at construction or at the buffer boundary.

Audit (as of mesh_ng):

  • gsp/visuals/mesh.py — sanity_check_attributes is pass; _buffer form only delegates.
  • gsp/visuals/markers.py — both pass.
  • gsp/visuals/paths.py — both pass.
  • gsp/geometry/mesh_geometry.py — both pass.
  • gsp/visuals/pixels.py, points.py, segments.py, texts.py — _buffer only has shallow isinstance(_, Buffer) checks; no shape/dtype/count validation.
  • gsp/visuals/image.py, gsp/core/texture.py — partial type checks only.
  • gsp/materials/mesh_basic_material.py — _buffer now enforces rgba8 on face/edge colors (#20 Bug 5); the non-buffer form is still pass.

What good would look like (per class):

  • Buffer BufferType matches the expected encoding (e.g. positions → vec3, indices → uint32, colors → rgba8).
  • Buffer count consistency between related attributes (e.g. material color count ∈ {1, vertex_count, face_count}).
  • Optionally O(N) range checks (e.g. max(indices) < vertex_count) at the buffer boundary.

Related: this is the larger Bug 6 from #20, broadened beyond Mesh.

This is just a placeholder to come back to — no fix scoped yet.

Dominant language
Python
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vispy/GSP_API

All issues in vispy/GSP_API

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.