enhance: bb task for creating graphs from EDN file

Converted inferred graph to an EDN file now that this task exists. Also
merge last of tasks.create-graph to relevant ns so that external users
can also create such tasks
This commit is contained in:
Gabriel Horner
2024-06-11 10:03:02 -04:00
parent 2d3f152454
commit 0e1ada2ef6
12 changed files with 151 additions and 117 deletions

View File

@@ -0,0 +1,21 @@
;; Script that generates classes and properties for a demo of inferring properties.
;; To generate this graph:
;; bb dev:db-create inferred deps/db/create_graph/inferred.edn
;;
;; To try the demo in the UI, in any page type:
;; - Good Will Hunting #Movie #Ben-Affleck
;; or
;; - DB 3 #Meeting #Tienson
{:auto-create-ontology? true
:classes {:Movie {:build/schema-properties [:actor :comment]}
:Meeting {:build/schema-properties [:attendee :duration]}}
:properties
{:actor {:block/schema {:type :object :cardinality :many}
:build/schema-classes [:Person]}
:attendee {:block/schema {:type :object :cardinality :many}
:build/schema-classes [:Person]}}
:pages-and-blocks
[{:page {:block/original-name "Matt-Damon" :build/tags [:Person]}}
{:page {:block/original-name "Ben-Affleck" :build/tags [:Person]}}
{:page {:block/original-name "Tienson" :build/tags [:Person]}}
{:page {:block/original-name "Zhiyuan" :build/tags [:Person]}}]}