Migrate to DataJoint 2.x: 9 longblob attributes silently corrupt data
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
Lee primero la guía de migración de DataJoint 2.0; después inspecciona los archivos de declaración de esquemas y los dos puntos de llamada de dj.schema identificados por el analizador de declaraciones de 2.x. Actualiza las nueve declaraciones longblob, los tipos numéricos nativos, las llamadas de esquema y la versión mínima de DataJoint en setup.py, y amplía tests/ para cubrir los tipos convertidos. Se considera terminado cuando el paquete se importa con DataJoint 2.x y sus pruebas cubren los cambios de migración frente a esquemas _v2 vacíos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
This element has not been migrated to DataJoint 2.x. DataJoint no longer supports
pre-2.x, all schemas should be migrated, and a schema is either 2.x or pre-2.x — the
two are not interoperable.
Findings below come from running 2.x's own declaration parser over every attribute
declared in this package, so the counts are exact rather than estimated.
Silent data loss — 9 longblob attributes
Under 2.x a bare longblob is a raw binary column, not a DataJoint blob. Inserting a
numpy array into one stores str(array) — numpy's text repr, with the middle elided
for large arrays — and nothing raises on insert or on fetch. dtype and shape are
gone, and the values are not recoverable from the database afterwards.
This element declares 9 such attributes. The fix is to declare <blob>; the
underlying MySQL column type is longblob either way, so it is a definition edit and
not a table migration — as long as it happens before rows are written under 2.x.
Also needed
- Native numeric types (16
int/smallint→int32/int16, 6float→float32). These work correctly under 2.x —
no corruption — but they are native types that warn at declaration and are not
portable across backends. Worth converting while the files are open. dj.schema→dj.Schema(2 call sites).dj.schemawas removed in 2.x;
importing the module raisesAttributeErrorbefore any table is declared.- Raise the DataJoint floor —
setup.pydatajoint>=0.14.0→datajoint>=2.3. The unpinned
floor is why a fresh install resolves 2.x today and hits all of the above.
Testing
This repo has a tests/ directory, which is a real advantage — please extend it to
cover the converted types as part of the migration.
How to do it
Work from Migrate to DataJoint 2.0.
It gives the full legacy → 2.0 type mapping, explains the :<blob>: column-comment
marker that is the mechanism behind the blob problem, and lays out the four phases.
This issue is Phase I — code only, against empty _v2 schemas, with no impact on
existing data. Migrating existing data is Phase III and is tracked separately.
Related: the upstream guard that would have made this loud instead of silent is
https://github.com/datajoint/datajoint-python/issues/1527. The same migration is
underway across the other elements.
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 13
- Forks
- 37
- Merge medio
- 1 h 14 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de datajoint/element-deeplabcut
-
Docker Support for Testing and Development (client)Quizá libre de nuevo @esutlie la tomó hace 358 días y no hay ningún pull request abierto. Abiertoenhancement
datajoint/element-deeplabcut#144 · 1 asignado ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
datajoint/element-deeplabcut#143 ·
-
Support multi-animal pretrained models in DataJoint DeepLabCut ElementQuizá libre de nuevo @esutlie la tomó hace 378 días y no hay ningún pull request abierto. Abiertoenhancement
datajoint/element-deeplabcut#141 · 1 comentario · 4 reacciones · 1 asignado ·
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
NWB
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
Todos los issues de datajoint/element-deeplabcut
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Infisical/infisical#9737 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
datajoint/datajoint-python#1703 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
liberation-data/drivine#826 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día