You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that redo() for the VersionedGraphCollection, although indeed adding the changeset back to the collection, it doesn't do it under the same graph name. So if I serialize the entire graph collection after undoing and redoing, it appears in the graph/file, but if I serialize only the specific graph I specified originally, it no longer appears in the file even though it is part of the graph collection.
frombrickschema.persistentimportVersionedGraphCollection, Changesetfrombrickschema.namespacesimportA, BRICKfromrdflibimportNamespacevg=VersionedGraphCollection("sqlite://")
BLDG=Namespace("test:")
withvg.new_changeset("my-building") ascs:
cs.add((BLDG.zone1, A, BRICK.HVAC_Zone))
withvg.new_changeset("my-building") ascs:
cs.add((BLDG.zone2, A, BRICK.HVAC_Zone))
vg.undo()
vg.redo()
vg.serialize("UndoRedo1.ttl") # serialize the entire graph collectionvg.graph_at(graph="my-building").serialize("UndoRedo2.ttl") # serialize only the graph "my-building"
A potential fix that seems to work might be this (persistent.py on line 171):
It appears that
redo()
for theVersionedGraphCollection
, although indeed adding the changeset back to the collection, it doesn't do it under the same graph name. So if I serialize the entire graph collection after undoing and redoing, it appears in the graph/file, but if I serialize only the specific graph I specified originally, it no longer appears in the file even though it is part of the graph collection.A potential fix that seems to work might be this (persistent.py on line 171):
The text was updated successfully, but these errors were encountered: