Open richardjgowers opened 1 year ago
This was discussed in call today. Plan is to do a significant modification of normalize
; we'll dump to json using sort_keys=True
and using out custom serialization class, rather than making the string representation in tokenize
. If an object can't be handled, it'll raise an error in json.dumps
.
Originally here: https://github.com/OpenFreeEnergy/gufe/pull/68#issuecomment-1284134284
It would be nice if this worked out of the box:
And also with pathlib and openff-units objects too. Then we also need to document properly how to extend this list of allowed types.
Currently most of the special casing in gufe tokenize is good at special casing gufe objects, but we also need to be able to handle foreign objects just as well. #68 probably adds a lot of the code we need for this (turns foreign objects into primitive)