{"action":"created","comment":{"url":"https://api.github.com/repos/enthought/sat-solver/pulls/comments/49184629","id":49184629,"diff_hunk":"@@ -0,0 +1,110 @@\n+from __future__ import absolute_import\n+\n+import bisect\n+import collections\n+import operator\n+\n+from .errors import NoPackageFound\n+\n+\n+class Repository(object):\n+    \"\"\"\n+    A Repository is a set of package, and knows about which package it","path":"simplesat/repository.py","position":12,"original_position":12,"commit_id":"1281e78d51e5e3892b0c69b665d00287735fd002","original_commit_id":"1281e78d51e5e3892b0c69b665d00287735fd002","user":{"login":"johntyree","id":108972,"avatar_url":"https://avatars.githubusercontent.com/u/108972?v=3","gravatar_id":"","url":"https://api.github.com/users/johntyree","html_url":"https://github.com/johntyree","followers_url":"https://api.github.com/users/johntyree/followers","following_url":"https://api.github.com/users/johntyree/following{/other_user}","gists_url":"https://api.github.com/users/johntyree/gists{/gist_id}","starred_url":"https://api.github.com/users/johntyree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johntyree/subscriptions","organizations_url":"https://api.github.com/users/johntyree/orgs","repos_url":"https://api.github.com/users/johntyree/repos","events_url":"https://api.github.com/users/johntyree/events{/privacy}","received_events_url":"https://api.github.com/users/johntyree/received_events","type":"User","site_admin":false},"body":"\"packages\"","created_at":"2016-01-08T12:43:47Z","updated_at":"2016-01-08T12:43:47Z","html_url":"https://github.com/enthought/sat-solver/pull/110#discussion_r49184629","pull_request_url":"https://api.github.com/repos/enthought/sat-solver/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/enthought/sat-solver/pulls/comments/49184629"},"html":{"href":"https://github.com/enthought/sat-solver/pull/110#discussion_r49184629"},"pull_request":{"href":"https://api.github.com/repos/enthought/sat-solver/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/enthought/sat-solver/pulls/110","id":54931966,"html_url":"https://github.com/enthought/sat-solver/pull/110","diff_url":"https://github.com/enthought/sat-solver/pull/110.diff","patch_url":"https://github.com/enthought/sat-solver/pull/110.patch","issue_url":"https://api.github.com/repos/enthought/sat-solver/issues/110","number":110,"state":"open","locked":false,"title":"Move repository into sat","user":{"login":"cournape","id":25111,"avatar_url":"https://avatars.githubusercontent.com/u/25111?v=3","gravatar_id":"","url":"https://api.github.com/users/cournape","html_url":"https://github.com/cournape","followers_url":"https://api.github.com/users/cournape/followers","following_url":"https://api.github.com/users/cournape/following{/other_user}","gists_url":"https://api.github.com/users/cournape/gists{/gist_id}","starred_url":"https://api.github.com/users/cournape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cournape/subscriptions","organizations_url":"https://api.github.com/users/cournape/orgs","repos_url":"https://api.github.com/users/cournape/repos","events_url":"https://api.github.com/users/cournape/events{/privacy}","received_events_url":"https://api.github.com/users/cournape/received_events","type":"User","site_admin":false},"body":"This PR implements a simplified `Repository` class to replace the enstaller one in simplesat:\r\n\r\n1. It works w/ any enstaller `PackageMetadata` subclass\r\n2. It only support the `find_package*` and `update` methods. \r\n3. Internally, the instance keeps a sorted list of package names to allow reproducible iteration over a repository, independently of the order in which packages have been added.\r\n\r\nThis is the penultimate PR to remove the dependency on enstaller. The last one will implement a leaner `PackageMetadata` class.\r\n\r\n@johntyree ","created_at":"2016-01-03T20:50:38Z","updated_at":"2016-01-08T12:43:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c238bb999754c1e1356f45dca5ffc92393c46596","assignee":null,"milestone":{"url":"https://api.github.com/repos/enthought/sat-solver/milestones/5","html_url":"https://github.com/enthought/sat-solver/milestones/0.2","labels_url":"https://api.github.com/repos/enthought/sat-solver/milestones/5/labels","id":1471283,"number":5,"title":"0.2","description":"The goal is to make the SAT solver \"production ready\":\r\n\r\n1. Remove the dependency on enstaller\r\n2. Better error message\r\n3. Can be reliably used as a replacement for our current solver","creator":{"login":"cournape","id":25111,"avatar_url":"https://avatars.githubusercontent.com/u/25111?v=3","gravatar_id":"","url":"https://api.github.com/users/cournape","html_url":"https://github.com/cournape","followers_url":"https://api.github.com/users/cournape/followers","following_url":"https://api.github.com/users/cournape/following{/other_user}","gists_url":"https://api.github.com/users/cournape/gists{/gist_id}","starred_url":"https://api.github.com/users/cournape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cournape/subscriptions","organizations_url":"https://api.github.com/users/cournape/orgs","repos_url":"https://api.github.com/users/cournape/repos","events_url":"https://api.github.com/users/cournape/events{/privacy}","received_events_url":"https://api.github.com/users/cournape/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":11,"state":"open","created_at":"2015-12-22T14:51:33Z","updated_at":"2016-01-07T19:31:38Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/enthought/sat-solver/pulls/110/commits","review_comments_url":"https://api.github.com/repos/enthought/sat-solver/pulls/110/comments","review_comment_url":"https://api.github.com/repos/enthought/sat-solver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/enthought/sat-solver/issues/110/comments","statuses_url":"https://api.github.com/repos/enthought/sat-solver/statuses/1281e78d51e5e3892b0c69b665d00287735fd002","head":{"label":"enthought:move_repository_into_sat","ref":"move_repository_into_sat","sha":"1281e78d51e5e3892b0c69b665d00287735fd002","user":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"repo":{"id":27783212,"name":"sat-solver","full_name":"enthought/sat-solver","owner":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enthought/sat-solver","description":"SAT solver for use in Enstaller, based on the MiniSat implementation","fork":false,"url":"https://api.github.com/repos/enthought/sat-solver","forks_url":"https://api.github.com/repos/enthought/sat-solver/forks","keys_url":"https://api.github.com/repos/enthought/sat-solver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enthought/sat-solver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enthought/sat-solver/teams","hooks_url":"https://api.github.com/repos/enthought/sat-solver/hooks","issue_events_url":"https://api.github.com/repos/enthought/sat-solver/issues/events{/number}","events_url":"https://api.github.com/repos/enthought/sat-solver/events","assignees_url":"https://api.github.com/repos/enthought/sat-solver/assignees{/user}","branches_url":"https://api.github.com/repos/enthought/sat-solver/branches{/branch}","tags_url":"https://api.github.com/repos/enthought/sat-solver/tags","blobs_url":"https://api.github.com/repos/enthought/sat-solver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enthought/sat-solver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enthought/sat-solver/git/refs{/sha}","trees_url":"https://api.github.com/repos/enthought/sat-solver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enthought/sat-solver/statuses/{sha}","languages_url":"https://api.github.com/repos/enthought/sat-solver/languages","stargazers_url":"https://api.github.com/repos/enthought/sat-solver/stargazers","contributors_url":"https://api.github.com/repos/enthought/sat-solver/contributors","subscribers_url":"https://api.github.com/repos/enthought/sat-solver/subscribers","subscription_url":"https://api.github.com/repos/enthought/sat-solver/subscription","commits_url":"https://api.github.com/repos/enthought/sat-solver/commits{/sha}","git_commits_url":"https://api.github.com/repos/enthought/sat-solver/git/commits{/sha}","comments_url":"https://api.github.com/repos/enthought/sat-solver/comments{/number}","issue_comment_url":"https://api.github.com/repos/enthought/sat-solver/issues/comments{/number}","contents_url":"https://api.github.com/repos/enthought/sat-solver/contents/{+path}","compare_url":"https://api.github.com/repos/enthought/sat-solver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enthought/sat-solver/merges","archive_url":"https://api.github.com/repos/enthought/sat-solver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enthought/sat-solver/downloads","issues_url":"https://api.github.com/repos/enthought/sat-solver/issues{/number}","pulls_url":"https://api.github.com/repos/enthought/sat-solver/pulls{/number}","milestones_url":"https://api.github.com/repos/enthought/sat-solver/milestones{/number}","notifications_url":"https://api.github.com/repos/enthought/sat-solver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enthought/sat-solver/labels{/name}","releases_url":"https://api.github.com/repos/enthought/sat-solver/releases{/id}","created_at":"2014-12-09T19:31:39Z","updated_at":"2015-11-25T01:05:19Z","pushed_at":"2016-01-07T19:31:38Z","git_url":"git://github.com/enthought/sat-solver.git","ssh_url":"git@github.com:enthought/sat-solver.git","clone_url":"https://github.com/enthought/sat-solver.git","svn_url":"https://github.com/enthought/sat-solver","homepage":"","size":619,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":11,"forks":1,"open_issues":11,"watchers":3,"default_branch":"master"}},"base":{"label":"enthought:master","ref":"master","sha":"7e0a888bd69e3b8835007f12becd54ef6f9e8f54","user":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"repo":{"id":27783212,"name":"sat-solver","full_name":"enthought/sat-solver","owner":{"login":"enthought","id":539651,"avatar_url":"https://avatars.githubusercontent.com/u/539651?v=3","gravatar_id":"","url":"https://api.github.com/users/enthought","html_url":"https://github.com/enthought","followers_url":"https://api.github.com/users/enthought/followers","following_url":"https://api.github.com/users/enthought/following{/other_user}","gists_url":"https://api.github.com/users/enthought/gists{/gist_id}","starred_url":"https://api.github.com/users/enthought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enthought/subscriptions","organizations_url":"https://api.github.com/users/enthought/orgs","repos_url":"https://api.github.com/users/enthought/repos","events_url":"https://api.github.com/users/enthought/events{/privacy}","received_events_url":"https://api.github.com/users/enthought/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/enthought/sat-solver","description":"SAT solver for use in Enstaller, based on the MiniSat implementation","fork":false,"url":"https://api.github.com/repos/enthought/sat-solver","forks_url":"https://api.github.com/repos/enthought/sat-solver/forks","keys_url":"https://api.github.com/repos/enthought/sat-solver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/enthought/sat-solver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/enthought/sat-solver/teams","hooks_url":"https://api.github.com/repos/enthought/sat-solver/hooks","issue_events_url":"https://api.github.com/repos/enthought/sat-solver/issues/events{/number}","events_url":"https://api.github.com/repos/enthought/sat-solver/events","assignees_url":"https://api.github.com/repos/enthought/sat-solver/assignees{/user}","branches_url":"https://api.github.com/repos/enthought/sat-solver/branches{/branch}","tags_url":"https://api.github.com/repos/enthought/sat-solver/tags","blobs_url":"https://api.github.com/repos/enthought/sat-solver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/enthought/sat-solver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/enthought/sat-solver/git/refs{/sha}","trees_url":"https://api.github.com/repos/enthought/sat-solver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/enthought/sat-solver/statuses/{sha}","languages_url":"https://api.github.com/repos/enthought/sat-solver/languages","stargazers_url":"https://api.github.com/repos/enthought/sat-solver/stargazers","contributors_url":"https://api.github.com/repos/enthought/sat-solver/contributors","subscribers_url":"https://api.github.com/repos/enthought/sat-solver/subscribers","subscription_url":"https://api.github.com/repos/enthought/sat-solver/subscription","commits_url":"https://api.github.com/repos/enthought/sat-solver/commits{/sha}","git_commits_url":"https://api.github.com/repos/enthought/sat-solver/git/commits{/sha}","comments_url":"https://api.github.com/repos/enthought/sat-solver/comments{/number}","issue_comment_url":"https://api.github.com/repos/enthought/sat-solver/issues/comments{/number}","contents_url":"https://api.github.com/repos/enthought/sat-solver/contents/{+path}","compare_url":"https://api.github.com/repos/enthought/sat-solver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/enthought/sat-solver/merges","archive_url":"https://api.github.com/repos/enthought/sat-solver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/enthought/sat-solver/downloads","issues_url":"https://api.github.com/repos/enthought/sat-solver/issues{/number}","pulls_url":"https://api.github.com/repos/enthought/sat-solver/pulls{/number}","milestones_url":"https://api.github.com/repos/enthought/sat-solver/milestones{/number}","notifications_url":"https://api.github.com/repos/enthought/sat-solver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/enthought/sat-solver/labels{/name}","releases_url":"https://api.github.com/repos/enthought/sat-solver/releases{/id}","created_at":"2014-12-09T19:31:39Z","updated_at":"2015-11-25T01:05:19Z","pushed_at":"2016-01-07T19:31:38Z","git_url":"git://github.com/enthought/sat-solver.git","ssh_url":"git@github.com:enthought/sat-solver.git","clone_url":"https://github.com/enthought/sat-solver.git","svn_url":"https://github.com/enthought/sat-solver","homepage":"","size":619,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":11,"forks":1,"open_issues":11,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/enthought/sat-solver/pulls/110"},"html":{"href":"https://github.com/enthought/sat-solver/pull/110"},"issue":{"href":"https://api.github.com/repos/enthought/sat-solver/issues/110"},"comments":{"href":"https://api.github.com/repos/enthought/sat-solver/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/enthought/sat-solver/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/enthought/sat-solver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/enthought/sat-solver/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/enthought/sat-solver/statuses/1281e78d51e5e3892b0c69b665d00287735fd002"}}}}