h-REA / holo-rea-proto

REA economic network coordination software implemented on top of the Holochain prototype (Go version).
GNU General Public License v3.0
17 stars 1 forks source link

Resolve `Unit` datatype incompatibility #16

Closed pospi closed 5 years ago

pospi commented 5 years ago

So we talked a little in the past about how we translate between things that have been simplified or have evolved for GFD; and the current reference implementation of NRP / valuenetwork.

Unit is a good simple one to setup a conversion for. So the question is, what's an exhaustive list of unit types we will be using for GFD?

Once I have that I can setup a simple translation function that turns the string types from the DHT into Unit objects with the fields an NRP-like schema expects.

Let me know and assign back to me so I can implement?

fosterlynn commented 5 years ago

I"m fine with just having units that are strings for GFD if that is easier. The vocabulary we are using (QUDT) has a very exhaustive list of units already defined, but also has many unfinished lists. And doesn't seem to have something like Each or Count (which is mostly (allof?) what GFD needs), although I could swear I saw it a couple years ago. We might want to pick a different unit vocabulary, but haven't gotten to it yet.

sqykly commented 5 years ago

"Each" units are represented as "" right now. That makes text-ifying a quantity more uniform:

`${numericValue} ${unit} ${nameOfResourceType}`

gives "100 apples" and "2 kg beans" with no special logic for Each/Count or Percent.

fosterlynn commented 5 years ago

"Each" units are represented as "" right now.

Sure, sounds good for now.