incf-nidash / PyNIDM

Other
21 stars 31 forks source link

create generic architecture for serialization/deserialization #33

Open satra opened 7 years ago

cmaumet commented 6 years ago

Have you started working on this yet? I've been implementing that for the nidmresults package in https://github.com/cmaumet/nidmresults/tree/refactor. Each object embeds a query that can be used for deserialisation, e.g. https://github.com/cmaumet/nidmresults/blob/refactor/nidmresults/objects/inference.py#L69. Maybe it is time to merge the two repos?

satra commented 6 years ago

@cmaumet - we have not completely. @dbkeator implemented it using rdf, but as he and i discussed there is a way to do this with prov itself and then run a deserializer on top of the prov python objects. we also found a bug in my prov-rdf converter related to qualified associations that is not caught by the tests. i will try to get to it next week.

essentially the idea is that a nidm document would deserialize to all python objects in memory. one could also use queries to get at specific components as well. so the architecture should support both forms of deserializing.

cmaumet commented 6 years ago

Thanks @satra! The deserialization in nidmresults also uses rdflib, as @dbkeator has done.