-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
An Ubergraph exposes the hash map interface, however the implementation of clojure.core map functions only allows for a closed set of keys and turns everything else into a no-op:
ubergraph/src/ubergraph/core.clj
Line 228 in 45553ac
| (get [this key default-value] |
This seems to go against the Clojure design philosophy of having open data structures – I should be able to assoc extra information to the graph and have it be "ignored" by any function that doesn't request for it.
(-> (uber/digraph)
(uber/add-edges [1 2])
(assoc
:extra/info "foo"
:date-created "2019-10-02")
(keys))
;; => (:node-map :allow-parallel? :undirected? :attrs :cached-hash)What's the rationale for this behavior? Loom graphs for instance allow for it by default since they are plain records.
Is there some other API for adding attributes to the graph as a whole?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels