Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

sanity_check_attributes bodies are mostly empty across visuals

Aperta
#23 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
python

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
2
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vispy/GSP_API

Tutte le issue di vispy/GSP_API

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.