{"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/argo/pulls/comments/45682968","id":45682968,"diff_hunk":"@@ -0,0 +1,96 @@\n+module Argo\n+  ##\n+  # Gatherer of the PIDS, used for Argo indexing\n+  class PidGatherer\n+    ##\n+    # @return [Array<Array<String>>]\n+    def pid_lists_for_full_reindex\n+      [uber_apo_pids, workflow_pids, agreement_pids, hydrus_uber_apo_pids, apo_pids, hydrus_apo_pids, collection_pids, hydrus_collection_pids, set_pids, remaining_pids]\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def uber_apo_pids\n+      @uber_apo_pids ||= ['druid:hv992ry2431']\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def workflow_pids\n+      @workflow_pids ||= pids_for_model_type '<info:fedora/afmodel:Dor_WorkflowObject>'\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def agreement_pids\n+      @agreement_pids ||= pids_for_model_type '<info:fedora/afmodel:agreement>'\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def hydrus_uber_apo_pids\n+      @hydrus_uber_apo_pids || ['druid:zw306xn5593']\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def apo_pids\n+      @apo_pids ||= pids_for_model_type '<info:fedora/afmodel:Dor_AdminPolicyObject>'\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def hydrus_apo_pids\n+      @hydrus_apo_pids ||= pids_for_model_type '<info:fedora/afmodel:Hydrus_AdminPolicyObject>'\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def collection_pids\n+      @collection_pids ||= pids_for_model_type '<info:fedora/afmodel:Dor_Collection>'\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def hydrus_collection_pids\n+      @hydrus_collection_pids ||= pids_for_model_type '<info:fedora/afmodel:Hydrus_Collection>'\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def set_pids\n+      @set_pids ||= pids_for_model_type '<info:fedora/afmodel:Dor_Set>'\n+    end\n+\n+    ##\n+    # @return [Array<String>]\n+    def all_pids\n+      @all_pids ||= begin\n+        dor_pids = []\n+        Dor::SearchService.iterate_over_pids(in_groups_of: 1000, mode: :group) do |chunk|\n+          dor_pids += chunk\n+        end\n+        dor_pids\n+      end\n+    end\n+\n+    ##\n+    # all_pids with other pid groups removed\n+    # @return [Array<String>]\n+    def remaining_pids\n+      @remaining_pids ||= all_pids -\n+        (uber_apo_pids + workflow_pids + agreement_pids + hydrus_uber_apo_pids +\n+        apo_pids + hydrus_apo_pids + collection_pids + hydrus_collection_pids +\n+        set_pids)\n+    end\n+\n+    private\n+\n+    ##\n+    # Query the Dor SearchService for a specific model\n+    def pids_for_model_type(model_type)\n+      Dor::SearchService.risearch 'select $object from <#ri> where $object <f' \\\n+        \"edora-model:hasModel> #{model_type}\"","path":"lib/pid_gatherer.rb","position":93,"original_position":93,"commit_id":"2d6915e289fe865639e8bb00acca2e7f8623f814","original_commit_id":"2d6915e289fe865639e8bb00acca2e7f8623f814","user":{"login":"atz","id":109954,"avatar_url":"https://avatars.githubusercontent.com/u/109954?v=3","gravatar_id":"","url":"https://api.github.com/users/atz","html_url":"https://github.com/atz","followers_url":"https://api.github.com/users/atz/followers","following_url":"https://api.github.com/users/atz/following{/other_user}","gists_url":"https://api.github.com/users/atz/gists{/gist_id}","starred_url":"https://api.github.com/users/atz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atz/subscriptions","organizations_url":"https://api.github.com/users/atz/orgs","repos_url":"https://api.github.com/users/atz/repos","events_url":"https://api.github.com/users/atz/events{/privacy}","received_events_url":"https://api.github.com/users/atz/received_events","type":"User","site_admin":false},"body":"This is pretty fugly, truncating in the middle of a word.  Go long-line instead, or at least line break before the `<f`, imho.","created_at":"2015-11-24T00:35:19Z","updated_at":"2015-11-24T00:35:19Z","html_url":"https://github.com/sul-dlss/argo/pull/248#discussion_r45682968","pull_request_url":"https://api.github.com/repos/sul-dlss/argo/pulls/248","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/comments/45682968"},"html":{"href":"https://github.com/sul-dlss/argo/pull/248#discussion_r45682968"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/248"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/argo/pulls/248","id":51449919,"html_url":"https://github.com/sul-dlss/argo/pull/248","diff_url":"https://github.com/sul-dlss/argo/pull/248.diff","patch_url":"https://github.com/sul-dlss/argo/pull/248.patch","issue_url":"https://api.github.com/repos/sul-dlss/argo/issues/248","number":248,"state":"open","locked":false,"title":"Breakout pid lists","user":{"login":"mejackreed","id":1656824,"avatar_url":"https://avatars.githubusercontent.com/u/1656824?v=3","gravatar_id":"","url":"https://api.github.com/users/mejackreed","html_url":"https://github.com/mejackreed","followers_url":"https://api.github.com/users/mejackreed/followers","following_url":"https://api.github.com/users/mejackreed/following{/other_user}","gists_url":"https://api.github.com/users/mejackreed/gists{/gist_id}","starred_url":"https://api.github.com/users/mejackreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mejackreed/subscriptions","organizations_url":"https://api.github.com/users/mejackreed/orgs","repos_url":"https://api.github.com/users/mejackreed/repos","events_url":"https://api.github.com/users/mejackreed/events{/privacy}","received_events_url":"https://api.github.com/users/mejackreed/received_events","type":"User","site_admin":false},"body":"d14098b enables Resource Index to be used for development and test ... Useful for testing our indexing approach\r\n\r\n8721a70 Moves pid gathering tasks to its own class. specs mainly test memoization functionality of collection methods","created_at":"2015-11-21T20:48:14Z","updated_at":"2015-11-24T00:35:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3cd0eb68f71ca5ccaeb4163c907789f3e150594b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/argo/pulls/248/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/argo/pulls/248/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/argo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/argo/issues/248/comments","statuses_url":"https://api.github.com/repos/sul-dlss/argo/statuses/2d6915e289fe865639e8bb00acca2e7f8623f814","head":{"label":"sul-dlss:breakout-pid-lists","ref":"breakout-pid-lists","sha":"2d6915e289fe865639e8bb00acca2e7f8623f814","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":4989164,"name":"argo","full_name":"sul-dlss/argo","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/argo","description":"The administrative discovery interface for Stanford's Digital Object Registry","fork":false,"url":"https://api.github.com/repos/sul-dlss/argo","forks_url":"https://api.github.com/repos/sul-dlss/argo/forks","keys_url":"https://api.github.com/repos/sul-dlss/argo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/argo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/argo/teams","hooks_url":"https://api.github.com/repos/sul-dlss/argo/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/argo/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/argo/events","assignees_url":"https://api.github.com/repos/sul-dlss/argo/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/argo/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/argo/tags","blobs_url":"https://api.github.com/repos/sul-dlss/argo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/argo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/argo/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/argo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/argo/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/argo/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/argo/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/argo/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/argo/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/argo/subscription","commits_url":"https://api.github.com/repos/sul-dlss/argo/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/argo/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/argo/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/argo/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/argo/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/argo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/argo/merges","archive_url":"https://api.github.com/repos/sul-dlss/argo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/argo/downloads","issues_url":"https://api.github.com/repos/sul-dlss/argo/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/argo/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/argo/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/argo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/argo/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/argo/releases{/id}","created_at":"2012-07-11T13:15:05Z","updated_at":"2015-11-09T08:17:26Z","pushed_at":"2015-11-23T22:29:44Z","git_url":"git://github.com/sul-dlss/argo.git","ssh_url":"git@github.com:sul-dlss/argo.git","clone_url":"https://github.com/sul-dlss/argo.git","svn_url":"https://github.com/sul-dlss/argo","homepage":null,"size":29229,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":84,"forks":1,"open_issues":84,"watchers":12,"default_branch":"develop"}},"base":{"label":"sul-dlss:profiling_and_indexing_improvements","ref":"profiling_and_indexing_improvements","sha":"a1036dd490c6f329614b7a0cfaabb86dd9a5ac7d","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":4989164,"name":"argo","full_name":"sul-dlss/argo","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/argo","description":"The administrative discovery interface for Stanford's Digital Object Registry","fork":false,"url":"https://api.github.com/repos/sul-dlss/argo","forks_url":"https://api.github.com/repos/sul-dlss/argo/forks","keys_url":"https://api.github.com/repos/sul-dlss/argo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/argo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/argo/teams","hooks_url":"https://api.github.com/repos/sul-dlss/argo/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/argo/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/argo/events","assignees_url":"https://api.github.com/repos/sul-dlss/argo/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/argo/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/argo/tags","blobs_url":"https://api.github.com/repos/sul-dlss/argo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/argo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/argo/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/argo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/argo/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/argo/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/argo/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/argo/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/argo/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/argo/subscription","commits_url":"https://api.github.com/repos/sul-dlss/argo/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/argo/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/argo/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/argo/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/argo/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/argo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/argo/merges","archive_url":"https://api.github.com/repos/sul-dlss/argo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/argo/downloads","issues_url":"https://api.github.com/repos/sul-dlss/argo/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/argo/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/argo/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/argo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/argo/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/argo/releases{/id}","created_at":"2012-07-11T13:15:05Z","updated_at":"2015-11-09T08:17:26Z","pushed_at":"2015-11-23T22:29:44Z","git_url":"git://github.com/sul-dlss/argo.git","ssh_url":"git@github.com:sul-dlss/argo.git","clone_url":"https://github.com/sul-dlss/argo.git","svn_url":"https://github.com/sul-dlss/argo","homepage":null,"size":29229,"stargazers_count":12,"watchers_count":12,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":84,"forks":1,"open_issues":84,"watchers":12,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/248"},"html":{"href":"https://github.com/sul-dlss/argo/pull/248"},"issue":{"href":"https://api.github.com/repos/sul-dlss/argo/issues/248"},"comments":{"href":"https://api.github.com/repos/sul-dlss/argo/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/argo/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/argo/statuses/2d6915e289fe865639e8bb00acca2e7f8623f814"}}}}