do we really need python-box? #110
Replies: 2 comments 2 replies
-
Yes, we need to pin accordingly.
It is simply used as a drop-in replacement of It should be possible to make more library optional, for example: |
Beta Was this translation helpful? Give feedback.
-
I need to apologize, indeed As an example look #107 . the import of Box was injected, the part of metadata is being boxified, and returned as boxified. boxification benefits are even not used anywhere later in the code, and is only for JeolX tiffs. It would work perfectly fine without boxification (if tests requires boxified metadata, it should boxify it itself). The thing is creating inconsistancy. I had made inline review of code in #107 but looks my complain about the unnecessary scruff added was dismissed without any feedback. I also think what |
Beta Was this translation helpful? Give feedback.
-
I was very positive about IO library separation from Hyperspy as its requirements grew up so much. I always look to use less of external libraries for something simple.
python-box
looks for me some pain for little gain and trouble guarantied in the future.I see it is kind of drop-in replacement to DictionaryTreeBrowser. Is it really so trivial to have dot notation just to access few attributes, AFAI looked to implementations using it, it is used to create the box, but in the end pure dictionary is returned. Please bear in mind, that python-box officialy declares that it is breaking api with every major release.
What is gain of
python-box
that this library need it? and why we could not do without it?personally I liked the mapping idea (mapping one dict/list structures to other (metadata), as is used in tiff and bruker implementations). For me dictionarization of xml or other tree data of significant nodes in oem metadata-structures looks more future proof (less to break). Am I missing something?
I also see it kind of strange that
tifffile
is optional dependency wherepython-box
is hard requirement. I would understand benefits of pyhton-box if it would be used in Hyperspy's to remake DictionaryTreeBrowser around that. Those objects live during using the software and dot notation access to metadata makes sense as is exposed to user. In case of this library this looks just to give minute shortcut for few developers, but user in end software anyway gets dictionary which is converted to some end form. these created box'es does not live to reach the end-user. Tiff on the other hand is one of the most common formats which many vendors allows to save processed data alongside some propretary formats.Beta Was this translation helpful? Give feedback.
All reactions