Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

sanity_check_attributes bodies are mostly empty across visuals

Abierto
#23 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
2
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de vispy/GSP_API

Todos los issues de vispy/GSP_API

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.