uwmadison-chm / bioread

Utilities to work with files from BIOPAC's AcqKnowlege software
MIT License
66 stars 23 forks source link

Make header structures less clever #9

Closed njvack closed 4 years ago

njvack commented 9 years ago

headers.py is a mess. It uses these clever versioned StructDicts that make bigger and bigger structs for later versions of the files, which works until everything changes, and then we have a few of them. Gak.

Better, I think, would just be to have every version of the headers completely specified, with a mapping from file revision numbers to structure versions. Probably, we actually get a header reader for each revision where that actually needs to change.

Also, the StructDict thing needs to go; just use ctypes.

njvack commented 4 years ago

Realistically? We're never gonna do this. What we have now is not perfect but it works. I'm gonna put a comment this effect in headers.py and call it a day.