{"action":"created","comment":{"url":"https://api.github.com/repos/in-toto/in-toto/pulls/comments/155853885","pull_request_review_id":82244883,"id":155853885,"diff_hunk":"@@ -248,6 +269,38 @@ def __init__(self, **kwargs):\n \n     self.validate()\n \n+  def __repr__(self):","path":"in_toto/models/layout.py","position":32,"original_position":32,"commit_id":"2d66bc71259e29eab22f3bccc48b27da2e01c52a","original_commit_id":"2d66bc71259e29eab22f3bccc48b27da2e01c52a","user":{"login":"lukpueh","id":589324,"avatar_url":"https://avatars2.githubusercontent.com/u/589324?v=4","gravatar_id":"","url":"https://api.github.com/users/lukpueh","html_url":"https://github.com/lukpueh","followers_url":"https://api.github.com/users/lukpueh/followers","following_url":"https://api.github.com/users/lukpueh/following{/other_user}","gists_url":"https://api.github.com/users/lukpueh/gists{/gist_id}","starred_url":"https://api.github.com/users/lukpueh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukpueh/subscriptions","organizations_url":"https://api.github.com/users/lukpueh/orgs","repos_url":"https://api.github.com/users/lukpueh/repos","events_url":"https://api.github.com/users/lukpueh/events{/privacy}","received_events_url":"https://api.github.com/users/lukpueh/received_events","type":"User","site_admin":false},"body":"Please don't overwrite `Step.__repr__` (or `Inspection.__repr__`). Just give them a display method like you did for Layout and Link.","created_at":"2017-12-08T19:18:37Z","updated_at":"2017-12-08T19:33:18Z","html_url":"https://github.com/in-toto/in-toto/pull/155#discussion_r155853885","pull_request_url":"https://api.github.com/repos/in-toto/in-toto/pulls/155","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/in-toto/in-toto/pulls/comments/155853885"},"html":{"href":"https://github.com/in-toto/in-toto/pull/155#discussion_r155853885"},"pull_request":{"href":"https://api.github.com/repos/in-toto/in-toto/pulls/155"}}},"pull_request":{"url":"https://api.github.com/repos/in-toto/in-toto/pulls/155","id":156027246,"html_url":"https://github.com/in-toto/in-toto/pull/155","diff_url":"https://github.com/in-toto/in-toto/pull/155.diff","patch_url":"https://github.com/in-toto/in-toto/pull/155.patch","issue_url":"https://api.github.com/repos/in-toto/in-toto/issues/155","number":155,"state":"open","locked":false,"title":"Metadata pretty printing","user":{"login":"mikek2","id":14931971,"avatar_url":"https://avatars3.githubusercontent.com/u/14931971?v=4","gravatar_id":"","url":"https://api.github.com/users/mikek2","html_url":"https://github.com/mikek2","followers_url":"https://api.github.com/users/mikek2/followers","following_url":"https://api.github.com/users/mikek2/following{/other_user}","gists_url":"https://api.github.com/users/mikek2/gists{/gist_id}","starred_url":"https://api.github.com/users/mikek2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikek2/subscriptions","organizations_url":"https://api.github.com/users/mikek2/orgs","repos_url":"https://api.github.com/users/mikek2/repos","events_url":"https://api.github.com/users/mikek2/events{/privacy}","received_events_url":"https://api.github.com/users/mikek2/received_events","type":"User","site_admin":false},"body":"This was a stab at issue #18.\r\n\r\nThere are two models that were analyzed for the purposes of understanding what it means to \"print\" them in a readable format that takes into accountability human readability.\r\n\r\nThe Layout model serves to display most of the aggregate information of the supply chain, whereas the Link model is much more isolated.\r\n\r\nUsing the in-toto demo as an example, this is what was decided were the primary concerns for a Link object being printed:\r\n- First and foremost, to notify the end user what type of object we have (e.g Link)\r\n- To identify the name of the \"Link\" (e.g \"clone\")\r\n- To identify the \"inputs\" (e.g the directory, and the input materials)\r\n- To identify the \"outputs\" (e.g the products - what was produced and captured by the Link)\r\n- To provide a summary:\r\n-- The summary includes up to four details (if applicable): files that were (1) created, (2) deleted, (3) modified, and (4) unchanged.\r\n\r\nAn example screenshot of the Link metadata is as follows:\r\n\r\nLink metadata (example 1):\r\n![link_meta](https://user-images.githubusercontent.com/14931971/33754133-d0ca7526-dbb8-11e7-9f70-0f96c315763d.jpg)\r\n\r\nIn the above example, a link (name: clone), was run with the command \"git clone https://github.com/in-toto/demo-project.git\". Since there were no actual input files (materials), the summary indicated that there was now a new file created, \"demo-project/foo.py\".\r\n\r\nLink metadata (example 2):\r\n![link_3](https://user-images.githubusercontent.com/14931971/33754384-fbef8754-dbb9-11e7-80ae-01b757c58095.jpg)\r\n\r\nIn the above example, a link (name: update-version) included updating the version of demo-project/foo.py. Although the input file and the output file names are the same, the summary still shows that there was a modification made to the actual input file, or material. Additionally, the command row indicates that there hadn't been any commands run.\r\n\r\n\r\nLayout metadata:\r\n\r\nThe \"Layout\" metadata was responsible for capturing a broader scope of the entire supply chain, so it was important to be thorough in the information it printed:\r\n\r\n- Information that let the user know the type of the object (Layout)\r\n- The expiration of the Layout\r\n- The readme information for the Layout\r\n- The \"keyids\" of the Layout (the authorized parties, or functionary keys are included here)\r\n\r\n- The step data (which can be broken down further)\r\n-- The step name (and threshold, or minimum amount of functionaries required)\r\n-- The public keys associated with that particular step in the supply chain\r\n-- The expected command (cmd) to be ran in the supply chain\r\n-- The expected inputs (materials)\r\n-- The expected outputs (products)\r\n\r\n- The inspection data (which can be broken down further)\r\n-- The name of the inspection\r\n-- The command that was run (for validation)\r\n-- The expected inputs (materials) via inspection data\r\n-- The expected outputs (products) via inspection data\r\n\r\nBelow is a sample printing of the entire Layout metadata, but of course it'd be possible to display step or inspection data separately as they currently have their own separate \"repr\" method implementations.\r\n![lay2](https://user-images.githubusercontent.com/14931971/33754589-f1a5c4c4-dbba-11e7-8bbb-526ee04fa3a5.png)\r\n","created_at":"2017-12-02T19:24:10Z","updated_at":"2017-12-08T19:33:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c06ef5967b546909f6d72bfebeb990cc4e120ea3","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/in-toto/in-toto/pulls/155/commits","review_comments_url":"https://api.github.com/repos/in-toto/in-toto/pulls/155/comments","review_comment_url":"https://api.github.com/repos/in-toto/in-toto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/in-toto/in-toto/issues/155/comments","statuses_url":"https://api.github.com/repos/in-toto/in-toto/statuses/2d66bc71259e29eab22f3bccc48b27da2e01c52a","head":{"label":"mikek2:metadata-pretty-print","ref":"metadata-pretty-print","sha":"2d66bc71259e29eab22f3bccc48b27da2e01c52a","user":{"login":"mikek2","id":14931971,"avatar_url":"https://avatars3.githubusercontent.com/u/14931971?v=4","gravatar_id":"","url":"https://api.github.com/users/mikek2","html_url":"https://github.com/mikek2","followers_url":"https://api.github.com/users/mikek2/followers","following_url":"https://api.github.com/users/mikek2/following{/other_user}","gists_url":"https://api.github.com/users/mikek2/gists{/gist_id}","starred_url":"https://api.github.com/users/mikek2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikek2/subscriptions","organizations_url":"https://api.github.com/users/mikek2/orgs","repos_url":"https://api.github.com/users/mikek2/repos","events_url":"https://api.github.com/users/mikek2/events{/privacy}","received_events_url":"https://api.github.com/users/mikek2/received_events","type":"User","site_admin":false},"repo":{"id":112862870,"name":"in-toto","full_name":"mikek2/in-toto","owner":{"login":"mikek2","id":14931971,"avatar_url":"https://avatars3.githubusercontent.com/u/14931971?v=4","gravatar_id":"","url":"https://api.github.com/users/mikek2","html_url":"https://github.com/mikek2","followers_url":"https://api.github.com/users/mikek2/followers","following_url":"https://api.github.com/users/mikek2/following{/other_user}","gists_url":"https://api.github.com/users/mikek2/gists{/gist_id}","starred_url":"https://api.github.com/users/mikek2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikek2/subscriptions","organizations_url":"https://api.github.com/users/mikek2/orgs","repos_url":"https://api.github.com/users/mikek2/repos","events_url":"https://api.github.com/users/mikek2/events{/privacy}","received_events_url":"https://api.github.com/users/mikek2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikek2/in-toto","description":"in-toto is a framework to protect supply chain integrity.","fork":true,"url":"https://api.github.com/repos/mikek2/in-toto","forks_url":"https://api.github.com/repos/mikek2/in-toto/forks","keys_url":"https://api.github.com/repos/mikek2/in-toto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikek2/in-toto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikek2/in-toto/teams","hooks_url":"https://api.github.com/repos/mikek2/in-toto/hooks","issue_events_url":"https://api.github.com/repos/mikek2/in-toto/issues/events{/number}","events_url":"https://api.github.com/repos/mikek2/in-toto/events","assignees_url":"https://api.github.com/repos/mikek2/in-toto/assignees{/user}","branches_url":"https://api.github.com/repos/mikek2/in-toto/branches{/branch}","tags_url":"https://api.github.com/repos/mikek2/in-toto/tags","blobs_url":"https://api.github.com/repos/mikek2/in-toto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikek2/in-toto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikek2/in-toto/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikek2/in-toto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikek2/in-toto/statuses/{sha}","languages_url":"https://api.github.com/repos/mikek2/in-toto/languages","stargazers_url":"https://api.github.com/repos/mikek2/in-toto/stargazers","contributors_url":"https://api.github.com/repos/mikek2/in-toto/contributors","subscribers_url":"https://api.github.com/repos/mikek2/in-toto/subscribers","subscription_url":"https://api.github.com/repos/mikek2/in-toto/subscription","commits_url":"https://api.github.com/repos/mikek2/in-toto/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikek2/in-toto/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikek2/in-toto/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikek2/in-toto/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikek2/in-toto/contents/{+path}","compare_url":"https://api.github.com/repos/mikek2/in-toto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikek2/in-toto/merges","archive_url":"https://api.github.com/repos/mikek2/in-toto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikek2/in-toto/downloads","issues_url":"https://api.github.com/repos/mikek2/in-toto/issues{/number}","pulls_url":"https://api.github.com/repos/mikek2/in-toto/pulls{/number}","milestones_url":"https://api.github.com/repos/mikek2/in-toto/milestones{/number}","notifications_url":"https://api.github.com/repos/mikek2/in-toto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikek2/in-toto/labels{/name}","releases_url":"https://api.github.com/repos/mikek2/in-toto/releases{/id}","deployments_url":"https://api.github.com/repos/mikek2/in-toto/deployments","created_at":"2017-12-02T17:38:14Z","updated_at":"2017-12-02T17:38:17Z","pushed_at":"2017-12-08T07:00:12Z","git_url":"git://github.com/mikek2/in-toto.git","ssh_url":"git@github.com:mikek2/in-toto.git","clone_url":"https://github.com/mikek2/in-toto.git","svn_url":"https://github.com/mikek2/in-toto","homepage":"https://in-toto.io","size":844,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"in-toto:develop","ref":"develop","sha":"dcafa1860a7e4f3ec4776be322e82e08648aa246","user":{"login":"in-toto","id":22891761,"avatar_url":"https://avatars0.githubusercontent.com/u/22891761?v=4","gravatar_id":"","url":"https://api.github.com/users/in-toto","html_url":"https://github.com/in-toto","followers_url":"https://api.github.com/users/in-toto/followers","following_url":"https://api.github.com/users/in-toto/following{/other_user}","gists_url":"https://api.github.com/users/in-toto/gists{/gist_id}","starred_url":"https://api.github.com/users/in-toto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/in-toto/subscriptions","organizations_url":"https://api.github.com/users/in-toto/orgs","repos_url":"https://api.github.com/users/in-toto/repos","events_url":"https://api.github.com/users/in-toto/events{/privacy}","received_events_url":"https://api.github.com/users/in-toto/received_events","type":"Organization","site_admin":false},"repo":{"id":59531400,"name":"in-toto","full_name":"in-toto/in-toto","owner":{"login":"in-toto","id":22891761,"avatar_url":"https://avatars0.githubusercontent.com/u/22891761?v=4","gravatar_id":"","url":"https://api.github.com/users/in-toto","html_url":"https://github.com/in-toto","followers_url":"https://api.github.com/users/in-toto/followers","following_url":"https://api.github.com/users/in-toto/following{/other_user}","gists_url":"https://api.github.com/users/in-toto/gists{/gist_id}","starred_url":"https://api.github.com/users/in-toto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/in-toto/subscriptions","organizations_url":"https://api.github.com/users/in-toto/orgs","repos_url":"https://api.github.com/users/in-toto/repos","events_url":"https://api.github.com/users/in-toto/events{/privacy}","received_events_url":"https://api.github.com/users/in-toto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/in-toto/in-toto","description":"in-toto is a framework to protect supply chain integrity.","fork":false,"url":"https://api.github.com/repos/in-toto/in-toto","forks_url":"https://api.github.com/repos/in-toto/in-toto/forks","keys_url":"https://api.github.com/repos/in-toto/in-toto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/in-toto/in-toto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/in-toto/in-toto/teams","hooks_url":"https://api.github.com/repos/in-toto/in-toto/hooks","issue_events_url":"https://api.github.com/repos/in-toto/in-toto/issues/events{/number}","events_url":"https://api.github.com/repos/in-toto/in-toto/events","assignees_url":"https://api.github.com/repos/in-toto/in-toto/assignees{/user}","branches_url":"https://api.github.com/repos/in-toto/in-toto/branches{/branch}","tags_url":"https://api.github.com/repos/in-toto/in-toto/tags","blobs_url":"https://api.github.com/repos/in-toto/in-toto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/in-toto/in-toto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/in-toto/in-toto/git/refs{/sha}","trees_url":"https://api.github.com/repos/in-toto/in-toto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/in-toto/in-toto/statuses/{sha}","languages_url":"https://api.github.com/repos/in-toto/in-toto/languages","stargazers_url":"https://api.github.com/repos/in-toto/in-toto/stargazers","contributors_url":"https://api.github.com/repos/in-toto/in-toto/contributors","subscribers_url":"https://api.github.com/repos/in-toto/in-toto/subscribers","subscription_url":"https://api.github.com/repos/in-toto/in-toto/subscription","commits_url":"https://api.github.com/repos/in-toto/in-toto/commits{/sha}","git_commits_url":"https://api.github.com/repos/in-toto/in-toto/git/commits{/sha}","comments_url":"https://api.github.com/repos/in-toto/in-toto/comments{/number}","issue_comment_url":"https://api.github.com/repos/in-toto/in-toto/issues/comments{/number}","contents_url":"https://api.github.com/repos/in-toto/in-toto/contents/{+path}","compare_url":"https://api.github.com/repos/in-toto/in-toto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/in-toto/in-toto/merges","archive_url":"https://api.github.com/repos/in-toto/in-toto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/in-toto/in-toto/downloads","issues_url":"https://api.github.com/repos/in-toto/in-toto/issues{/number}","pulls_url":"https://api.github.com/repos/in-toto/in-toto/pulls{/number}","milestones_url":"https://api.github.com/repos/in-toto/in-toto/milestones{/number}","notifications_url":"https://api.github.com/repos/in-toto/in-toto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/in-toto/in-toto/labels{/name}","releases_url":"https://api.github.com/repos/in-toto/in-toto/releases{/id}","deployments_url":"https://api.github.com/repos/in-toto/in-toto/deployments","created_at":"2016-05-24T01:46:38Z","updated_at":"2017-12-07T18:24:08Z","pushed_at":"2017-12-08T18:57:33Z","git_url":"git://github.com/in-toto/in-toto.git","ssh_url":"git@github.com:in-toto/in-toto.git","clone_url":"https://github.com/in-toto/in-toto.git","svn_url":"https://github.com/in-toto/in-toto","homepage":"https://in-toto.io","size":819,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":18,"open_issues":23,"watchers":18,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/in-toto/in-toto/pulls/155"},"html":{"href":"https://github.com/in-toto/in-toto/pull/155"},"issue":{"href":"https://api.github.com/repos/in-toto/in-toto/issues/155"},"comments":{"href":"https://api.github.com/repos/in-toto/in-toto/issues/155/comments"},"review_comments":{"href":"https://api.github.com/repos/in-toto/in-toto/pulls/155/comments"},"review_comment":{"href":"https://api.github.com/repos/in-toto/in-toto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/in-toto/in-toto/pulls/155/commits"},"statuses":{"href":"https://api.github.com/repos/in-toto/in-toto/statuses/2d66bc71259e29eab22f3bccc48b27da2e01c52a"}},"author_association":"NONE"}}
{"actor":{"display_login":"lukpueh"}}