Usage of ancient files for testing breaks with recent h5py/libhdf5

Aperta
#108 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
data, testing-qa

Direzione di ricerca

Inizia dalla suite di test e dai vecchi file HDF5 discussi nella pull request #102, quindi leggi la discussione collegata sulla codifica degli attributi di h5py/libhdf5. Confronta l’approccio attuale basato su file inclusi nel repository con l’approccio basato su file di test creati su richiesta utilizzato da xarray e h5netcdf. Il lavoro è completato quando i test interessati funzionano con versioni recenti di h5py/libhdf5 senza dipendere da file ricreati incompatibili.

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

Descrizione

While working on #102 @bnlawrence and I found a glitch when we recreated test files with recent h5py/libhdf5.

See https://github.com/NCAS-CMS/pyfive/pull/102#discussion_r2393563713 for details.

Citing here for visibility:

If we recreate the file now, the following line of code:

attrs['vlen_str_array'] = [b'Hello', b'World!']

translates to this HDF5 dump:

ATTRIBUTE "vlen_str_array" {
   DATATYPE  H5T_STRING {
      STRSIZE H5T_VARIABLE;
      STRPAD H5T_STR_NULLTERM;
      CSET H5T_CSET_ASCII;
      CTYPE H5T_C_S1;
   }
   DATASPACE  SIMPLE { ( 2 ) / ( 2 ) }
   DATA {
   (0): "Hello", "World!"
   }
}

whereas the old file translates to:

ATTRIBUTE "vlen_str_array" {
   DATATYPE  H5T_STRING {
      STRSIZE 6;
      STRPAD H5T_STR_NULLPAD;
      CSET H5T_CSET_ASCII;
      CTYPE H5T_C_S1;
   }
   DATASPACE  SIMPLE { ( 2 ) / ( 2 ) }
   DATA {
   (0): "Hello\000", "World!"
   }
}

It might make sense to move from the current behaviour of testing already created files (and ingesting them into GIT) to creating test files only when testing in the test suite. This is what updownstream libraries like xarray and h5netcdf are doing. Thoughts?

Lingua principale
Python
Stelle
105
Fork
29
Merge medio
2g 8h
PR unite (30g)
9

Preparare l'ambiente

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 NCAS-CMS/pyfive

Tutte le issue di NCAS-CMS/pyfive

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.