PascalLesage / presamples

Package to write, load, manage and verify numerical arrays, called presamples.
BSD 3-Clause "New" or "Revised" License
14 stars 11 forks source link

allow presamples package creation with external reference to array #7

Open PascalLesage opened 6 years ago

PascalLesage commented 6 years ago

Current implementation requires that the numpy array is actually passed as an argument to create_presamples_package. This therefore does not allow the use of an external address in the field datapackage['resources']['path'].

cmutel commented 6 years ago

This is a pretty big change - arrays should be treated the same way as in numpy.load, i.e. we can pass in an array, a string (or path), or a file-like object. I propose we punt on this for now and think about what we really need. Here are the constraints I see:

On the other hand, we do want to be able to use large presampled arrays generated by e.g. ecoinvent. The ideal case would be to support a library that wrapped all the complexity for us; I haven't found such a thing yet. Alternatively, we could only support e.g. AWS for now.

cmutel commented 6 years ago

Looks like https://www.pyfilesystem.org/ is the answer!