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

Remove `Session.array_transform` attribute (obsolete single-transducer-pose model)

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

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
database

Línea de trabajo

Comienza con src/openlifu/db/session.py e inspecciona la serialización de Session. Después, revisa la construcción de Session en examples/tutorials/02_Database_Interaction.py y en su notebook correspondiente. Ejecuta las pruebas de base de datos en tests/test_database.py e inspecciona tests/resources/example_db/ en busca de datos legacy de array_transform. Se considera terminado cuando los fixtures y ejemplos actuales ya no hagan referencia al campo, mientras from_dict siga cargando sesiones legacy.

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

Descripción

Summary

Remove the array_transform: ArrayTransform field from openlifu.db.Session, along with its to_dict / from_dict handling, the associated docstring notes, and every reference in examples, tests, and test-resource JSON.

Motivation

Session.array_transform was designed around the assumption that a session has a single canonical "the transducer position." In SlicerOpenLIFU that assumption no longer holds:

  • Each page that renders the transducer (pre-planning, localization, solution) picks whichever of the persisted transforms it needs (a specific approved virtual-fit result, a specific approved transducer-tracking result, or -- on the localization page -- both simultaneously).
  • The full list of transducer transforms lives in session.virtual_fit_results and session.transducer_tracking_results, keyed by target / photoscan.
  • Approval invalidation is now driven per-VF and per-TT rather than by writing back a single pose.

As a result, SlicerOpenLIFU has stopped reading and writing session.array_transform (see the accompanying downstream PR). The field is now unused by the primary consumer and only serves to confuse the persistence model.

Scope of changes required in this repo

  • src/openlifu/db/session.py
    • Remove the array_transform field definition on Session.
    • Remove the corresponding to_dict / from_dict handling for array_transform.
    • Update the solution_id field docstring, which currently claims the id is "cleared whenever the array_transform changes." That invalidation policy needs to be reconsidered (probably driven by VF / TT approval changes on the consumer side); at minimum, drop the array_transform reference from the doc.
  • examples/tutorials/02_Database_Interaction.py and the matching .ipynb -- drop the array_transform=ArrayTransform(...) argument from the Session(...) construction.
  • tests/test_database.py -- remove assertions on session.array_transform.matrix.shape / .units and any loop variables named array_transform that come from the same fixture.
  • Test resource JSON files under tests/resources/example_db/ that carry an "array_transform" block -- either drop the block or regenerate the fixtures so they no longer contain it. from_dict should tolerate the field being absent, so old on-disk sessions still load cleanly.
  • Sample database (openlifu-sample-database repo) sessions currently carry an "array_transform" block too; that repo will need a matching sweep, but that is out of scope for this issue.

Backwards compatibility

Session.from_dict should silently ignore a legacy "array_transform" key so that existing on-disk sessions (including the pinned openlifu-sample-database fixtures) still load with the new library version.

Downstream

Coordinated with the SlicerOpenLIFU cleanup that decommissions the array_transform read/write path on the consumer side.

Lenguaje dominante
Python
Estrellas
29
Forks
20
Merge medio
19 h 51 min
PR fusionados (30 d)
5

Preparar el entorno

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 OpenwaterHealth/openlifu-python

Todos los issues de OpenwaterHealth/openlifu-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.