{"action":"created","comment":{"url":"https://api.github.com/repos/simphony/simphony-common/pulls/comments/25767094","id":25767094,"diff_hunk":"@@ -346,6 +347,40 @@ def test_mesh_rename(self):\n             # \"foo\" name when adding another mesh\n             m = handle.add_mesh(Mesh(name=\"foo\"))\n \n+    def test_add_get_delete_lattice(self):\n+        lat = Lattice('test_lattice', 'cubic', (1.0, 1.0, 1.0),\n+                      (2, 3, 4), (0.0, 0.0, 0.0))\n+\n+        filename = os.path.join(self.temp_dir, 'test.cuds')\n+        with closing(H5CUDS.open(filename, 'w')) as handle:\n+            handle.add_lattice(lat)\n+            lat2 = handle.get_lattice('test_lattice')\n+\n+            self.assertEqual(lat2.name, 'test_lattice')\n+\n+            for N in lat2.iter_nodes():\n+                self.assertItemsEqual(N.data, lat.get_node(N.index).data)\n+\n+            handle.delete_lattice('test_lattice')\n+            numlat = 0\n+            for N in handle.iter_lattices():\n+                numlat += 1\n+            self.assertEqual(numlat, 0)\n+\n+    def test_iter_lattices(self):\n+        lat = Lattice('test_lattice', 'cubic', (1.0, 1.0, 1.0),\n+                      (2, 3, 4), (0.0, 0.0, 0.0))\n+\n+        lat2 = Lattice('test_lattice2', 'cubic', (1.0, 1.0, 1.0),\n+                       (3, 3, 3), (0.0, 0.0, 0.0))\n+\n+        filename = os.path.join(self.temp_dir, 'test.cuds')\n+        with closing(H5CUDS.open(filename, 'w')) as handle:\n+            handle.add_lattice(lat)\n+            handle.add_lattice(lat2)\n+            for lat in handle.iter_lattices():\n+                self.assertTrue(lat.name in ['test_lattice', 'test_lattice2'])\n+\n ","path":"simphony/io/tests/test_h5_cuds.py","position":null,"original_position":46,"commit_id":"857c65edac6140192688283866607f0c1599cdf2","original_commit_id":"4b12816c6c102ee9458507420a501b0238bc5d4d","user":{"login":"tuopuu","id":8424971,"avatar_url":"https://avatars.githubusercontent.com/u/8424971?v=3","gravatar_id":"","url":"https://api.github.com/users/tuopuu","html_url":"https://github.com/tuopuu","followers_url":"https://api.github.com/users/tuopuu/followers","following_url":"https://api.github.com/users/tuopuu/following{/other_user}","gists_url":"https://api.github.com/users/tuopuu/gists{/gist_id}","starred_url":"https://api.github.com/users/tuopuu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuopuu/subscriptions","organizations_url":"https://api.github.com/users/tuopuu/orgs","repos_url":"https://api.github.com/users/tuopuu/repos","events_url":"https://api.github.com/users/tuopuu/events{/privacy}","received_events_url":"https://api.github.com/users/tuopuu/received_events","type":"User","site_admin":false},"body":"Added a new commit that implements/fixes this functionality. ","created_at":"2015-03-04T11:10:51Z","updated_at":"2015-03-04T11:10:51Z","html_url":"https://github.com/simphony/simphony-common/pull/74#discussion_r25767094","pull_request_url":"https://api.github.com/repos/simphony/simphony-common/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/simphony/simphony-common/pulls/comments/25767094"},"html":{"href":"https://github.com/simphony/simphony-common/pull/74#discussion_r25767094"},"pull_request":{"href":"https://api.github.com/repos/simphony/simphony-common/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/simphony/simphony-common/pulls/74","id":30387306,"html_url":"https://github.com/simphony/simphony-common/pull/74","diff_url":"https://github.com/simphony/simphony-common/pull/74.diff","patch_url":"https://github.com/simphony/simphony-common/pull/74.patch","issue_url":"https://api.github.com/repos/simphony/simphony-common/issues/74","number":74,"state":"open","locked":false,"title":"PR: file_lattice_clean","user":{"login":"tuopuu","id":8424971,"avatar_url":"https://avatars.githubusercontent.com/u/8424971?v=3","gravatar_id":"","url":"https://api.github.com/users/tuopuu","html_url":"https://github.com/tuopuu","followers_url":"https://api.github.com/users/tuopuu/followers","following_url":"https://api.github.com/users/tuopuu/following{/other_user}","gists_url":"https://api.github.com/users/tuopuu/gists{/gist_id}","starred_url":"https://api.github.com/users/tuopuu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuopuu/subscriptions","organizations_url":"https://api.github.com/users/tuopuu/orgs","repos_url":"https://api.github.com/users/tuopuu/repos","events_url":"https://api.github.com/users/tuopuu/events{/privacy}","received_events_url":"https://api.github.com/users/tuopuu/received_events","type":"User","site_admin":false},"body":"Picked the commits from file_lattice2 into a new clean branch. This pull request adds basic functionality for H5CUDS-based lattices.\r\n- H5CUDS now has add/get/delete/iter_lattices methods\r\n- FileLattice implements ABCLattice in a H5CUDS-file\r\n- unittests for new methods are included\r\n","created_at":"2015-03-03T16:14:47Z","updated_at":"2015-03-04T11:10:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"903e46c1a68b9a450bfb23f4640755bfe702f3d6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/simphony/simphony-common/pulls/74/commits","review_comments_url":"https://api.github.com/repos/simphony/simphony-common/pulls/74/comments","review_comment_url":"https://api.github.com/repos/simphony/simphony-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/simphony/simphony-common/issues/74/comments","statuses_url":"https://api.github.com/repos/simphony/simphony-common/statuses/857c65edac6140192688283866607f0c1599cdf2","head":{"label":"simphony:file_lattice_clean","ref":"file_lattice_clean","sha":"857c65edac6140192688283866607f0c1599cdf2","user":{"login":"simphony","id":8048249,"avatar_url":"https://avatars.githubusercontent.com/u/8048249?v=3","gravatar_id":"","url":"https://api.github.com/users/simphony","html_url":"https://github.com/simphony","followers_url":"https://api.github.com/users/simphony/followers","following_url":"https://api.github.com/users/simphony/following{/other_user}","gists_url":"https://api.github.com/users/simphony/gists{/gist_id}","starred_url":"https://api.github.com/users/simphony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simphony/subscriptions","organizations_url":"https://api.github.com/users/simphony/orgs","repos_url":"https://api.github.com/users/simphony/repos","events_url":"https://api.github.com/users/simphony/events{/privacy}","received_events_url":"https://api.github.com/users/simphony/received_events","type":"Organization","site_admin":false},"repo":{"id":22651892,"name":"simphony-common","full_name":"simphony/simphony-common","owner":{"login":"simphony","id":8048249,"avatar_url":"https://avatars.githubusercontent.com/u/8048249?v=3","gravatar_id":"","url":"https://api.github.com/users/simphony","html_url":"https://github.com/simphony","followers_url":"https://api.github.com/users/simphony/followers","following_url":"https://api.github.com/users/simphony/following{/other_user}","gists_url":"https://api.github.com/users/simphony/gists{/gist_id}","starred_url":"https://api.github.com/users/simphony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simphony/subscriptions","organizations_url":"https://api.github.com/users/simphony/orgs","repos_url":"https://api.github.com/users/simphony/repos","events_url":"https://api.github.com/users/simphony/events{/privacy}","received_events_url":"https://api.github.com/users/simphony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simphony/simphony-common","description":"The native implementation of the Simphony cuds objects","fork":false,"url":"https://api.github.com/repos/simphony/simphony-common","forks_url":"https://api.github.com/repos/simphony/simphony-common/forks","keys_url":"https://api.github.com/repos/simphony/simphony-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simphony/simphony-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simphony/simphony-common/teams","hooks_url":"https://api.github.com/repos/simphony/simphony-common/hooks","issue_events_url":"https://api.github.com/repos/simphony/simphony-common/issues/events{/number}","events_url":"https://api.github.com/repos/simphony/simphony-common/events","assignees_url":"https://api.github.com/repos/simphony/simphony-common/assignees{/user}","branches_url":"https://api.github.com/repos/simphony/simphony-common/branches{/branch}","tags_url":"https://api.github.com/repos/simphony/simphony-common/tags","blobs_url":"https://api.github.com/repos/simphony/simphony-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simphony/simphony-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simphony/simphony-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/simphony/simphony-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simphony/simphony-common/statuses/{sha}","languages_url":"https://api.github.com/repos/simphony/simphony-common/languages","stargazers_url":"https://api.github.com/repos/simphony/simphony-common/stargazers","contributors_url":"https://api.github.com/repos/simphony/simphony-common/contributors","subscribers_url":"https://api.github.com/repos/simphony/simphony-common/subscribers","subscription_url":"https://api.github.com/repos/simphony/simphony-common/subscription","commits_url":"https://api.github.com/repos/simphony/simphony-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/simphony/simphony-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/simphony/simphony-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/simphony/simphony-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/simphony/simphony-common/contents/{+path}","compare_url":"https://api.github.com/repos/simphony/simphony-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simphony/simphony-common/merges","archive_url":"https://api.github.com/repos/simphony/simphony-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simphony/simphony-common/downloads","issues_url":"https://api.github.com/repos/simphony/simphony-common/issues{/number}","pulls_url":"https://api.github.com/repos/simphony/simphony-common/pulls{/number}","milestones_url":"https://api.github.com/repos/simphony/simphony-common/milestones{/number}","notifications_url":"https://api.github.com/repos/simphony/simphony-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simphony/simphony-common/labels{/name}","releases_url":"https://api.github.com/repos/simphony/simphony-common/releases{/id}","created_at":"2014-08-05T17:05:12Z","updated_at":"2015-02-27T09:25:30Z","pushed_at":"2015-03-04T11:07:41Z","git_url":"git://github.com/simphony/simphony-common.git","ssh_url":"git@github.com:simphony/simphony-common.git","clone_url":"https://github.com/simphony/simphony-common.git","svn_url":"https://github.com/simphony/simphony-common","homepage":null,"size":2208,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":21,"forks":3,"open_issues":21,"watchers":5,"default_branch":"master"}},"base":{"label":"simphony:master","ref":"master","sha":"4ad04227e7bbbeaf61f9b458eced5701b3584072","user":{"login":"simphony","id":8048249,"avatar_url":"https://avatars.githubusercontent.com/u/8048249?v=3","gravatar_id":"","url":"https://api.github.com/users/simphony","html_url":"https://github.com/simphony","followers_url":"https://api.github.com/users/simphony/followers","following_url":"https://api.github.com/users/simphony/following{/other_user}","gists_url":"https://api.github.com/users/simphony/gists{/gist_id}","starred_url":"https://api.github.com/users/simphony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simphony/subscriptions","organizations_url":"https://api.github.com/users/simphony/orgs","repos_url":"https://api.github.com/users/simphony/repos","events_url":"https://api.github.com/users/simphony/events{/privacy}","received_events_url":"https://api.github.com/users/simphony/received_events","type":"Organization","site_admin":false},"repo":{"id":22651892,"name":"simphony-common","full_name":"simphony/simphony-common","owner":{"login":"simphony","id":8048249,"avatar_url":"https://avatars.githubusercontent.com/u/8048249?v=3","gravatar_id":"","url":"https://api.github.com/users/simphony","html_url":"https://github.com/simphony","followers_url":"https://api.github.com/users/simphony/followers","following_url":"https://api.github.com/users/simphony/following{/other_user}","gists_url":"https://api.github.com/users/simphony/gists{/gist_id}","starred_url":"https://api.github.com/users/simphony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simphony/subscriptions","organizations_url":"https://api.github.com/users/simphony/orgs","repos_url":"https://api.github.com/users/simphony/repos","events_url":"https://api.github.com/users/simphony/events{/privacy}","received_events_url":"https://api.github.com/users/simphony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/simphony/simphony-common","description":"The native implementation of the Simphony cuds objects","fork":false,"url":"https://api.github.com/repos/simphony/simphony-common","forks_url":"https://api.github.com/repos/simphony/simphony-common/forks","keys_url":"https://api.github.com/repos/simphony/simphony-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simphony/simphony-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simphony/simphony-common/teams","hooks_url":"https://api.github.com/repos/simphony/simphony-common/hooks","issue_events_url":"https://api.github.com/repos/simphony/simphony-common/issues/events{/number}","events_url":"https://api.github.com/repos/simphony/simphony-common/events","assignees_url":"https://api.github.com/repos/simphony/simphony-common/assignees{/user}","branches_url":"https://api.github.com/repos/simphony/simphony-common/branches{/branch}","tags_url":"https://api.github.com/repos/simphony/simphony-common/tags","blobs_url":"https://api.github.com/repos/simphony/simphony-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simphony/simphony-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simphony/simphony-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/simphony/simphony-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simphony/simphony-common/statuses/{sha}","languages_url":"https://api.github.com/repos/simphony/simphony-common/languages","stargazers_url":"https://api.github.com/repos/simphony/simphony-common/stargazers","contributors_url":"https://api.github.com/repos/simphony/simphony-common/contributors","subscribers_url":"https://api.github.com/repos/simphony/simphony-common/subscribers","subscription_url":"https://api.github.com/repos/simphony/simphony-common/subscription","commits_url":"https://api.github.com/repos/simphony/simphony-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/simphony/simphony-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/simphony/simphony-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/simphony/simphony-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/simphony/simphony-common/contents/{+path}","compare_url":"https://api.github.com/repos/simphony/simphony-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simphony/simphony-common/merges","archive_url":"https://api.github.com/repos/simphony/simphony-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simphony/simphony-common/downloads","issues_url":"https://api.github.com/repos/simphony/simphony-common/issues{/number}","pulls_url":"https://api.github.com/repos/simphony/simphony-common/pulls{/number}","milestones_url":"https://api.github.com/repos/simphony/simphony-common/milestones{/number}","notifications_url":"https://api.github.com/repos/simphony/simphony-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simphony/simphony-common/labels{/name}","releases_url":"https://api.github.com/repos/simphony/simphony-common/releases{/id}","created_at":"2014-08-05T17:05:12Z","updated_at":"2015-02-27T09:25:30Z","pushed_at":"2015-03-04T11:07:41Z","git_url":"git://github.com/simphony/simphony-common.git","ssh_url":"git@github.com:simphony/simphony-common.git","clone_url":"https://github.com/simphony/simphony-common.git","svn_url":"https://github.com/simphony/simphony-common","homepage":null,"size":2208,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":21,"forks":3,"open_issues":21,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/simphony/simphony-common/pulls/74"},"html":{"href":"https://github.com/simphony/simphony-common/pull/74"},"issue":{"href":"https://api.github.com/repos/simphony/simphony-common/issues/74"},"comments":{"href":"https://api.github.com/repos/simphony/simphony-common/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/simphony/simphony-common/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/simphony/simphony-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/simphony/simphony-common/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/simphony/simphony-common/statuses/857c65edac6140192688283866607f0c1599cdf2"}}}}