{"action":"created","comment":{"url":"https://api.github.com/repos/inspirehep/inspire-next/pulls/comments/47846326","id":47846326,"diff_hunk":"@@ -17,125 +17,379 @@\n # along with INSPIRE; if not, write to the Free Software Foundation, Inc.,\n # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.\n \n-\"\"\"Tests for robotupload.\"\"\"\n+\"\"\"Tests for the matching.\"\"\"\n \n-from __future__ import print_function, absolute_import\n-from invenio.testsuite import make_test_suite, run_test_suite, InvenioTestCase\n+from flask import current_app\n \n import httpretty\n-import logging\n \n+from invenio_testing import InvenioTestCase\n \n-class DummyObj(object):\n-    \"\"\"Dummy workflow object\"\"\"\n-    def __init__(self):\n-        super(DummyObj, self).__init__()\n-        self.extra_data = {}\n-        self.log = logging.getLogger(\"inspire_tests\")\n+import mock\n+\n+import pytest\n \n \n class MatchingTests(InvenioTestCase):\n \n-    \"\"\"Test the robotupload functions.\"\"\"\n+    \"\"\"Tests for the matching.\"\"\"\n+\n+    def setup_class(self):\n+        \"\"\"TODO.\"\"\"\n+        class MockObj(object):\n+            def __init__(self):\n+                self._extra_data = {'recid': [], 'url': []}\n+\n+            @property\n+            def extra_data(self):\n+                return self._extra_data\n+\n+            @property\n+            def model(self):\n+                return 'banana'\n+\n+        class MockWorkflowDefinition(object):\n+            def model(self, obj):\n+                return obj.model\n+\n+        class MockEng(object):\n+            @property\n+            def workflow_definition(self):\n+                return MockWorkflowDefinition()\n+\n+        self.MockObj = MockObj\n+        self.MockEng = MockEng\n \n     @httpretty.activate\n-    def test_matching_result(self):\n-        \"\"\"Test that good matching results are handled correctly.\"\"\"\n-        from invenio_base.globals import cfg\n+    def test_search_with_result(self):\n+        \"\"\"Good search results are handled correctly.\"\"\"\n         from inspirehep.modules.workflows.tasks.matching import search\n \n         httpretty.register_uri(\n             httpretty.GET,\n-            cfg[\"WORKFLOWS_MATCH_REMOTE_SERVER_URL\"],\n-            body=\"[1234]\",\n-            content_type=\"application/json\"\n+            current_app.config['WORKFLOWS_MATCH_REMOTE_SERVER_URL'],\n+            body='[1234]',\n+            content_type='application/json'\n         )\n \n-        res = search('035:\"oai:arXiv.org:1505.12345\"')\n+        result = search('035:\"oai:arXiv.org:1505.12345\"')\n \n-        self.assertTrue(res)\n-        self.assertTrue(res[0] == 1234)\n+        self.assertEqual(len(result), 1)\n+        self.assertTrue(result[0] == 1234)\n \n     @httpretty.activate\n-    def test_empty_matching_result(self):\n-        \"\"\"Test that empty matching results are handled correctly.\"\"\"\n-        from invenio_base.globals import cfg\n+    def test_search_without_result(self):\n+        \"\"\"Empty search results are handled correctly.\"\"\"\n         from inspirehep.modules.workflows.tasks.matching import search\n \n         httpretty.register_uri(\n             httpretty.GET,\n-            cfg[\"WORKFLOWS_MATCH_REMOTE_SERVER_URL\"],\n-            body=\"[]\",\n-            content_type=\"application/json\"\n+            current_app.config['WORKFLOWS_MATCH_REMOTE_SERVER_URL'],\n+            body='[]',\n+            content_type='application/json'\n         )\n \n-        res = search('035:\"oai:arXiv.org:1505.12345\"')\n+        result = search('035:\"oai:arXiv.org:1505.12345\"')\n \n-        self.assertFalse(res)\n-        self.assertTrue(len(res) == 0)\n+        self.assertEqual(len(result), 0)\n \n     @httpretty.activate\n-    def test_bad_matching_result(self):\n-        \"\"\"Test that bad matching results are handled correctly.\"\"\"\n-        from invenio_base.globals import cfg\n+    def test_search_with_bad_result(self):\n+        \"\"\"Bad search results raise an exception.\"\"\"\n         from inspirehep.modules.workflows.tasks.matching import search\n \n         httpretty.register_uri(\n             httpretty.GET,\n-            cfg[\"WORKFLOWS_MATCH_REMOTE_SERVER_URL\"],\n-            body=\"<html></html>\",\n+            current_app.config['WORKFLOWS_MATCH_REMOTE_SERVER_URL'],\n+            body='<html></html>',\n         )\n \n-        self.assertRaises(ValueError, search, '035:\"oai:arXiv.org:1505.12345\"')\n+        with pytest.raises(ValueError):\n+            search('035:\"oai:arXiv.org:1505.12345\"')\n \n-    @httpretty.activate\n-    def test_arxiv_results(self):\n-        \"\"\"Test that bad matching results are handled correctly.\"\"\"\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.search', return_value=[1234])\n+    def test_match_by_arxiv_id_with_result(self, search):\n+        \"\"\"Good match_by_arxiv_id results are handled correctly.\"\"\"\n         from invenio_records.api import Record\n-        from invenio_base.globals import cfg\n         from inspirehep.modules.workflows.tasks.matching import match_by_arxiv_id\n \n-        httpretty.register_uri(\n-            httpretty.GET,\n-            cfg[\"WORKFLOWS_MATCH_REMOTE_SERVER_URL\"],\n-            body=\"[1234]\",\n-            content_type=\"application/json\"\n-        )\n+        record = Record({'arxiv_id': 'arXiv:1505.12345'})\n \n-        record = Record({\"arxiv_id\": \"arXiv:1505.12345\"})\n-        res = match_by_arxiv_id(record)\n-        self.assertTrue(res)\n+        result = match_by_arxiv_id(record)\n \n-        record = Record({\"arxiv_eprints\": [\n-            {\n-                \"value\": \"arXiv:1505.12345\",\n-                \"source\": \"arXiv\",\n-            }\n-        ]})\n-        res = match_by_arxiv_id(record)\n-        self.assertTrue(res)\n+        self.assertTrue(result)\n \n-    @httpretty.activate\n-    def test_doi_results(self):\n-        \"\"\"Test that bad matching results are handled correctly.\"\"\"\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.get_arxiv_id_from_record', return_value=[])\n+    def test_match_by_arxiv_id_without_result(self, mock_get_arxiv_id_from_record):\n+        \"\"\"Empty match_by_arxiv_id_results are handled correctly.\"\"\"\n         from invenio_records.api import Record\n-        from invenio_base.globals import cfg\n-        from inspirehep.modules.workflows.tasks.matching import match_by_doi\n+        from inspirehep.modules.workflows.tasks.matching import match_by_arxiv_id\n \n-        httpretty.register_uri(\n-            httpretty.GET,\n-            cfg[\"WORKFLOWS_MATCH_REMOTE_SERVER_URL\"],\n-            body=\"[1234]\",\n-            content_type=\"application/json\"\n-        )\n+        record = Record({})\n+\n+        result = match_by_arxiv_id(record)\n+\n+        self.assertEqual(result, [])\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.search', return_value=[1234])\n+    def test_match_by_arxiv_eprints_with_result(self, search):\n+        \"\"\"Can also match on the arxiv_eprints.value key.\"\"\"\n+        from invenio_records.api import Record\n+        from inspirehep.modules.workflows.tasks.matching import match_by_arxiv_id\n+\n+        record = Record({\n+            'arxiv_eprints': [\n+                {\n+                    'value': 'arXiv:1505.12345',\n+                    'source': 'arXiv',\n+                }\n+            ]\n+        })\n+\n+        result = match_by_arxiv_id(record)\n+\n+        self.assertTrue(result)\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.search', return_value=[1234])\n+    def test_match_by_doi_with_result(self, search):\n+        \"\"\"Good match_by_doi results are handled correctly.\"\"\"\n+        from invenio_records.api import Record\n+        from inspirehep.modules.workflows.tasks.matching import match_by_doi\n \n         record = Record({\"dois\": {\"value\": \"10.1086/305772\"}})\n-        res = match_by_doi(record)\n-        self.assertTrue(res)\n \n-        # FIXME Also test for multiple DOIs\n+        result = match_by_doi(record)\n+\n+        self.assertTrue(result)\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.get_record_from_model')\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.match_by_arxiv_id', return_value=[1])\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.match_by_doi', return_value=[2])\n+    def test_match_task_both_with_result(self, match_by_doi, match_by_arxiv_id, get_record_from_model):\n+        \"\"\"TODO.\"\"\"\n+        from invenio_records.api import Record\n+        from inspirehep.modules.workflows.tasks.matching import match\n+\n+        obj = self.MockObj()\n+        eng = self.MockEng()\n+\n+        record = Record({'titles': [{'title': 'foo'}]})\n+        get_record_from_model.return_value = record\n+\n+        result = match(obj, eng)\n+\n+        self.assertTrue(result)\n+        self.assertTrue(1 == obj.extra_data['recid'] or 2 == obj.extra_data['recid'])\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.get_record_from_model')\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.match_by_arxiv_id', return_value=[1])\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.match_by_doi', return_value=[])\n+    def test_match_task_with_arxiv_id_result(self, match_by_doi, match_by_arxiv_id, get_record_from_model):\n+        \"\"\"TODO.\"\"\"\n+        from invenio_records.api import Record\n+        from inspirehep.modules.workflows.tasks.matching import match\n+\n+        obj = self.MockObj()\n+        eng = self.MockEng()\n+\n+        record = Record({'titles': [{'title': 'foo'}]})\n+        get_record_from_model.return_value = record\n+\n+        result = match(obj, eng)\n+\n+        self.assertTrue(result)\n+        self.assertEqual(1, obj.extra_data['recid'])\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.get_record_from_model')\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.match_by_arxiv_id', return_value=[])\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.match_by_doi', return_value=[2])\n+    def test_match_task_second_with_doi_result(self, match_by_doi, match_by_arxiv_id, get_record_from_model):\n+        \"\"\"TODO.\"\"\"\n+        from invenio_records.api import Record\n+        from inspirehep.modules.workflows.tasks.matching import match\n+\n+        obj = self.MockObj()\n+        eng = self.MockEng()\n+\n+        record = Record({'titles': [{'title': 'foo'}]})\n+        get_record_from_model.return_value = record\n+\n+        result = match(obj, eng)\n+\n+        self.assertTrue(result)\n+        self.assertEqual(2, obj.extra_data['recid'])\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.get_record_from_model')\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.match_by_arxiv_id', return_value=[])\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.match_by_doi', return_value=[])\n+    def test_match_task_without_result(self, match_by_doi, match_by_arxiv_id, get_record_from_model):\n+        \"\"\"TODO.\"\"\"\n+        from invenio_records.api import Record\n+        from inspirehep.modules.workflows.tasks.matching import match\n+\n+        obj = self.MockObj()\n+        eng = self.MockEng()\n+\n+        record = Record({'titles': [{'title': 'foo'}]})\n+        get_record_from_model.return_value = record\n+\n+        result = match(obj, eng)\n+\n+        self.assertFalse(result)\n+        self.assertEqual([], obj.extra_data['recid'])\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.get_record_from_model')\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching._match')\n+    def test_match_with_invenio_matcher_task_with_result(self, _match, get_record_from_model):\n+        \"\"\"TODO.\"\"\"\n+        from invenio_records.api import Record\n+        from inspirehep.modules.workflows.tasks.matching import match_with_invenio_matcher\n+\n+        obj = self.MockObj()\n+        eng = self.MockEng()\n+\n+        # FIXME(jacquerie): should yield a MatchResult.\n+        _match.return_value.__iter__.return_value = iter([1, 2])\n+\n+        record = Record({'titles': [{'title': 'foo'}]})\n+        get_record_from_model.return_value = record\n+\n+        result = match_with_invenio_matcher()(obj, eng)\n+\n+        self.assertTrue(result)\n+        self.assertTrue(1 in obj.extra_data['recid'] and 2 in obj.extra_data['recid'])\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.get_record_from_model')\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching._match')\n+    def test_match_with_invenio_matcher_task_without_result(self, _match, get_record_from_model):\n+        \"\"\"TODO.\"\"\"\n+        from invenio_records.api import Record\n+        from inspirehep.modules.workflows.tasks.matching import match_with_invenio_matcher\n+\n+        obj = self.MockObj()\n+        eng = self.MockEng()\n+\n+        _match.return_value.__iter__.return_value = iter([])\n+\n+        record = Record({'titles': [{'title': 'foo'}]})\n+        get_record_from_model.return_value = record\n+\n+        result = match_with_invenio_matcher()(obj, eng)\n+\n+        self.assertFalse(result)\n+        self.assertEqual([], obj.extra_data['recid'])\n+\n+    @mock.patch('inspirehep.modules.workflows.tasks.matching.cfg', {'INSPIRE_ACCEPTED_CATEGORIES': ['foo']})\n+    def test_was_already_harvested_true(self):\n+        \"\"\"TODO.\"\"\"","path":"tests/test_matching.py","position":338,"original_position":338,"commit_id":"001ae87efa2be3f467d57860e025f14f0bc5a2fb","original_commit_id":"001ae87efa2be3f467d57860e025f14f0bc5a2fb","user":{"login":"jacquerie","id":381280,"avatar_url":"https://avatars.githubusercontent.com/u/381280?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquerie","html_url":"https://github.com/jacquerie","followers_url":"https://api.github.com/users/jacquerie/followers","following_url":"https://api.github.com/users/jacquerie/following{/other_user}","gists_url":"https://api.github.com/users/jacquerie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquerie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquerie/subscriptions","organizations_url":"https://api.github.com/users/jacquerie/orgs","repos_url":"https://api.github.com/users/jacquerie/repos","events_url":"https://api.github.com/users/jacquerie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquerie/received_events","type":"User","site_admin":false},"body":"Leftover.","created_at":"2015-12-16T22:52:35Z","updated_at":"2015-12-16T22:52:35Z","html_url":"https://github.com/inspirehep/inspire-next/pull/678#discussion_r47846326","pull_request_url":"https://api.github.com/repos/inspirehep/inspire-next/pulls/678","_links":{"self":{"href":"https://api.github.com/repos/inspirehep/inspire-next/pulls/comments/47846326"},"html":{"href":"https://github.com/inspirehep/inspire-next/pull/678#discussion_r47846326"},"pull_request":{"href":"https://api.github.com/repos/inspirehep/inspire-next/pulls/678"}}},"pull_request":{"url":"https://api.github.com/repos/inspirehep/inspire-next/pulls/678","id":53857290,"html_url":"https://github.com/inspirehep/inspire-next/pull/678","diff_url":"https://github.com/inspirehep/inspire-next/pull/678.diff","patch_url":"https://github.com/inspirehep/inspire-next/pull/678.patch","issue_url":"https://api.github.com/repos/inspirehep/inspire-next/issues/678","number":678,"state":"open","locked":false,"title":"Matcher integration","user":{"login":"jalavik","id":633680,"avatar_url":"https://avatars.githubusercontent.com/u/633680?v=3","gravatar_id":"","url":"https://api.github.com/users/jalavik","html_url":"https://github.com/jalavik","followers_url":"https://api.github.com/users/jalavik/followers","following_url":"https://api.github.com/users/jalavik/following{/other_user}","gists_url":"https://api.github.com/users/jalavik/gists{/gist_id}","starred_url":"https://api.github.com/users/jalavik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalavik/subscriptions","organizations_url":"https://api.github.com/users/jalavik/orgs","repos_url":"https://api.github.com/users/jalavik/repos","events_url":"https://api.github.com/users/jalavik/events{/privacy}","received_events_url":"https://api.github.com/users/jalavik/received_events","type":"User","site_admin":false},"body":"Adds basic invenio-matcher integration to start building upon.\r\n\r\nSupersedes #559 ","created_at":"2015-12-16T15:40:43Z","updated_at":"2015-12-16T22:52:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f4caf147a4364919fe96d6f8733ab673d6eff1c","assignee":{"login":"jalavik","id":633680,"avatar_url":"https://avatars.githubusercontent.com/u/633680?v=3","gravatar_id":"","url":"https://api.github.com/users/jalavik","html_url":"https://github.com/jalavik","followers_url":"https://api.github.com/users/jalavik/followers","following_url":"https://api.github.com/users/jalavik/following{/other_user}","gists_url":"https://api.github.com/users/jalavik/gists{/gist_id}","starred_url":"https://api.github.com/users/jalavik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalavik/subscriptions","organizations_url":"https://api.github.com/users/jalavik/orgs","repos_url":"https://api.github.com/users/jalavik/repos","events_url":"https://api.github.com/users/jalavik/events{/privacy}","received_events_url":"https://api.github.com/users/jalavik/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/inspirehep/inspire-next/milestones/6","html_url":"https://github.com/inspirehep/inspire-next/milestones/All%20workflows%20on%20Labs","labels_url":"https://api.github.com/repos/inspirehep/inspire-next/milestones/6/labels","id":1202936,"number":6,"title":"All workflows on Labs","description":"* arXiv harvesting is fully moved to Labs (hence celery)\r\n* All the other workflows are also moved to Labs.\r\n* However, as last step, all workflows are batchuploading records to legacy prod as it is still the master of records.\r\n","creator":{"login":"kaplun","id":119349,"avatar_url":"https://avatars.githubusercontent.com/u/119349?v=3","gravatar_id":"","url":"https://api.github.com/users/kaplun","html_url":"https://github.com/kaplun","followers_url":"https://api.github.com/users/kaplun/followers","following_url":"https://api.github.com/users/kaplun/following{/other_user}","gists_url":"https://api.github.com/users/kaplun/gists{/gist_id}","starred_url":"https://api.github.com/users/kaplun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaplun/subscriptions","organizations_url":"https://api.github.com/users/kaplun/orgs","repos_url":"https://api.github.com/users/kaplun/repos","events_url":"https://api.github.com/users/kaplun/events{/privacy}","received_events_url":"https://api.github.com/users/kaplun/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":8,"state":"open","created_at":"2015-07-10T19:15:00Z","updated_at":"2015-12-16T15:41:22Z","due_on":"2016-01-30T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/inspirehep/inspire-next/pulls/678/commits","review_comments_url":"https://api.github.com/repos/inspirehep/inspire-next/pulls/678/comments","review_comment_url":"https://api.github.com/repos/inspirehep/inspire-next/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inspirehep/inspire-next/issues/678/comments","statuses_url":"https://api.github.com/repos/inspirehep/inspire-next/statuses/001ae87efa2be3f467d57860e025f14f0bc5a2fb","head":{"label":"jalavik:matcher-integration-559","ref":"matcher-integration-559","sha":"001ae87efa2be3f467d57860e025f14f0bc5a2fb","user":{"login":"jalavik","id":633680,"avatar_url":"https://avatars.githubusercontent.com/u/633680?v=3","gravatar_id":"","url":"https://api.github.com/users/jalavik","html_url":"https://github.com/jalavik","followers_url":"https://api.github.com/users/jalavik/followers","following_url":"https://api.github.com/users/jalavik/following{/other_user}","gists_url":"https://api.github.com/users/jalavik/gists{/gist_id}","starred_url":"https://api.github.com/users/jalavik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalavik/subscriptions","organizations_url":"https://api.github.com/users/jalavik/orgs","repos_url":"https://api.github.com/users/jalavik/repos","events_url":"https://api.github.com/users/jalavik/events{/privacy}","received_events_url":"https://api.github.com/users/jalavik/received_events","type":"User","site_admin":false},"repo":{"id":16617140,"name":"inspire-next","full_name":"jalavik/inspire-next","owner":{"login":"jalavik","id":633680,"avatar_url":"https://avatars.githubusercontent.com/u/633680?v=3","gravatar_id":"","url":"https://api.github.com/users/jalavik","html_url":"https://github.com/jalavik","followers_url":"https://api.github.com/users/jalavik/followers","following_url":"https://api.github.com/users/jalavik/following{/other_user}","gists_url":"https://api.github.com/users/jalavik/gists{/gist_id}","starred_url":"https://api.github.com/users/jalavik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jalavik/subscriptions","organizations_url":"https://api.github.com/users/jalavik/orgs","repos_url":"https://api.github.com/users/jalavik/repos","events_url":"https://api.github.com/users/jalavik/events{/privacy}","received_events_url":"https://api.github.com/users/jalavik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jalavik/inspire-next","description":"INSPIRE overlay repository to be used with Invenio's NEXT branch","fork":true,"url":"https://api.github.com/repos/jalavik/inspire-next","forks_url":"https://api.github.com/repos/jalavik/inspire-next/forks","keys_url":"https://api.github.com/repos/jalavik/inspire-next/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jalavik/inspire-next/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jalavik/inspire-next/teams","hooks_url":"https://api.github.com/repos/jalavik/inspire-next/hooks","issue_events_url":"https://api.github.com/repos/jalavik/inspire-next/issues/events{/number}","events_url":"https://api.github.com/repos/jalavik/inspire-next/events","assignees_url":"https://api.github.com/repos/jalavik/inspire-next/assignees{/user}","branches_url":"https://api.github.com/repos/jalavik/inspire-next/branches{/branch}","tags_url":"https://api.github.com/repos/jalavik/inspire-next/tags","blobs_url":"https://api.github.com/repos/jalavik/inspire-next/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jalavik/inspire-next/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jalavik/inspire-next/git/refs{/sha}","trees_url":"https://api.github.com/repos/jalavik/inspire-next/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jalavik/inspire-next/statuses/{sha}","languages_url":"https://api.github.com/repos/jalavik/inspire-next/languages","stargazers_url":"https://api.github.com/repos/jalavik/inspire-next/stargazers","contributors_url":"https://api.github.com/repos/jalavik/inspire-next/contributors","subscribers_url":"https://api.github.com/repos/jalavik/inspire-next/subscribers","subscription_url":"https://api.github.com/repos/jalavik/inspire-next/subscription","commits_url":"https://api.github.com/repos/jalavik/inspire-next/commits{/sha}","git_commits_url":"https://api.github.com/repos/jalavik/inspire-next/git/commits{/sha}","comments_url":"https://api.github.com/repos/jalavik/inspire-next/comments{/number}","issue_comment_url":"https://api.github.com/repos/jalavik/inspire-next/issues/comments{/number}","contents_url":"https://api.github.com/repos/jalavik/inspire-next/contents/{+path}","compare_url":"https://api.github.com/repos/jalavik/inspire-next/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jalavik/inspire-next/merges","archive_url":"https://api.github.com/repos/jalavik/inspire-next/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jalavik/inspire-next/downloads","issues_url":"https://api.github.com/repos/jalavik/inspire-next/issues{/number}","pulls_url":"https://api.github.com/repos/jalavik/inspire-next/pulls{/number}","milestones_url":"https://api.github.com/repos/jalavik/inspire-next/milestones{/number}","notifications_url":"https://api.github.com/repos/jalavik/inspire-next/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jalavik/inspire-next/labels{/name}","releases_url":"https://api.github.com/repos/jalavik/inspire-next/releases{/id}","created_at":"2014-02-07T14:37:14Z","updated_at":"2015-01-09T17:18:15Z","pushed_at":"2015-12-16T15:39:19Z","git_url":"git://github.com/jalavik/inspire-next.git","ssh_url":"git@github.com:jalavik/inspire-next.git","clone_url":"https://github.com/jalavik/inspire-next.git","svn_url":"https://github.com/jalavik/inspire-next","homepage":null,"size":34647,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"inspirehep:master","ref":"master","sha":"5297ab15ad067c5911e4d48beb43ae01ebc7d9b3","user":{"login":"inspirehep","id":356664,"avatar_url":"https://avatars.githubusercontent.com/u/356664?v=3","gravatar_id":"","url":"https://api.github.com/users/inspirehep","html_url":"https://github.com/inspirehep","followers_url":"https://api.github.com/users/inspirehep/followers","following_url":"https://api.github.com/users/inspirehep/following{/other_user}","gists_url":"https://api.github.com/users/inspirehep/gists{/gist_id}","starred_url":"https://api.github.com/users/inspirehep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inspirehep/subscriptions","organizations_url":"https://api.github.com/users/inspirehep/orgs","repos_url":"https://api.github.com/users/inspirehep/repos","events_url":"https://api.github.com/users/inspirehep/events{/privacy}","received_events_url":"https://api.github.com/users/inspirehep/received_events","type":"Organization","site_admin":false},"repo":{"id":15221515,"name":"inspire-next","full_name":"inspirehep/inspire-next","owner":{"login":"inspirehep","id":356664,"avatar_url":"https://avatars.githubusercontent.com/u/356664?v=3","gravatar_id":"","url":"https://api.github.com/users/inspirehep","html_url":"https://github.com/inspirehep","followers_url":"https://api.github.com/users/inspirehep/followers","following_url":"https://api.github.com/users/inspirehep/following{/other_user}","gists_url":"https://api.github.com/users/inspirehep/gists{/gist_id}","starred_url":"https://api.github.com/users/inspirehep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inspirehep/subscriptions","organizations_url":"https://api.github.com/users/inspirehep/orgs","repos_url":"https://api.github.com/users/inspirehep/repos","events_url":"https://api.github.com/users/inspirehep/events{/privacy}","received_events_url":"https://api.github.com/users/inspirehep/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inspirehep/inspire-next","description":"INSPIRE overlay repository to be used with https://github.com/inspirehep/invenio@labs branch","fork":false,"url":"https://api.github.com/repos/inspirehep/inspire-next","forks_url":"https://api.github.com/repos/inspirehep/inspire-next/forks","keys_url":"https://api.github.com/repos/inspirehep/inspire-next/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inspirehep/inspire-next/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inspirehep/inspire-next/teams","hooks_url":"https://api.github.com/repos/inspirehep/inspire-next/hooks","issue_events_url":"https://api.github.com/repos/inspirehep/inspire-next/issues/events{/number}","events_url":"https://api.github.com/repos/inspirehep/inspire-next/events","assignees_url":"https://api.github.com/repos/inspirehep/inspire-next/assignees{/user}","branches_url":"https://api.github.com/repos/inspirehep/inspire-next/branches{/branch}","tags_url":"https://api.github.com/repos/inspirehep/inspire-next/tags","blobs_url":"https://api.github.com/repos/inspirehep/inspire-next/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inspirehep/inspire-next/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inspirehep/inspire-next/git/refs{/sha}","trees_url":"https://api.github.com/repos/inspirehep/inspire-next/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inspirehep/inspire-next/statuses/{sha}","languages_url":"https://api.github.com/repos/inspirehep/inspire-next/languages","stargazers_url":"https://api.github.com/repos/inspirehep/inspire-next/stargazers","contributors_url":"https://api.github.com/repos/inspirehep/inspire-next/contributors","subscribers_url":"https://api.github.com/repos/inspirehep/inspire-next/subscribers","subscription_url":"https://api.github.com/repos/inspirehep/inspire-next/subscription","commits_url":"https://api.github.com/repos/inspirehep/inspire-next/commits{/sha}","git_commits_url":"https://api.github.com/repos/inspirehep/inspire-next/git/commits{/sha}","comments_url":"https://api.github.com/repos/inspirehep/inspire-next/comments{/number}","issue_comment_url":"https://api.github.com/repos/inspirehep/inspire-next/issues/comments{/number}","contents_url":"https://api.github.com/repos/inspirehep/inspire-next/contents/{+path}","compare_url":"https://api.github.com/repos/inspirehep/inspire-next/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inspirehep/inspire-next/merges","archive_url":"https://api.github.com/repos/inspirehep/inspire-next/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inspirehep/inspire-next/downloads","issues_url":"https://api.github.com/repos/inspirehep/inspire-next/issues{/number}","pulls_url":"https://api.github.com/repos/inspirehep/inspire-next/pulls{/number}","milestones_url":"https://api.github.com/repos/inspirehep/inspire-next/milestones{/number}","notifications_url":"https://api.github.com/repos/inspirehep/inspire-next/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inspirehep/inspire-next/labels{/name}","releases_url":"https://api.github.com/repos/inspirehep/inspire-next/releases{/id}","created_at":"2013-12-16T09:11:58Z","updated_at":"2015-10-13T09:48:55Z","pushed_at":"2015-12-16T16:03:56Z","git_url":"git://github.com/inspirehep/inspire-next.git","ssh_url":"git@github.com:inspirehep/inspire-next.git","clone_url":"https://github.com/inspirehep/inspire-next.git","svn_url":"https://github.com/inspirehep/inspire-next","homepage":"https://labs.inspirehep.net","size":44290,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":86,"forks":23,"open_issues":86,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inspirehep/inspire-next/pulls/678"},"html":{"href":"https://github.com/inspirehep/inspire-next/pull/678"},"issue":{"href":"https://api.github.com/repos/inspirehep/inspire-next/issues/678"},"comments":{"href":"https://api.github.com/repos/inspirehep/inspire-next/issues/678/comments"},"review_comments":{"href":"https://api.github.com/repos/inspirehep/inspire-next/pulls/678/comments"},"review_comment":{"href":"https://api.github.com/repos/inspirehep/inspire-next/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inspirehep/inspire-next/pulls/678/commits"},"statuses":{"href":"https://api.github.com/repos/inspirehep/inspire-next/statuses/001ae87efa2be3f467d57860e025f14f0bc5a2fb"}}}}