{"action":"created","comment":{"url":"https://api.github.com/repos/vertexproject/synapse/pulls/comments/188640945","pull_request_review_id":120659551,"id":188640945,"diff_hunk":"@@ -622,11 +622,39 @@ def indxByEq(self, valu):\n             ('pref', indx),\n         )\n \n+# FIXME Add tests for FieldHelper sad paths\n+class FieldHelper(collections.defaultdict):\n+    '''\n+    Helper for Comp types. Performs Type lookup/creation upon first use.\n+    '''\n+    def __init__(self, modl, fields):\n+        collections.defaultdict.__init__(self)\n+        self.modl = modl\n+        self.fields = {name: tname for name, tname in fields}\n+\n+    def __missing__(self, key):\n+        val = self.fields.get(key)\n+        if not val:\n+            raise s_exc.BadTypeDef(valu=key, mesg='unconfigured field requested')\n+        if isinstance(val, str):\n+            _type = self.modl.type(val)\n+            if not _type:\n+                raise s_exc.BadTypeDef(valu=val, mesg='type is not present in datamodel')\n+        else:\n+            # val is a type, opts pair\n+            tname, opts = val\n+            basetype = self.modl.type(tname)\n+            if not basetype:\n+                raise s_exc.BadTypeDef(valu=val, mesg='type is not present in datamodel')","path":"synapse/lib/types.py","position":27,"original_position":27,"commit_id":"cef663435d24f9ce4a37568019a0c1c0e0ae47e6","original_commit_id":"cef663435d24f9ce4a37568019a0c1c0e0ae47e6","user":{"login":"vertexmc","id":25180408,"avatar_url":"https://avatars1.githubusercontent.com/u/25180408?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexmc","html_url":"https://github.com/vertexmc","followers_url":"https://api.github.com/users/vertexmc/followers","following_url":"https://api.github.com/users/vertexmc/following{/other_user}","gists_url":"https://api.github.com/users/vertexmc/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexmc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexmc/subscriptions","organizations_url":"https://api.github.com/users/vertexmc/orgs","repos_url":"https://api.github.com/users/vertexmc/repos","events_url":"https://api.github.com/users/vertexmc/events{/privacy}","received_events_url":"https://api.github.com/users/vertexmc/received_events","type":"User","site_admin":false},"body":"not covered","created_at":"2018-05-16T14:14:07Z","updated_at":"2018-05-16T14:14:07Z","html_url":"https://github.com/vertexproject/synapse/pull/777#discussion_r188640945","pull_request_url":"https://api.github.com/repos/vertexproject/synapse/pulls/777","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/comments/188640945"},"html":{"href":"https://github.com/vertexproject/synapse/pull/777#discussion_r188640945"},"pull_request":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/777"}}},"pull_request":{"url":"https://api.github.com/repos/vertexproject/synapse/pulls/777","id":188268512,"html_url":"https://github.com/vertexproject/synapse/pull/777","diff_url":"https://github.com/vertexproject/synapse/pull/777.diff","patch_url":"https://github.com/vertexproject/synapse/pull/777.patch","issue_url":"https://api.github.com/repos/vertexproject/synapse/issues/777","number":777,"state":"open","locked":false,"title":"010 infotech","user":{"login":"vEpiphyte","id":26100278,"avatar_url":"https://avatars2.githubusercontent.com/u/26100278?v=4","gravatar_id":"","url":"https://api.github.com/users/vEpiphyte","html_url":"https://github.com/vEpiphyte","followers_url":"https://api.github.com/users/vEpiphyte/followers","following_url":"https://api.github.com/users/vEpiphyte/following{/other_user}","gists_url":"https://api.github.com/users/vEpiphyte/gists{/gist_id}","starred_url":"https://api.github.com/users/vEpiphyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vEpiphyte/subscriptions","organizations_url":"https://api.github.com/users/vEpiphyte/orgs","repos_url":"https://api.github.com/users/vEpiphyte/repos","events_url":"https://api.github.com/users/vEpiphyte/events{/privacy}","received_events_url":"https://api.github.com/users/vEpiphyte/received_events","type":"User","site_admin":false},"body":"- Bugfix in snap prop set callbacks\r\n- Bugfix in subs population on a node\r\n- Bugfix in FilePath subs population\r\n- Initial port of infotech model","created_at":"2018-05-15T22:03:03Z","updated_at":"2018-05-16T14:14:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b5f08e981bc5c493a4c8c1e787acb88c0e1b9ce","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vertexproject/synapse/pulls/777/commits","review_comments_url":"https://api.github.com/repos/vertexproject/synapse/pulls/777/comments","review_comment_url":"https://api.github.com/repos/vertexproject/synapse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vertexproject/synapse/issues/777/comments","statuses_url":"https://api.github.com/repos/vertexproject/synapse/statuses/cef663435d24f9ce4a37568019a0c1c0e0ae47e6","head":{"label":"vertexproject:010_infotech","ref":"010_infotech","sha":"cef663435d24f9ce4a37568019a0c1c0e0ae47e6","user":{"login":"vertexproject","id":21201579,"avatar_url":"https://avatars2.githubusercontent.com/u/21201579?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexproject","html_url":"https://github.com/vertexproject","followers_url":"https://api.github.com/users/vertexproject/followers","following_url":"https://api.github.com/users/vertexproject/following{/other_user}","gists_url":"https://api.github.com/users/vertexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexproject/subscriptions","organizations_url":"https://api.github.com/users/vertexproject/orgs","repos_url":"https://api.github.com/users/vertexproject/repos","events_url":"https://api.github.com/users/vertexproject/events{/privacy}","received_events_url":"https://api.github.com/users/vertexproject/received_events","type":"Organization","site_admin":false},"repo":{"id":37228107,"name":"synapse","full_name":"vertexproject/synapse","owner":{"login":"vertexproject","id":21201579,"avatar_url":"https://avatars2.githubusercontent.com/u/21201579?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexproject","html_url":"https://github.com/vertexproject","followers_url":"https://api.github.com/users/vertexproject/followers","following_url":"https://api.github.com/users/vertexproject/following{/other_user}","gists_url":"https://api.github.com/users/vertexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexproject/subscriptions","organizations_url":"https://api.github.com/users/vertexproject/orgs","repos_url":"https://api.github.com/users/vertexproject/repos","events_url":"https://api.github.com/users/vertexproject/events{/privacy}","received_events_url":"https://api.github.com/users/vertexproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vertexproject/synapse","description":"Distributed Key-Value Hypergraph Analysis Framework","fork":false,"url":"https://api.github.com/repos/vertexproject/synapse","forks_url":"https://api.github.com/repos/vertexproject/synapse/forks","keys_url":"https://api.github.com/repos/vertexproject/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vertexproject/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vertexproject/synapse/teams","hooks_url":"https://api.github.com/repos/vertexproject/synapse/hooks","issue_events_url":"https://api.github.com/repos/vertexproject/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/vertexproject/synapse/events","assignees_url":"https://api.github.com/repos/vertexproject/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/vertexproject/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/vertexproject/synapse/tags","blobs_url":"https://api.github.com/repos/vertexproject/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vertexproject/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vertexproject/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/vertexproject/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vertexproject/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/vertexproject/synapse/languages","stargazers_url":"https://api.github.com/repos/vertexproject/synapse/stargazers","contributors_url":"https://api.github.com/repos/vertexproject/synapse/contributors","subscribers_url":"https://api.github.com/repos/vertexproject/synapse/subscribers","subscription_url":"https://api.github.com/repos/vertexproject/synapse/subscription","commits_url":"https://api.github.com/repos/vertexproject/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/vertexproject/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/vertexproject/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/vertexproject/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/vertexproject/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/vertexproject/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vertexproject/synapse/merges","archive_url":"https://api.github.com/repos/vertexproject/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vertexproject/synapse/downloads","issues_url":"https://api.github.com/repos/vertexproject/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/vertexproject/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/vertexproject/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/vertexproject/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vertexproject/synapse/labels{/name}","releases_url":"https://api.github.com/repos/vertexproject/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/vertexproject/synapse/deployments","created_at":"2015-06-10T23:29:41Z","updated_at":"2018-05-09T20:35:15Z","pushed_at":"2018-05-15T22:12:46Z","git_url":"git://github.com/vertexproject/synapse.git","ssh_url":"git@github.com:vertexproject/synapse.git","clone_url":"https://github.com/vertexproject/synapse.git","svn_url":"https://github.com/vertexproject/synapse","homepage":"","size":7879,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":60,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":28,"open_issues":60,"watchers":43,"default_branch":"master"}},"base":{"label":"vertexproject:010","ref":"010","sha":"06c772af463249af4f51bfbfc6066e197b4881c2","user":{"login":"vertexproject","id":21201579,"avatar_url":"https://avatars2.githubusercontent.com/u/21201579?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexproject","html_url":"https://github.com/vertexproject","followers_url":"https://api.github.com/users/vertexproject/followers","following_url":"https://api.github.com/users/vertexproject/following{/other_user}","gists_url":"https://api.github.com/users/vertexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexproject/subscriptions","organizations_url":"https://api.github.com/users/vertexproject/orgs","repos_url":"https://api.github.com/users/vertexproject/repos","events_url":"https://api.github.com/users/vertexproject/events{/privacy}","received_events_url":"https://api.github.com/users/vertexproject/received_events","type":"Organization","site_admin":false},"repo":{"id":37228107,"name":"synapse","full_name":"vertexproject/synapse","owner":{"login":"vertexproject","id":21201579,"avatar_url":"https://avatars2.githubusercontent.com/u/21201579?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexproject","html_url":"https://github.com/vertexproject","followers_url":"https://api.github.com/users/vertexproject/followers","following_url":"https://api.github.com/users/vertexproject/following{/other_user}","gists_url":"https://api.github.com/users/vertexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexproject/subscriptions","organizations_url":"https://api.github.com/users/vertexproject/orgs","repos_url":"https://api.github.com/users/vertexproject/repos","events_url":"https://api.github.com/users/vertexproject/events{/privacy}","received_events_url":"https://api.github.com/users/vertexproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vertexproject/synapse","description":"Distributed Key-Value Hypergraph Analysis Framework","fork":false,"url":"https://api.github.com/repos/vertexproject/synapse","forks_url":"https://api.github.com/repos/vertexproject/synapse/forks","keys_url":"https://api.github.com/repos/vertexproject/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vertexproject/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vertexproject/synapse/teams","hooks_url":"https://api.github.com/repos/vertexproject/synapse/hooks","issue_events_url":"https://api.github.com/repos/vertexproject/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/vertexproject/synapse/events","assignees_url":"https://api.github.com/repos/vertexproject/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/vertexproject/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/vertexproject/synapse/tags","blobs_url":"https://api.github.com/repos/vertexproject/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vertexproject/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vertexproject/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/vertexproject/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vertexproject/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/vertexproject/synapse/languages","stargazers_url":"https://api.github.com/repos/vertexproject/synapse/stargazers","contributors_url":"https://api.github.com/repos/vertexproject/synapse/contributors","subscribers_url":"https://api.github.com/repos/vertexproject/synapse/subscribers","subscription_url":"https://api.github.com/repos/vertexproject/synapse/subscription","commits_url":"https://api.github.com/repos/vertexproject/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/vertexproject/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/vertexproject/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/vertexproject/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/vertexproject/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/vertexproject/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vertexproject/synapse/merges","archive_url":"https://api.github.com/repos/vertexproject/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vertexproject/synapse/downloads","issues_url":"https://api.github.com/repos/vertexproject/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/vertexproject/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/vertexproject/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/vertexproject/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vertexproject/synapse/labels{/name}","releases_url":"https://api.github.com/repos/vertexproject/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/vertexproject/synapse/deployments","created_at":"2015-06-10T23:29:41Z","updated_at":"2018-05-09T20:35:15Z","pushed_at":"2018-05-15T22:12:46Z","git_url":"git://github.com/vertexproject/synapse.git","ssh_url":"git@github.com:vertexproject/synapse.git","clone_url":"https://github.com/vertexproject/synapse.git","svn_url":"https://github.com/vertexproject/synapse","homepage":"","size":7879,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":60,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":28,"open_issues":60,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/777"},"html":{"href":"https://github.com/vertexproject/synapse/pull/777"},"issue":{"href":"https://api.github.com/repos/vertexproject/synapse/issues/777"},"comments":{"href":"https://api.github.com/repos/vertexproject/synapse/issues/777/comments"},"review_comments":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/777/comments"},"review_comment":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/777/commits"},"statuses":{"href":"https://api.github.com/repos/vertexproject/synapse/statuses/cef663435d24f9ce4a37568019a0c1c0e0ae47e6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vertexmc"}}