Migrate to DataJoint 2.x: 14 longblob attributes silently corrupt data, 1 attribute fails to declare
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 58/100
Direção de pesquisa
Comece por setup.py e, em seguida, pesquise no pacote por longblob, attach, dj.schema e pelas 14 declarações afetadas; a issue identifica os mapeamentos necessários do DataJoint 2.x. Leia o guia de migração vinculado e inspecione tests/ antes de fazer as alterações nas definições. O trabalho estará concluído quando todas as declarações forem importadas no DataJoint 2.x, o limite mínimo da dependência tiver sido elevado e os testes cobrirem os tipos convertidos.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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 — 14 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 14 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.
Hard failures at declaration
These raise DataJointError under 2.x, so the affected tables cannot be declared at all:
| spelling | count | |
|---|---|---|
attach |
1 | → <attach> |
Also needed
- Native numeric types (12
int/smallint→int32/int16, 35float→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(4 call sites).dj.schemawas removed in 2.x;
importing the module raisesAttributeErrorbefore any table is declared.- Raise the DataJoint floor —
setup.pydatajoint>=0.14.6→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.
- Linguagem predominante
- Jupyter Notebook
- Estrelas
- 10
- Forks
- 44
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de datajoint/element-array-ephys
-
enhancement
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
datajoint/element-array-ephys#207 ·
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
datajoint/element-array-ephys#206 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
datajoint/element-array-ephys#154 · 1 comentário ·
-
NWB-export.ipynb errorAbertabug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
datajoint/element-array-ephys#163 ·
-
Cannot find query.csvAbertabug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 30/100
datajoint/element-array-ephys#162 ·
Todas as issues de datajoint/element-array-ephys
Issues semelhantes
-
Idle compaction monitors LIST the replica every tick when the newest destination file spans more than one TXIDTalvez já em andamento @pishuv assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
benbjohnson/litestream#1563 ·
Mantenedores costumam responder em até 2 dias
-
[BUG] Qdrant RAG client applies score_threshold to raw cosine similarity, not the 0-1 score it returnsTalvez já em andamento @roydonsequeira assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
NVIDIA/cuCollections#858 ·
Mantenedores costumam responder em até 2 dias
-
Docker: saving 6+ competitors in website setup fails with `too many terms in compound SELECT`Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 2 dias
-
bug ready for review
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
odysseus-dev/odysseus#6641 ·
Mantenedores costumam responder em até 1 dia