{"action":"created","comment":{"url":"https://api.github.com/repos/ihmeuw/vivarium/pulls/comments/138765438","pull_request_review_id":62605752,"id":138765438,"diff_hunk":"@@ -339,11 +336,27 @@ def _normalize_probabilities(self, outputs, probabilities):\n             outputs.append('null_transition')\n         return outputs, probabilities/(np.sum(probabilities, axis=1)[:, np.newaxis])\n \n+    def append(self, transition):\n+        if not isinstance(transition, Transition):\n+            raise TypeError(\n+                'TransitionSet must contain only Transition objects. Check constructor arguments: {}'.format(self))\n+        self.transitions.append(transition)\n+\n+    def extend(self, transitions):\n+        for transition in transitions:\n+            self.append(transition)\n+\n+    def __iter__(self):\n+        return iter(self.transitions)\n+\n+    def __len__(self):\n+        return len(self.transitions)\n+\n     def __str__(self):\n-        return repr(self)\n+        return repr(self.transitions)","path":"vivarium/framework/state_machine.py","position":67,"original_position":67,"commit_id":"1103f7f9c12345dae32d6f68c71a19a9a028bb68","original_commit_id":"1103f7f9c12345dae32d6f68c71a19a9a028bb68","user":{"login":"collijk","id":6313865,"avatar_url":"https://avatars1.githubusercontent.com/u/6313865?v=4","gravatar_id":"","url":"https://api.github.com/users/collijk","html_url":"https://github.com/collijk","followers_url":"https://api.github.com/users/collijk/followers","following_url":"https://api.github.com/users/collijk/following{/other_user}","gists_url":"https://api.github.com/users/collijk/gists{/gist_id}","starred_url":"https://api.github.com/users/collijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collijk/subscriptions","organizations_url":"https://api.github.com/users/collijk/orgs","repos_url":"https://api.github.com/users/collijk/repos","events_url":"https://api.github.com/users/collijk/events{/privacy}","received_events_url":"https://api.github.com/users/collijk/received_events","type":"User","site_admin":false},"body":"Think you still want repr(self) here so that the transitions get passed through str.","created_at":"2017-09-13T23:29:37Z","updated_at":"2017-09-13T23:29:37Z","html_url":"https://github.com/ihmeuw/vivarium/pull/3#discussion_r138765438","pull_request_url":"https://api.github.com/repos/ihmeuw/vivarium/pulls/3","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ihmeuw/vivarium/pulls/comments/138765438"},"html":{"href":"https://github.com/ihmeuw/vivarium/pull/3#discussion_r138765438"},"pull_request":{"href":"https://api.github.com/repos/ihmeuw/vivarium/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/ihmeuw/vivarium/pulls/3","id":140940289,"html_url":"https://github.com/ihmeuw/vivarium/pull/3","diff_url":"https://github.com/ihmeuw/vivarium/pull/3.diff","patch_url":"https://github.com/ihmeuw/vivarium/pull/3.patch","issue_url":"https://api.github.com/repos/ihmeuw/vivarium/issues/3","number":3,"state":"open","locked":false,"title":"Feature/mock dataset objects","user":{"login":"alec-deason","id":419770,"avatar_url":"https://avatars3.githubusercontent.com/u/419770?v=4","gravatar_id":"","url":"https://api.github.com/users/alec-deason","html_url":"https://github.com/alec-deason","followers_url":"https://api.github.com/users/alec-deason/followers","following_url":"https://api.github.com/users/alec-deason/following{/other_user}","gists_url":"https://api.github.com/users/alec-deason/gists{/gist_id}","starred_url":"https://api.github.com/users/alec-deason/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alec-deason/subscriptions","organizations_url":"https://api.github.com/users/alec-deason/orgs","repos_url":"https://api.github.com/users/alec-deason/repos","events_url":"https://api.github.com/users/alec-deason/events{/privacy}","received_events_url":"https://api.github.com/users/alec-deason/received_events","type":"User","site_admin":false},"body":"This PR has the new component management system that will be used for the data artifact changes that are coming soon. These changes are self contained and backward compatible.\r\n\r\nNew features:\r\n- Components are read from config and initialized by a new ComponentManager class which can be replaced with a specialized subclass by specifying a different type in the config.\r\n- The ComponentManager class tracks which components are being loaded which affords systems which need to be able to query the component list early in the initialization process (for example data artifact builders or risk factor implementations that are aware at setup time of what causes are being modeled (which would be future work))\r\n- Adds the concept of DatasetManager, which is a dummy object in this version but is used by the data artifact implementation.\r\n-  The ComponentManager can execute custom code in response to directives in component descriptions or placeholders in component object attributes. This is used by the data artifact implementation to determine which data to load out of the artifact during simulation setup and what data to include when creating the artifact.\r\n","created_at":"2017-09-13T22:01:33Z","updated_at":"2017-09-13T23:29:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c9fd12d2ef8a9f6de0ea84290ac373eba980dc9","assignee":null,"assignees":[],"requested_reviewers":[{"login":"aflaxman","id":51236,"avatar_url":"https://avatars0.githubusercontent.com/u/51236?v=4","gravatar_id":"","url":"https://api.github.com/users/aflaxman","html_url":"https://github.com/aflaxman","followers_url":"https://api.github.com/users/aflaxman/followers","following_url":"https://api.github.com/users/aflaxman/following{/other_user}","gists_url":"https://api.github.com/users/aflaxman/gists{/gist_id}","starred_url":"https://api.github.com/users/aflaxman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aflaxman/subscriptions","organizations_url":"https://api.github.com/users/aflaxman/orgs","repos_url":"https://api.github.com/users/aflaxman/repos","events_url":"https://api.github.com/users/aflaxman/events{/privacy}","received_events_url":"https://api.github.com/users/aflaxman/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ihmeuw/vivarium/pulls/3/commits","review_comments_url":"https://api.github.com/repos/ihmeuw/vivarium/pulls/3/comments","review_comment_url":"https://api.github.com/repos/ihmeuw/vivarium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ihmeuw/vivarium/issues/3/comments","statuses_url":"https://api.github.com/repos/ihmeuw/vivarium/statuses/1103f7f9c12345dae32d6f68c71a19a9a028bb68","head":{"label":"ihmeuw:feature/mock_dataset_objects","ref":"feature/mock_dataset_objects","sha":"1103f7f9c12345dae32d6f68c71a19a9a028bb68","user":{"login":"ihmeuw","id":4683173,"avatar_url":"https://avatars1.githubusercontent.com/u/4683173?v=4","gravatar_id":"","url":"https://api.github.com/users/ihmeuw","html_url":"https://github.com/ihmeuw","followers_url":"https://api.github.com/users/ihmeuw/followers","following_url":"https://api.github.com/users/ihmeuw/following{/other_user}","gists_url":"https://api.github.com/users/ihmeuw/gists{/gist_id}","starred_url":"https://api.github.com/users/ihmeuw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihmeuw/subscriptions","organizations_url":"https://api.github.com/users/ihmeuw/orgs","repos_url":"https://api.github.com/users/ihmeuw/repos","events_url":"https://api.github.com/users/ihmeuw/events{/privacy}","received_events_url":"https://api.github.com/users/ihmeuw/received_events","type":"Organization","site_admin":false},"repo":{"id":96817805,"name":"vivarium","full_name":"ihmeuw/vivarium","owner":{"login":"ihmeuw","id":4683173,"avatar_url":"https://avatars1.githubusercontent.com/u/4683173?v=4","gravatar_id":"","url":"https://api.github.com/users/ihmeuw","html_url":"https://github.com/ihmeuw","followers_url":"https://api.github.com/users/ihmeuw/followers","following_url":"https://api.github.com/users/ihmeuw/following{/other_user}","gists_url":"https://api.github.com/users/ihmeuw/gists{/gist_id}","starred_url":"https://api.github.com/users/ihmeuw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihmeuw/subscriptions","organizations_url":"https://api.github.com/users/ihmeuw/orgs","repos_url":"https://api.github.com/users/ihmeuw/repos","events_url":"https://api.github.com/users/ihmeuw/events{/privacy}","received_events_url":"https://api.github.com/users/ihmeuw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ihmeuw/vivarium","description":"A python microsimulation framework","fork":false,"url":"https://api.github.com/repos/ihmeuw/vivarium","forks_url":"https://api.github.com/repos/ihmeuw/vivarium/forks","keys_url":"https://api.github.com/repos/ihmeuw/vivarium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ihmeuw/vivarium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ihmeuw/vivarium/teams","hooks_url":"https://api.github.com/repos/ihmeuw/vivarium/hooks","issue_events_url":"https://api.github.com/repos/ihmeuw/vivarium/issues/events{/number}","events_url":"https://api.github.com/repos/ihmeuw/vivarium/events","assignees_url":"https://api.github.com/repos/ihmeuw/vivarium/assignees{/user}","branches_url":"https://api.github.com/repos/ihmeuw/vivarium/branches{/branch}","tags_url":"https://api.github.com/repos/ihmeuw/vivarium/tags","blobs_url":"https://api.github.com/repos/ihmeuw/vivarium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ihmeuw/vivarium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ihmeuw/vivarium/git/refs{/sha}","trees_url":"https://api.github.com/repos/ihmeuw/vivarium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ihmeuw/vivarium/statuses/{sha}","languages_url":"https://api.github.com/repos/ihmeuw/vivarium/languages","stargazers_url":"https://api.github.com/repos/ihmeuw/vivarium/stargazers","contributors_url":"https://api.github.com/repos/ihmeuw/vivarium/contributors","subscribers_url":"https://api.github.com/repos/ihmeuw/vivarium/subscribers","subscription_url":"https://api.github.com/repos/ihmeuw/vivarium/subscription","commits_url":"https://api.github.com/repos/ihmeuw/vivarium/commits{/sha}","git_commits_url":"https://api.github.com/repos/ihmeuw/vivarium/git/commits{/sha}","comments_url":"https://api.github.com/repos/ihmeuw/vivarium/comments{/number}","issue_comment_url":"https://api.github.com/repos/ihmeuw/vivarium/issues/comments{/number}","contents_url":"https://api.github.com/repos/ihmeuw/vivarium/contents/{+path}","compare_url":"https://api.github.com/repos/ihmeuw/vivarium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ihmeuw/vivarium/merges","archive_url":"https://api.github.com/repos/ihmeuw/vivarium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ihmeuw/vivarium/downloads","issues_url":"https://api.github.com/repos/ihmeuw/vivarium/issues{/number}","pulls_url":"https://api.github.com/repos/ihmeuw/vivarium/pulls{/number}","milestones_url":"https://api.github.com/repos/ihmeuw/vivarium/milestones{/number}","notifications_url":"https://api.github.com/repos/ihmeuw/vivarium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ihmeuw/vivarium/labels{/name}","releases_url":"https://api.github.com/repos/ihmeuw/vivarium/releases{/id}","deployments_url":"https://api.github.com/repos/ihmeuw/vivarium/deployments","created_at":"2017-07-10T20:21:23Z","updated_at":"2017-09-02T04:42:33Z","pushed_at":"2017-09-13T23:20:55Z","git_url":"git://github.com/ihmeuw/vivarium.git","ssh_url":"git@github.com:ihmeuw/vivarium.git","clone_url":"https://github.com/ihmeuw/vivarium.git","svn_url":"https://github.com/ihmeuw/vivarium","homepage":"http://wwww.healthdata.org","size":726,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":6,"default_branch":"develop"}},"base":{"label":"ihmeuw:develop","ref":"develop","sha":"b0a966b674a4c7cc9ca21874f18543c10adbcdfe","user":{"login":"ihmeuw","id":4683173,"avatar_url":"https://avatars1.githubusercontent.com/u/4683173?v=4","gravatar_id":"","url":"https://api.github.com/users/ihmeuw","html_url":"https://github.com/ihmeuw","followers_url":"https://api.github.com/users/ihmeuw/followers","following_url":"https://api.github.com/users/ihmeuw/following{/other_user}","gists_url":"https://api.github.com/users/ihmeuw/gists{/gist_id}","starred_url":"https://api.github.com/users/ihmeuw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihmeuw/subscriptions","organizations_url":"https://api.github.com/users/ihmeuw/orgs","repos_url":"https://api.github.com/users/ihmeuw/repos","events_url":"https://api.github.com/users/ihmeuw/events{/privacy}","received_events_url":"https://api.github.com/users/ihmeuw/received_events","type":"Organization","site_admin":false},"repo":{"id":96817805,"name":"vivarium","full_name":"ihmeuw/vivarium","owner":{"login":"ihmeuw","id":4683173,"avatar_url":"https://avatars1.githubusercontent.com/u/4683173?v=4","gravatar_id":"","url":"https://api.github.com/users/ihmeuw","html_url":"https://github.com/ihmeuw","followers_url":"https://api.github.com/users/ihmeuw/followers","following_url":"https://api.github.com/users/ihmeuw/following{/other_user}","gists_url":"https://api.github.com/users/ihmeuw/gists{/gist_id}","starred_url":"https://api.github.com/users/ihmeuw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihmeuw/subscriptions","organizations_url":"https://api.github.com/users/ihmeuw/orgs","repos_url":"https://api.github.com/users/ihmeuw/repos","events_url":"https://api.github.com/users/ihmeuw/events{/privacy}","received_events_url":"https://api.github.com/users/ihmeuw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ihmeuw/vivarium","description":"A python microsimulation framework","fork":false,"url":"https://api.github.com/repos/ihmeuw/vivarium","forks_url":"https://api.github.com/repos/ihmeuw/vivarium/forks","keys_url":"https://api.github.com/repos/ihmeuw/vivarium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ihmeuw/vivarium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ihmeuw/vivarium/teams","hooks_url":"https://api.github.com/repos/ihmeuw/vivarium/hooks","issue_events_url":"https://api.github.com/repos/ihmeuw/vivarium/issues/events{/number}","events_url":"https://api.github.com/repos/ihmeuw/vivarium/events","assignees_url":"https://api.github.com/repos/ihmeuw/vivarium/assignees{/user}","branches_url":"https://api.github.com/repos/ihmeuw/vivarium/branches{/branch}","tags_url":"https://api.github.com/repos/ihmeuw/vivarium/tags","blobs_url":"https://api.github.com/repos/ihmeuw/vivarium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ihmeuw/vivarium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ihmeuw/vivarium/git/refs{/sha}","trees_url":"https://api.github.com/repos/ihmeuw/vivarium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ihmeuw/vivarium/statuses/{sha}","languages_url":"https://api.github.com/repos/ihmeuw/vivarium/languages","stargazers_url":"https://api.github.com/repos/ihmeuw/vivarium/stargazers","contributors_url":"https://api.github.com/repos/ihmeuw/vivarium/contributors","subscribers_url":"https://api.github.com/repos/ihmeuw/vivarium/subscribers","subscription_url":"https://api.github.com/repos/ihmeuw/vivarium/subscription","commits_url":"https://api.github.com/repos/ihmeuw/vivarium/commits{/sha}","git_commits_url":"https://api.github.com/repos/ihmeuw/vivarium/git/commits{/sha}","comments_url":"https://api.github.com/repos/ihmeuw/vivarium/comments{/number}","issue_comment_url":"https://api.github.com/repos/ihmeuw/vivarium/issues/comments{/number}","contents_url":"https://api.github.com/repos/ihmeuw/vivarium/contents/{+path}","compare_url":"https://api.github.com/repos/ihmeuw/vivarium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ihmeuw/vivarium/merges","archive_url":"https://api.github.com/repos/ihmeuw/vivarium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ihmeuw/vivarium/downloads","issues_url":"https://api.github.com/repos/ihmeuw/vivarium/issues{/number}","pulls_url":"https://api.github.com/repos/ihmeuw/vivarium/pulls{/number}","milestones_url":"https://api.github.com/repos/ihmeuw/vivarium/milestones{/number}","notifications_url":"https://api.github.com/repos/ihmeuw/vivarium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ihmeuw/vivarium/labels{/name}","releases_url":"https://api.github.com/repos/ihmeuw/vivarium/releases{/id}","deployments_url":"https://api.github.com/repos/ihmeuw/vivarium/deployments","created_at":"2017-07-10T20:21:23Z","updated_at":"2017-09-02T04:42:33Z","pushed_at":"2017-09-13T23:20:55Z","git_url":"git://github.com/ihmeuw/vivarium.git","ssh_url":"git@github.com:ihmeuw/vivarium.git","clone_url":"https://github.com/ihmeuw/vivarium.git","svn_url":"https://github.com/ihmeuw/vivarium","homepage":"http://wwww.healthdata.org","size":726,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ihmeuw/vivarium/pulls/3"},"html":{"href":"https://github.com/ihmeuw/vivarium/pull/3"},"issue":{"href":"https://api.github.com/repos/ihmeuw/vivarium/issues/3"},"comments":{"href":"https://api.github.com/repos/ihmeuw/vivarium/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/ihmeuw/vivarium/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/ihmeuw/vivarium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ihmeuw/vivarium/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/ihmeuw/vivarium/statuses/1103f7f9c12345dae32d6f68c71a19a9a028bb68"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"collijk"}}