ThoughtKnot for developers

Graph libraries

The JavaScript and Python libraries offer the same operations and give the same answers. A test holds both to the list below.

The operations

Operation JavaScript Python Takes Gives
readreadgql_profile.Store.applya data block's textnothing; the graph is added to the store
worldworldFromStoregraph_rules.World.from_storea storeeach graph by name, ready for the rules
headerheadergql_profile.headera block's textthe graph's name and the block's kind: data, schema, query, changeset or excerpt
tokenstokensgql_profile.tokensa block's textevery token: kind, text, line, as written, and where it ends
check_syntaxcheckSyntaxgql_profile.check_syntaxa block's textnothing when the block is in the profile, else the ProfileError (returned, not raised)
canoncanongraph_rules.canona graph, as worldFromStore / World.from_store gives itthe graph's canonical hash, 64 lower-case hex digits (requirements/graph-spec-canonical.md)
jcsjcsgraph_rules.jcsa valueits RFC 8785 JSON text
hash16hash16graph_rules.hash16a valuethe first 16 hex digits of the SHA-256 of its RFC 8785 JSON
basis_hashbasisHashgraph_rules.basis_hasha thing's properties; the property names read, comma-separatedthe short hash of only those properties
namednamedgraph_rules.nameda hash's digitsthe digits with their algorithm's name in front (requirements/hashes.md)
is_namedisNamedgraph_rules.is_nameda valuewhether it is a hash that names its algorithm
changeset_headerchangesetHeadergraph_rules.changeset_headera change set's textits header fields, or nothing when it has none
check_changesetcheckChangesetgraph_rules.check_changesetthe base graphs; a change set's text; the type matrix (optional)the rules' verdicts, the change set read, and a problem if it was refused
checkcheckgraph_rules.checka world; a graph's name; the type matrix (optional)a verdict for each rule: its name, whether it holds, and why
section20section20graph_rules.section20a graph, as worldFromStore / World.from_store gives it; the rule switches (optional)a verdict for each certainty rule
paths_rulespathsRulesgraph_rules.paths_rulesa graph, as worldFromStore / World.from_store gives ita verdict for each path and altitude rule
completenesscompletenessgraph_rules.completenessa graph, as worldFromStore / World.from_store gives it; today's date (optional)the gaps found, by kind
projectprojectgraph_rules.projecta graph, as worldFromStore / World.from_store gives itthe graph's blocks and links as plain data
rebuildrebuildgraph_rules.rebuilda graph's name; its blocks; its linksthe graph's text, written from them
projects_backprojectsBackgraph_rules.projects_backa graph, as worldFromStore / World.from_store gives it; its namewhether projecting and rebuilding gives the graph back
lens_bucketslensBucketsgraph_rules.lens_bucketsa graph, as worldFromStore / World.from_store gives it; a lens rulewhich bucket each thing falls in, or nothing without a rule

How a problem is reported

Raised as: ProfileError.

A problem code is never reused, so a code you stored always means what it meant.