frostyfan109 / tranql

A Translator Query Language
https://researchsoftwareinstitute.github.io/data-translator/apps/tranql
MIT License
0 stars 1 forks source link

Keep node properties on merge. #78

Closed stevencox closed 5 years ago

stevencox commented 5 years ago

Merge node properties. Right now, an rtx node might overwrite a gamma node or vice versa. Instead, use dict.update() or similar to do an actual merge. One will still win where values conflict but it will be better.

frostyfan109 commented 5 years ago

This has been added.

Nodes and edges that are merged together now go through the util.py deep_join function, which recursively joins iterables (without repetition) and retains other properties (theoretically should always be either equivalent or identical).

frostyfan109 commented 5 years ago

~This method actually scares me, so this is opened to be changed.~ Replaced with a safer method that only recursively merges dictionary (rather than all iterables)