{"action":"created","comment":{"url":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/comments/139193025","pull_request_review_id":63094790,"id":139193025,"diff_hunk":"@@ -144,29 +172,49 @@ def _callback(count):\n \n     return df\n \n-def build_package(username, package, yaml_path):\n+def build_package(username, package, yaml_path, checks_path=None, dryrun=False, env='default'):\n     \"\"\"\n     Builds a package from a given Yaml file and installs it locally.\n \n     Returns the name of the package.\n     \"\"\"\n+    def find(key, value):\n+        for k, v in value.items():\n+            if k == key:\n+                yield v\n+            elif isinstance(v, dict):\n+                for result in find(key, v):\n+                    yield result\n+            elif isinstance(v, list):\n+                for d in v:\n+                    for result in find(key, d):\n+                        yield result\n     build_dir = os.path.dirname(yaml_path)\n     fd = open(yaml_path)\n     docs = yaml.load_all(fd)\n-    data = next(docs, None) # leave other dicts in the generator\n-    if not isinstance(data, dict):\n-        raise BuildException(\"Unable to parse YAML: %s\" % yaml_path)\n-\n-    build_package_from_contents(username, package, build_dir, data)\n-\n-def build_package_from_contents(username, package, build_dir, data):\n-    \"\"\"\n-    Builds package according to YAML node\n-    \"\"\"\n-    contents = data.get('contents', {})\n+    build_data = next(docs, None) # leave other dicts in the generator\n+    if not isinstance(build_data, dict):\n+        raise BuildException(\"Unable to parse build YAML: %s\" % yaml_path)\n+    if len(list(find('checks', build_data['contents']))) > 0 and 'checks' not in build_data:","path":"quilt/tools/build.py","position":221,"original_position":133,"commit_id":"a2e109e9dab4eac0c94ea448b791f6e90417861c","original_commit_id":"d2e33386755b452cdf943823f565e9c29f77f9f2","user":{"login":"asah","id":140002,"avatar_url":"https://avatars1.githubusercontent.com/u/140002?v=4","gravatar_id":"","url":"https://api.github.com/users/asah","html_url":"https://github.com/asah","followers_url":"https://api.github.com/users/asah/followers","following_url":"https://api.github.com/users/asah/following{/other_user}","gists_url":"https://api.github.com/users/asah/gists{/gist_id}","starred_url":"https://api.github.com/users/asah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asah/subscriptions","organizations_url":"https://api.github.com/users/asah/orgs","repos_url":"https://api.github.com/users/asah/repos","events_url":"https://api.github.com/users/asah/events{/privacy}","received_events_url":"https://api.github.com/users/asah/received_events","type":"User","site_admin":false},"body":"DONE re list.\r\nCOMMENT ADDED re logic -- inlined checks (in build.yml) should override external checks.yml -- otherwise, you can't safely create libraries of checks.","created_at":"2017-09-15T16:26:05Z","updated_at":"2017-09-15T16:26:05Z","html_url":"https://github.com/quiltdata/quilt-compiler/pull/162#discussion_r139193025","pull_request_url":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/162","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/comments/139193025"},"html":{"href":"https://github.com/quiltdata/quilt-compiler/pull/162#discussion_r139193025"},"pull_request":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/162"}},"in_reply_to_id":137343800},"pull_request":{"url":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/162","id":139488565,"html_url":"https://github.com/quiltdata/quilt-compiler/pull/162","diff_url":"https://github.com/quiltdata/quilt-compiler/pull/162.diff","patch_url":"https://github.com/quiltdata/quilt-compiler/pull/162.patch","issue_url":"https://api.github.com/repos/quiltdata/quilt-compiler/issues/162","number":162,"state":"open","locked":false,"title":"checks: code from fulcrum demo","user":{"login":"asah","id":140002,"avatar_url":"https://avatars1.githubusercontent.com/u/140002?v=4","gravatar_id":"","url":"https://api.github.com/users/asah","html_url":"https://github.com/asah","followers_url":"https://api.github.com/users/asah/followers","following_url":"https://api.github.com/users/asah/following{/other_user}","gists_url":"https://api.github.com/users/asah/gists{/gist_id}","starred_url":"https://api.github.com/users/asah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asah/subscriptions","organizations_url":"https://api.github.com/users/asah/orgs","repos_url":"https://api.github.com/users/asah/repos","events_url":"https://api.github.com/users/asah/events{/privacy}","received_events_url":"https://api.github.com/users/asah/received_events","type":"User","site_admin":false},"body":"\r\n","created_at":"2017-09-06T07:21:05Z","updated_at":"2017-09-15T16:26:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cecd6142bfe6a50453e8af151af30463f7790c9","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/162/commits","review_comments_url":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/162/comments","review_comment_url":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/quiltdata/quilt-compiler/issues/162/comments","statuses_url":"https://api.github.com/repos/quiltdata/quilt-compiler/statuses/a2e109e9dab4eac0c94ea448b791f6e90417861c","head":{"label":"quiltdata:checks","ref":"checks","sha":"a2e109e9dab4eac0c94ea448b791f6e90417861c","user":{"login":"quiltdata","id":17112125,"avatar_url":"https://avatars3.githubusercontent.com/u/17112125?v=4","gravatar_id":"","url":"https://api.github.com/users/quiltdata","html_url":"https://github.com/quiltdata","followers_url":"https://api.github.com/users/quiltdata/followers","following_url":"https://api.github.com/users/quiltdata/following{/other_user}","gists_url":"https://api.github.com/users/quiltdata/gists{/gist_id}","starred_url":"https://api.github.com/users/quiltdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quiltdata/subscriptions","organizations_url":"https://api.github.com/users/quiltdata/orgs","repos_url":"https://api.github.com/users/quiltdata/repos","events_url":"https://api.github.com/users/quiltdata/events{/privacy}","received_events_url":"https://api.github.com/users/quiltdata/received_events","type":"User","site_admin":false},"repo":{"id":81518954,"name":"quilt-compiler","full_name":"quiltdata/quilt-compiler","owner":{"login":"quiltdata","id":17112125,"avatar_url":"https://avatars3.githubusercontent.com/u/17112125?v=4","gravatar_id":"","url":"https://api.github.com/users/quiltdata","html_url":"https://github.com/quiltdata","followers_url":"https://api.github.com/users/quiltdata/followers","following_url":"https://api.github.com/users/quiltdata/following{/other_user}","gists_url":"https://api.github.com/users/quiltdata/gists{/gist_id}","starred_url":"https://api.github.com/users/quiltdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quiltdata/subscriptions","organizations_url":"https://api.github.com/users/quiltdata/orgs","repos_url":"https://api.github.com/users/quiltdata/repos","events_url":"https://api.github.com/users/quiltdata/events{/privacy}","received_events_url":"https://api.github.com/users/quiltdata/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quiltdata/quilt-compiler","description":"Quilt - manage data like code","fork":false,"url":"https://api.github.com/repos/quiltdata/quilt-compiler","forks_url":"https://api.github.com/repos/quiltdata/quilt-compiler/forks","keys_url":"https://api.github.com/repos/quiltdata/quilt-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quiltdata/quilt-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quiltdata/quilt-compiler/teams","hooks_url":"https://api.github.com/repos/quiltdata/quilt-compiler/hooks","issue_events_url":"https://api.github.com/repos/quiltdata/quilt-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/quiltdata/quilt-compiler/events","assignees_url":"https://api.github.com/repos/quiltdata/quilt-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/quiltdata/quilt-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/quiltdata/quilt-compiler/tags","blobs_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quiltdata/quilt-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/quiltdata/quilt-compiler/languages","stargazers_url":"https://api.github.com/repos/quiltdata/quilt-compiler/stargazers","contributors_url":"https://api.github.com/repos/quiltdata/quilt-compiler/contributors","subscribers_url":"https://api.github.com/repos/quiltdata/quilt-compiler/subscribers","subscription_url":"https://api.github.com/repos/quiltdata/quilt-compiler/subscription","commits_url":"https://api.github.com/repos/quiltdata/quilt-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/quiltdata/quilt-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/quiltdata/quilt-compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/quiltdata/quilt-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/quiltdata/quilt-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quiltdata/quilt-compiler/merges","archive_url":"https://api.github.com/repos/quiltdata/quilt-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quiltdata/quilt-compiler/downloads","issues_url":"https://api.github.com/repos/quiltdata/quilt-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/quiltdata/quilt-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/quiltdata/quilt-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quiltdata/quilt-compiler/labels{/name}","releases_url":"https://api.github.com/repos/quiltdata/quilt-compiler/releases{/id}","deployments_url":"https://api.github.com/repos/quiltdata/quilt-compiler/deployments","created_at":"2017-02-10T02:46:03Z","updated_at":"2017-09-11T19:03:14Z","pushed_at":"2017-09-08T20:52:47Z","git_url":"git://github.com/quiltdata/quilt-compiler.git","ssh_url":"git@github.com:quiltdata/quilt-compiler.git","clone_url":"https://github.com/quiltdata/quilt-compiler.git","svn_url":"https://github.com/quiltdata/quilt-compiler","homepage":"https://quiltdata.com","size":4818,"stargazers_count":338,"watchers_count":338,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9,"mirror_url":null,"open_issues_count":1,"forks":9,"open_issues":1,"watchers":338,"default_branch":"master"}},"base":{"label":"quiltdata:master","ref":"master","sha":"64df9fd1a0c46307a7006a8375a7578a5fb1248d","user":{"login":"quiltdata","id":17112125,"avatar_url":"https://avatars3.githubusercontent.com/u/17112125?v=4","gravatar_id":"","url":"https://api.github.com/users/quiltdata","html_url":"https://github.com/quiltdata","followers_url":"https://api.github.com/users/quiltdata/followers","following_url":"https://api.github.com/users/quiltdata/following{/other_user}","gists_url":"https://api.github.com/users/quiltdata/gists{/gist_id}","starred_url":"https://api.github.com/users/quiltdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quiltdata/subscriptions","organizations_url":"https://api.github.com/users/quiltdata/orgs","repos_url":"https://api.github.com/users/quiltdata/repos","events_url":"https://api.github.com/users/quiltdata/events{/privacy}","received_events_url":"https://api.github.com/users/quiltdata/received_events","type":"User","site_admin":false},"repo":{"id":81518954,"name":"quilt-compiler","full_name":"quiltdata/quilt-compiler","owner":{"login":"quiltdata","id":17112125,"avatar_url":"https://avatars3.githubusercontent.com/u/17112125?v=4","gravatar_id":"","url":"https://api.github.com/users/quiltdata","html_url":"https://github.com/quiltdata","followers_url":"https://api.github.com/users/quiltdata/followers","following_url":"https://api.github.com/users/quiltdata/following{/other_user}","gists_url":"https://api.github.com/users/quiltdata/gists{/gist_id}","starred_url":"https://api.github.com/users/quiltdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quiltdata/subscriptions","organizations_url":"https://api.github.com/users/quiltdata/orgs","repos_url":"https://api.github.com/users/quiltdata/repos","events_url":"https://api.github.com/users/quiltdata/events{/privacy}","received_events_url":"https://api.github.com/users/quiltdata/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/quiltdata/quilt-compiler","description":"Quilt - manage data like code","fork":false,"url":"https://api.github.com/repos/quiltdata/quilt-compiler","forks_url":"https://api.github.com/repos/quiltdata/quilt-compiler/forks","keys_url":"https://api.github.com/repos/quiltdata/quilt-compiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/quiltdata/quilt-compiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/quiltdata/quilt-compiler/teams","hooks_url":"https://api.github.com/repos/quiltdata/quilt-compiler/hooks","issue_events_url":"https://api.github.com/repos/quiltdata/quilt-compiler/issues/events{/number}","events_url":"https://api.github.com/repos/quiltdata/quilt-compiler/events","assignees_url":"https://api.github.com/repos/quiltdata/quilt-compiler/assignees{/user}","branches_url":"https://api.github.com/repos/quiltdata/quilt-compiler/branches{/branch}","tags_url":"https://api.github.com/repos/quiltdata/quilt-compiler/tags","blobs_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/quiltdata/quilt-compiler/statuses/{sha}","languages_url":"https://api.github.com/repos/quiltdata/quilt-compiler/languages","stargazers_url":"https://api.github.com/repos/quiltdata/quilt-compiler/stargazers","contributors_url":"https://api.github.com/repos/quiltdata/quilt-compiler/contributors","subscribers_url":"https://api.github.com/repos/quiltdata/quilt-compiler/subscribers","subscription_url":"https://api.github.com/repos/quiltdata/quilt-compiler/subscription","commits_url":"https://api.github.com/repos/quiltdata/quilt-compiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/quiltdata/quilt-compiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/quiltdata/quilt-compiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/quiltdata/quilt-compiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/quiltdata/quilt-compiler/contents/{+path}","compare_url":"https://api.github.com/repos/quiltdata/quilt-compiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/quiltdata/quilt-compiler/merges","archive_url":"https://api.github.com/repos/quiltdata/quilt-compiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/quiltdata/quilt-compiler/downloads","issues_url":"https://api.github.com/repos/quiltdata/quilt-compiler/issues{/number}","pulls_url":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls{/number}","milestones_url":"https://api.github.com/repos/quiltdata/quilt-compiler/milestones{/number}","notifications_url":"https://api.github.com/repos/quiltdata/quilt-compiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/quiltdata/quilt-compiler/labels{/name}","releases_url":"https://api.github.com/repos/quiltdata/quilt-compiler/releases{/id}","deployments_url":"https://api.github.com/repos/quiltdata/quilt-compiler/deployments","created_at":"2017-02-10T02:46:03Z","updated_at":"2017-09-11T19:03:14Z","pushed_at":"2017-09-08T20:52:47Z","git_url":"git://github.com/quiltdata/quilt-compiler.git","ssh_url":"git@github.com:quiltdata/quilt-compiler.git","clone_url":"https://github.com/quiltdata/quilt-compiler.git","svn_url":"https://github.com/quiltdata/quilt-compiler","homepage":"https://quiltdata.com","size":4818,"stargazers_count":338,"watchers_count":338,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9,"mirror_url":null,"open_issues_count":1,"forks":9,"open_issues":1,"watchers":338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/162"},"html":{"href":"https://github.com/quiltdata/quilt-compiler/pull/162"},"issue":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/issues/162"},"comments":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/quiltdata/quilt-compiler/statuses/a2e109e9dab4eac0c94ea448b791f6e90417861c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"asah"}}