{"action":"created","comment":{"url":"https://api.github.com/repos/LLNL/conduit/pulls/comments/79895338","id":79895338,"diff_hunk":"@@ -94,8 +133,504 @@ bool\n verify(const Node &n,\n        Node &info)\n {\n-    return false;\n+    bool res = true;\n+\n+    // note \"errors\" is a list, this allows us to log multiple errors.\n+    // Given that not conforming result is likely to trigger an error \n+    // state in client code it seems like we should give as much info as\n+    // possible about what is wrong with the mesh, so we don't early\n+    // return when an error is found.\n+    \n+    // required: \"coordsets\", with at least one child\n+    //  each child must conform to \"mesh::coordset\"\n+    if(!n.has_child(\"coordsets\"))\n+    {\n+        info[\"errors\"].append().set(\"missing child node \\\"coordsets\\\"\");\n+        res = false;\n+    }\n+    else if(n[\"coordsets\"].number_of_children() == 0)\n+    {\n+        info[\"errors\"].append().set(\"\\\"coordsets\\\" has no children\");\n+        res = false;\n+    }\n+    else\n+    {\n+        NodeConstIterator itr = n[\"coordsets\"].children();\n+    \n+        while(itr.has_next())\n+        {\n+            const Node &chld = itr.next();\n+            const std::string chld_name = itr.path();\n+\n+            if(!coordset::verify(chld,info[\"coordsets/\" + chld_name]))\n+            {\n+                info[\"errors\"].append().set(chld_name \n+                                + \" is not a valid blueprint::mesh::coordset\");\n+                res = false;\n+            }\n+        }\n+    }\n+    \n+    // required: \"topologies\",  with at least one child\n+    // each child must conform to \"mesh::topology\"\n+    if(!n.has_child(\"topologies\"))\n+    {\n+        info[\"errors\"].append().set(\"missing child node \\\"topologies\\\"\");\n+        res = false;\n+    }\n+    else if(n[\"topologies\"].number_of_children() == 0)\n+    {\n+        info[\"errors\"].append().set(\"\\\"topologies\\\" has no children\");\n+        res = false;\n+    }\n+    else\n+    {\n+    \n+        NodeConstIterator itr = n[\"topologies\"].children();\n+        \n+        while(itr.has_next())\n+        {\n+            const Node &chld = itr.next();\n+            const std::string chld_name = itr.path();\n+\n+            if(!topology::verify(chld,info[\"topologies\"][chld_name]))\n+            {\n+                info[\"errors\"].append().set(chld_name \n+                                + \" is not a valid blueprint::mesh::topology\");\n+                res = false;\n+            }\n+\n+            // make sure the topology references a valid coordset\n+            std::string coords_name = chld[\"coordset\"].as_string();\n+            \n+            if(!n[\"coordsets\"].has_child(coords_name))\n+            {\n+                std::ostringstream oss;\n+                oss << \"topology \"\n+                    << \"\\\"\" << chld_name  << \"\\\" \"\n+                    << \"references a non-existent coordset \"\n+                    << \"\\\"\" << coords_name  << \"\\\" \";\n+                info[\"errors\"].append().set(oss.str());\n+                res = false;\n+            }\n+            else if(info[\"coordsets\"][coords_name][\"valid\"].as_string() != \"true\")\n+            {\n+                std::ostringstream oss;\n+                oss << \"topology \"\n+                    << \"\\\"\" << chld_name  << \"\\\" \"\n+                    << \"references a invalid coordset \"\n+                    << \"\\\"\" << coords_name  << \"\\\" \";\n+                info[\"errors\"].append().set(oss.str());\n+                res = false;\n+            }\n+        }\n+    }\n+    \n+    // optional: \"fields\", each child must conform to \"mesh::field\"","path":"src/libs/blueprint/blueprint_mesh.cpp","position":151,"original_position":151,"commit_id":"f32e1e13eb5b02ce9dfa626e5a5cb8d6d97446de","original_commit_id":"f32e1e13eb5b02ce9dfa626e5a5cb8d6d97446de","user":{"login":"xjrc","id":17277866,"avatar_url":"https://avatars.githubusercontent.com/u/17277866?v=3","gravatar_id":"","url":"https://api.github.com/users/xjrc","html_url":"https://github.com/xjrc","followers_url":"https://api.github.com/users/xjrc/followers","following_url":"https://api.github.com/users/xjrc/following{/other_user}","gists_url":"https://api.github.com/users/xjrc/gists{/gist_id}","starred_url":"https://api.github.com/users/xjrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xjrc/subscriptions","organizations_url":"https://api.github.com/users/xjrc/orgs","repos_url":"https://api.github.com/users/xjrc/repos","events_url":"https://api.github.com/users/xjrc/events{/privacy}","received_events_url":"https://api.github.com/users/xjrc/received_events","type":"User","site_admin":false},"body":"It may be worth noting in the `info` node that this section is optional as is done with the extra dimensions for nodes in the `coordset::verify_coordset_uniform` function below.","created_at":"2016-09-21T18:01:54Z","updated_at":"2016-09-21T18:01:54Z","html_url":"https://github.com/LLNL/conduit/pull/55#discussion_r79895338","pull_request_url":"https://api.github.com/repos/LLNL/conduit/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/LLNL/conduit/pulls/comments/79895338"},"html":{"href":"https://github.com/LLNL/conduit/pull/55#discussion_r79895338"},"pull_request":{"href":"https://api.github.com/repos/LLNL/conduit/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/LLNL/conduit/pulls/55","id":86073781,"html_url":"https://github.com/LLNL/conduit/pull/55","diff_url":"https://github.com/LLNL/conduit/pull/55.diff","patch_url":"https://github.com/LLNL/conduit/pull/55.patch","issue_url":"https://api.github.com/repos/LLNL/conduit/issues/55","number":55,"state":"open","locked":false,"title":"enh: add shell namespaces and verify for mesh bp","user":{"login":"cyrush","id":1194526,"avatar_url":"https://avatars.githubusercontent.com/u/1194526?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrush","html_url":"https://github.com/cyrush","followers_url":"https://api.github.com/users/cyrush/followers","following_url":"https://api.github.com/users/cyrush/following{/other_user}","gists_url":"https://api.github.com/users/cyrush/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrush/subscriptions","organizations_url":"https://api.github.com/users/cyrush/orgs","repos_url":"https://api.github.com/users/cyrush/repos","events_url":"https://api.github.com/users/cyrush/events{/privacy}","received_events_url":"https://api.github.com/users/cyrush/received_events","type":"User","site_admin":false},"body":"added implementation of mesh/coordset verify\r\n\r\nadded implementation of mesh verify that relies on:\r\n mesh/coordset (implemented)\r\n mesh/topology (unimplemented)\r\n mesh/field (unimplemented)\r\n\r\nadded info output to mcarray verify\r\n\r\nwired generic interface for path based protocol identification\r\n\r\n ex:\r\n  blueprint::verify(n,\"mesh/coordset\")\r\n   maps to\r\n  blueprint::mesh::coordset::verify(n,\"mesh/coordset\")\r\n\r\nstill evolving structure of the info output for verify, but\r\nit looks like the following:\r\n\r\n{\r\n  valid = \"true\" or \"false\"\r\n  (if errors)\r\n      errors = [\"error string 1\", \"error string 2\"]\r\n\r\n  child\r\n  {\r\n    valid = \"true\" or \"false\"\r\n    (if errors)\r\n        errors = [\"error string 1\", \"error string 2\"]\r\n  }\r\n  ...\r\n}\r\n\r\nthis allows us to report errors at any part in a hierarchy, but\r\nassumes protocols won't require the names \"valid\" or \"errors\"","created_at":"2016-09-20T23:23:05Z","updated_at":"2016-09-21T18:01:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"261a760336b4ecfbc239c2736fa33f3cfbeb1bc6","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/LLNL/conduit/milestones/1","html_url":"https://github.com/LLNL/conduit/milestones/0.2.0","labels_url":"https://api.github.com/repos/LLNL/conduit/milestones/1/labels","id":1901215,"number":1,"title":"0.2.0","description":"Release with relay hdf5 functionality needed to support the VisIt Blueprint Plugin","creator":{"login":"cyrush","id":1194526,"avatar_url":"https://avatars.githubusercontent.com/u/1194526?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrush","html_url":"https://github.com/cyrush","followers_url":"https://api.github.com/users/cyrush/followers","following_url":"https://api.github.com/users/cyrush/following{/other_user}","gists_url":"https://api.github.com/users/cyrush/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrush/subscriptions","organizations_url":"https://api.github.com/users/cyrush/orgs","repos_url":"https://api.github.com/users/cyrush/repos","events_url":"https://api.github.com/users/cyrush/events{/privacy}","received_events_url":"https://api.github.com/users/cyrush/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":13,"state":"open","created_at":"2016-07-24T21:27:31Z","updated_at":"2016-09-21T17:37:43Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/LLNL/conduit/pulls/55/commits","review_comments_url":"https://api.github.com/repos/LLNL/conduit/pulls/55/comments","review_comment_url":"https://api.github.com/repos/LLNL/conduit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LLNL/conduit/issues/55/comments","statuses_url":"https://api.github.com/repos/LLNL/conduit/statuses/f32e1e13eb5b02ce9dfa626e5a5cb8d6d97446de","head":{"label":"LLNL:enh/2016_09_blueprint_mesh_verify","ref":"enh/2016_09_blueprint_mesh_verify","sha":"f32e1e13eb5b02ce9dfa626e5a5cb8d6d97446de","user":{"login":"LLNL","id":5921419,"avatar_url":"https://avatars.githubusercontent.com/u/5921419?v=3","gravatar_id":"","url":"https://api.github.com/users/LLNL","html_url":"https://github.com/LLNL","followers_url":"https://api.github.com/users/LLNL/followers","following_url":"https://api.github.com/users/LLNL/following{/other_user}","gists_url":"https://api.github.com/users/LLNL/gists{/gist_id}","starred_url":"https://api.github.com/users/LLNL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLNL/subscriptions","organizations_url":"https://api.github.com/users/LLNL/orgs","repos_url":"https://api.github.com/users/LLNL/repos","events_url":"https://api.github.com/users/LLNL/events{/privacy}","received_events_url":"https://api.github.com/users/LLNL/received_events","type":"Organization","site_admin":false},"repo":{"id":40552086,"name":"conduit","full_name":"LLNL/conduit","owner":{"login":"LLNL","id":5921419,"avatar_url":"https://avatars.githubusercontent.com/u/5921419?v=3","gravatar_id":"","url":"https://api.github.com/users/LLNL","html_url":"https://github.com/LLNL","followers_url":"https://api.github.com/users/LLNL/followers","following_url":"https://api.github.com/users/LLNL/following{/other_user}","gists_url":"https://api.github.com/users/LLNL/gists{/gist_id}","starred_url":"https://api.github.com/users/LLNL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLNL/subscriptions","organizations_url":"https://api.github.com/users/LLNL/orgs","repos_url":"https://api.github.com/users/LLNL/repos","events_url":"https://api.github.com/users/LLNL/events{/privacy}","received_events_url":"https://api.github.com/users/LLNL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LLNL/conduit","description":"Simplified Data Exchange for HPC Simulations","fork":false,"url":"https://api.github.com/repos/LLNL/conduit","forks_url":"https://api.github.com/repos/LLNL/conduit/forks","keys_url":"https://api.github.com/repos/LLNL/conduit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LLNL/conduit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LLNL/conduit/teams","hooks_url":"https://api.github.com/repos/LLNL/conduit/hooks","issue_events_url":"https://api.github.com/repos/LLNL/conduit/issues/events{/number}","events_url":"https://api.github.com/repos/LLNL/conduit/events","assignees_url":"https://api.github.com/repos/LLNL/conduit/assignees{/user}","branches_url":"https://api.github.com/repos/LLNL/conduit/branches{/branch}","tags_url":"https://api.github.com/repos/LLNL/conduit/tags","blobs_url":"https://api.github.com/repos/LLNL/conduit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LLNL/conduit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LLNL/conduit/git/refs{/sha}","trees_url":"https://api.github.com/repos/LLNL/conduit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LLNL/conduit/statuses/{sha}","languages_url":"https://api.github.com/repos/LLNL/conduit/languages","stargazers_url":"https://api.github.com/repos/LLNL/conduit/stargazers","contributors_url":"https://api.github.com/repos/LLNL/conduit/contributors","subscribers_url":"https://api.github.com/repos/LLNL/conduit/subscribers","subscription_url":"https://api.github.com/repos/LLNL/conduit/subscription","commits_url":"https://api.github.com/repos/LLNL/conduit/commits{/sha}","git_commits_url":"https://api.github.com/repos/LLNL/conduit/git/commits{/sha}","comments_url":"https://api.github.com/repos/LLNL/conduit/comments{/number}","issue_comment_url":"https://api.github.com/repos/LLNL/conduit/issues/comments{/number}","contents_url":"https://api.github.com/repos/LLNL/conduit/contents/{+path}","compare_url":"https://api.github.com/repos/LLNL/conduit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LLNL/conduit/merges","archive_url":"https://api.github.com/repos/LLNL/conduit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LLNL/conduit/downloads","issues_url":"https://api.github.com/repos/LLNL/conduit/issues{/number}","pulls_url":"https://api.github.com/repos/LLNL/conduit/pulls{/number}","milestones_url":"https://api.github.com/repos/LLNL/conduit/milestones{/number}","notifications_url":"https://api.github.com/repos/LLNL/conduit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LLNL/conduit/labels{/name}","releases_url":"https://api.github.com/repos/LLNL/conduit/releases{/id}","deployments_url":"https://api.github.com/repos/LLNL/conduit/deployments","created_at":"2015-08-11T16:14:10Z","updated_at":"2016-09-02T17:44:48Z","pushed_at":"2016-09-21T17:52:46Z","git_url":"git://github.com/LLNL/conduit.git","ssh_url":"git@github.com:LLNL/conduit.git","clone_url":"https://github.com/LLNL/conduit.git","svn_url":"https://github.com/LLNL/conduit","homepage":"http://software.llnl.gov/conduit","size":19016,"stargazers_count":14,"watchers_count":14,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":16,"forks":6,"open_issues":16,"watchers":14,"default_branch":"master"}},"base":{"label":"LLNL:master","ref":"master","sha":"16b0216a896efdf6c8558f7b3965f683d2dc628f","user":{"login":"LLNL","id":5921419,"avatar_url":"https://avatars.githubusercontent.com/u/5921419?v=3","gravatar_id":"","url":"https://api.github.com/users/LLNL","html_url":"https://github.com/LLNL","followers_url":"https://api.github.com/users/LLNL/followers","following_url":"https://api.github.com/users/LLNL/following{/other_user}","gists_url":"https://api.github.com/users/LLNL/gists{/gist_id}","starred_url":"https://api.github.com/users/LLNL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLNL/subscriptions","organizations_url":"https://api.github.com/users/LLNL/orgs","repos_url":"https://api.github.com/users/LLNL/repos","events_url":"https://api.github.com/users/LLNL/events{/privacy}","received_events_url":"https://api.github.com/users/LLNL/received_events","type":"Organization","site_admin":false},"repo":{"id":40552086,"name":"conduit","full_name":"LLNL/conduit","owner":{"login":"LLNL","id":5921419,"avatar_url":"https://avatars.githubusercontent.com/u/5921419?v=3","gravatar_id":"","url":"https://api.github.com/users/LLNL","html_url":"https://github.com/LLNL","followers_url":"https://api.github.com/users/LLNL/followers","following_url":"https://api.github.com/users/LLNL/following{/other_user}","gists_url":"https://api.github.com/users/LLNL/gists{/gist_id}","starred_url":"https://api.github.com/users/LLNL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LLNL/subscriptions","organizations_url":"https://api.github.com/users/LLNL/orgs","repos_url":"https://api.github.com/users/LLNL/repos","events_url":"https://api.github.com/users/LLNL/events{/privacy}","received_events_url":"https://api.github.com/users/LLNL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LLNL/conduit","description":"Simplified Data Exchange for HPC Simulations","fork":false,"url":"https://api.github.com/repos/LLNL/conduit","forks_url":"https://api.github.com/repos/LLNL/conduit/forks","keys_url":"https://api.github.com/repos/LLNL/conduit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LLNL/conduit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LLNL/conduit/teams","hooks_url":"https://api.github.com/repos/LLNL/conduit/hooks","issue_events_url":"https://api.github.com/repos/LLNL/conduit/issues/events{/number}","events_url":"https://api.github.com/repos/LLNL/conduit/events","assignees_url":"https://api.github.com/repos/LLNL/conduit/assignees{/user}","branches_url":"https://api.github.com/repos/LLNL/conduit/branches{/branch}","tags_url":"https://api.github.com/repos/LLNL/conduit/tags","blobs_url":"https://api.github.com/repos/LLNL/conduit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LLNL/conduit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LLNL/conduit/git/refs{/sha}","trees_url":"https://api.github.com/repos/LLNL/conduit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LLNL/conduit/statuses/{sha}","languages_url":"https://api.github.com/repos/LLNL/conduit/languages","stargazers_url":"https://api.github.com/repos/LLNL/conduit/stargazers","contributors_url":"https://api.github.com/repos/LLNL/conduit/contributors","subscribers_url":"https://api.github.com/repos/LLNL/conduit/subscribers","subscription_url":"https://api.github.com/repos/LLNL/conduit/subscription","commits_url":"https://api.github.com/repos/LLNL/conduit/commits{/sha}","git_commits_url":"https://api.github.com/repos/LLNL/conduit/git/commits{/sha}","comments_url":"https://api.github.com/repos/LLNL/conduit/comments{/number}","issue_comment_url":"https://api.github.com/repos/LLNL/conduit/issues/comments{/number}","contents_url":"https://api.github.com/repos/LLNL/conduit/contents/{+path}","compare_url":"https://api.github.com/repos/LLNL/conduit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LLNL/conduit/merges","archive_url":"https://api.github.com/repos/LLNL/conduit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LLNL/conduit/downloads","issues_url":"https://api.github.com/repos/LLNL/conduit/issues{/number}","pulls_url":"https://api.github.com/repos/LLNL/conduit/pulls{/number}","milestones_url":"https://api.github.com/repos/LLNL/conduit/milestones{/number}","notifications_url":"https://api.github.com/repos/LLNL/conduit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LLNL/conduit/labels{/name}","releases_url":"https://api.github.com/repos/LLNL/conduit/releases{/id}","deployments_url":"https://api.github.com/repos/LLNL/conduit/deployments","created_at":"2015-08-11T16:14:10Z","updated_at":"2016-09-02T17:44:48Z","pushed_at":"2016-09-21T17:52:46Z","git_url":"git://github.com/LLNL/conduit.git","ssh_url":"git@github.com:LLNL/conduit.git","clone_url":"https://github.com/LLNL/conduit.git","svn_url":"https://github.com/LLNL/conduit","homepage":"http://software.llnl.gov/conduit","size":19016,"stargazers_count":14,"watchers_count":14,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":16,"forks":6,"open_issues":16,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LLNL/conduit/pulls/55"},"html":{"href":"https://github.com/LLNL/conduit/pull/55"},"issue":{"href":"https://api.github.com/repos/LLNL/conduit/issues/55"},"comments":{"href":"https://api.github.com/repos/LLNL/conduit/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/LLNL/conduit/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/LLNL/conduit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LLNL/conduit/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/LLNL/conduit/statuses/f32e1e13eb5b02ce9dfa626e5a5cb8d6d97446de"}}}}
{"actor":{"display_login":"xjrc"}}