{"action":"created","comment":{"url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/comments/48832578","id":48832578,"diff_hunk":"@@ -0,0 +1,54 @@\n+# -*- coding: utf-8 -*-\n+#\n+# This file is part of Invenio.\n+# Copyright (C) 2015 CERN.\n+#\n+# Invenio is free software; you can redistribute it\n+# and/or modify it under the terms of the GNU General Public License as\n+# published by the Free Software Foundation; either version 2 of the\n+# License, or (at your option) any later version.\n+#\n+# Invenio is distributed in the hope that it will be\n+# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+# General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with Invenio; if not, write to the\n+# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,\n+# MA 02111-1307, USA.\n+#\n+# In applying this license, CERN does not\n+# waive the privileges and immunities granted to it by virtue of its status\n+# as an Intergovernmental Organization or submit itself to any jurisdiction.\n+\"\"\"OpenAIRE configuration file.\"\"\"\n+\n+from __future__ import absolute_import, print_function\n+\n+OPENAIRE_FUNDREF_LOCAL_SOURCE = 'data/fundref_registry.rdf'\n+OPENAIRE_FUNDREF_ENDPOINT = 'http://dx.doi.org/10.13039/fundref_registry'\n+OPENAIRE_CC_SOURCE = 'data/geonames2countrycodes_iso_3166.txt'\n+OPENAIRE_OAI_LOCAL_SOURCE = ''  # Large file that requires separate download\n+OPENAIRE_OAIPMH_ENDPOINT = \"http://api.openaire.eu/oai_pmh\"\n+\n+OPENAIRE_FUNDREF_NAMESPACES = {\n+    'rdf': \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\n+    'xml': \"http://www.w3.org/XML/1998/namespace\",\n+    'dct': \"http://purl.org/dc/terms/\",\n+    'skos': \"http://www.w3.org/2004/02/skos/core#\",\n+    'skosxl': \"http://www.w3.org/2008/05/skos-xl#\",\n+    'svf': \"http://data.fundref.org/xml/schema/grant/grant-1.2/\",\n+    'rdfs': \"http://www.w3.org/2000/01/rdf-schema#\",\n+    'fref': \"http://data.fundref.org/terms\",\n+}\n+\n+OPENAIRE_OAIPMH_NAMESPACES = {\n+    'oai': 'http://www.openarchives.org/OAI/2.0/',\n+    'oaf': 'http://namespace.openaire.eu/oaf',\n+}\n+\n+OPENAIRE_SCHEMAS_HOST = 'inveniosoftware.org'\n+OPENAIRE_SCHEMAS_ENDPOINT = '/schemas'\n+OPENAIRE_SCHEMAS_DEFAULT_FUNDER = 'funder/funder-v1.0.0.json'\n+OPENAIRE_SCHEMAS_DEFAULT_GRANT = 'grant/grant-v1.0.0.json'\n+OPENAIRE_JSONRESOLVER_GRANTS_HOST = 'inveniogrants.org'","path":"invenio_openaire/config.py","position":54,"original_position":54,"commit_id":"bb5680ff0b3c3df5a81d012f2c7a0ec5fc1b834e","original_commit_id":"ffcbbd39d40a9e3d78cd0f96c62a4462e58fd800","user":{"login":"krzysztof","id":656365,"avatar_url":"https://avatars.githubusercontent.com/u/656365?v=3","gravatar_id":"","url":"https://api.github.com/users/krzysztof","html_url":"https://github.com/krzysztof","followers_url":"https://api.github.com/users/krzysztof/followers","following_url":"https://api.github.com/users/krzysztof/following{/other_user}","gists_url":"https://api.github.com/users/krzysztof/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztof/subscriptions","organizations_url":"https://api.github.com/users/krzysztof/orgs","repos_url":"https://api.github.com/users/krzysztof/repos","events_url":"https://api.github.com/users/krzysztof/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztof/received_events","type":"User","site_admin":false},"body":"It's used by the JSONResolver for grant resolving here: https://github.com/krzysztof/invenio-openaire/blob/master/invenio_openaire/resolvers/grants.py#L51\r\n\r\nIt's a more general JSONResolver problem that we don't know a hostname upfront but need to resolve it locally anyway (see JSONSchemas: https://github.com/inveniosoftware/invenio-jsonschemas/blob/master/invenio_jsonschemas/jsonresolver.py#L43).\r\n\r\nOpenAIRE resolves two entities using JSONResolver - Funders and Grants.\r\nFunders are straightforward (host = 'dx.doi.org'), while Grants will point to our host, (e.g. 'zenodo.org'), or any other installation. I could have in fact used 'zenodo.org' as default but I wanted something neutral.","created_at":"2016-01-05T10:44:32Z","updated_at":"2016-01-05T10:44:32Z","html_url":"https://github.com/inveniosoftware/invenio-openaire/pull/4#discussion_r48832578","pull_request_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/comments/48832578"},"html":{"href":"https://github.com/inveniosoftware/invenio-openaire/pull/4#discussion_r48832578"},"pull_request":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/4","id":52237880,"html_url":"https://github.com/inveniosoftware/invenio-openaire/pull/4","diff_url":"https://github.com/inveniosoftware/invenio-openaire/pull/4.diff","patch_url":"https://github.com/inveniosoftware/invenio-openaire/pull/4.patch","issue_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/issues/4","number":4,"state":"open","locked":false,"title":"WIP global: openaire and fundref harvesting","user":{"login":"krzysztof","id":656365,"avatar_url":"https://avatars.githubusercontent.com/u/656365?v=3","gravatar_id":"","url":"https://api.github.com/users/krzysztof","html_url":"https://github.com/krzysztof","followers_url":"https://api.github.com/users/krzysztof/followers","following_url":"https://api.github.com/users/krzysztof/following{/other_user}","gists_url":"https://api.github.com/users/krzysztof/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztof/subscriptions","organizations_url":"https://api.github.com/users/krzysztof/orgs","repos_url":"https://api.github.com/users/krzysztof/repos","events_url":"https://api.github.com/users/krzysztof/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztof/received_events","type":"User","site_admin":false},"body":"* Harvest FundRef and OPENAIRE datasets","created_at":"2015-12-01T10:07:07Z","updated_at":"2016-01-05T10:44:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a80f09f475e68884b1d82f6e4204364e5cdf2b94","assignee":{"login":"krzysztof","id":656365,"avatar_url":"https://avatars.githubusercontent.com/u/656365?v=3","gravatar_id":"","url":"https://api.github.com/users/krzysztof","html_url":"https://github.com/krzysztof","followers_url":"https://api.github.com/users/krzysztof/followers","following_url":"https://api.github.com/users/krzysztof/following{/other_user}","gists_url":"https://api.github.com/users/krzysztof/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztof/subscriptions","organizations_url":"https://api.github.com/users/krzysztof/orgs","repos_url":"https://api.github.com/users/krzysztof/repos","events_url":"https://api.github.com/users/krzysztof/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztof/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/milestones/1","html_url":"https://github.com/inveniosoftware/invenio-openaire/milestones/v1.0.0","labels_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/milestones/1/labels","id":1415903,"number":1,"title":"v1.0.0","description":"","creator":{"login":"lnielsen","id":1698163,"avatar_url":"https://avatars.githubusercontent.com/u/1698163?v=3","gravatar_id":"","url":"https://api.github.com/users/lnielsen","html_url":"https://github.com/lnielsen","followers_url":"https://api.github.com/users/lnielsen/followers","following_url":"https://api.github.com/users/lnielsen/following{/other_user}","gists_url":"https://api.github.com/users/lnielsen/gists{/gist_id}","starred_url":"https://api.github.com/users/lnielsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lnielsen/subscriptions","organizations_url":"https://api.github.com/users/lnielsen/orgs","repos_url":"https://api.github.com/users/lnielsen/repos","events_url":"https://api.github.com/users/lnielsen/events{/privacy}","received_events_url":"https://api.github.com/users/lnielsen/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2015-11-17T14:06:33Z","updated_at":"2016-01-05T08:21:50Z","due_on":"2015-11-29T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/4/commits","review_comments_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/4/comments","review_comment_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/issues/4/comments","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/statuses/bb5680ff0b3c3df5a81d012f2c7a0ec5fc1b834e","head":{"label":"krzysztof:master","ref":"master","sha":"bb5680ff0b3c3df5a81d012f2c7a0ec5fc1b834e","user":{"login":"krzysztof","id":656365,"avatar_url":"https://avatars.githubusercontent.com/u/656365?v=3","gravatar_id":"","url":"https://api.github.com/users/krzysztof","html_url":"https://github.com/krzysztof","followers_url":"https://api.github.com/users/krzysztof/followers","following_url":"https://api.github.com/users/krzysztof/following{/other_user}","gists_url":"https://api.github.com/users/krzysztof/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztof/subscriptions","organizations_url":"https://api.github.com/users/krzysztof/orgs","repos_url":"https://api.github.com/users/krzysztof/repos","events_url":"https://api.github.com/users/krzysztof/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztof/received_events","type":"User","site_admin":false},"repo":{"id":46554835,"name":"invenio-openaire","full_name":"krzysztof/invenio-openaire","owner":{"login":"krzysztof","id":656365,"avatar_url":"https://avatars.githubusercontent.com/u/656365?v=3","gravatar_id":"","url":"https://api.github.com/users/krzysztof","html_url":"https://github.com/krzysztof","followers_url":"https://api.github.com/users/krzysztof/followers","following_url":"https://api.github.com/users/krzysztof/following{/other_user}","gists_url":"https://api.github.com/users/krzysztof/gists{/gist_id}","starred_url":"https://api.github.com/users/krzysztof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzysztof/subscriptions","organizations_url":"https://api.github.com/users/krzysztof/orgs","repos_url":"https://api.github.com/users/krzysztof/repos","events_url":"https://api.github.com/users/krzysztof/events{/privacy}","received_events_url":"https://api.github.com/users/krzysztof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krzysztof/invenio-openaire","description":"Invenio module for OpenAIRE integration.","fork":true,"url":"https://api.github.com/repos/krzysztof/invenio-openaire","forks_url":"https://api.github.com/repos/krzysztof/invenio-openaire/forks","keys_url":"https://api.github.com/repos/krzysztof/invenio-openaire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krzysztof/invenio-openaire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krzysztof/invenio-openaire/teams","hooks_url":"https://api.github.com/repos/krzysztof/invenio-openaire/hooks","issue_events_url":"https://api.github.com/repos/krzysztof/invenio-openaire/issues/events{/number}","events_url":"https://api.github.com/repos/krzysztof/invenio-openaire/events","assignees_url":"https://api.github.com/repos/krzysztof/invenio-openaire/assignees{/user}","branches_url":"https://api.github.com/repos/krzysztof/invenio-openaire/branches{/branch}","tags_url":"https://api.github.com/repos/krzysztof/invenio-openaire/tags","blobs_url":"https://api.github.com/repos/krzysztof/invenio-openaire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krzysztof/invenio-openaire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krzysztof/invenio-openaire/git/refs{/sha}","trees_url":"https://api.github.com/repos/krzysztof/invenio-openaire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krzysztof/invenio-openaire/statuses/{sha}","languages_url":"https://api.github.com/repos/krzysztof/invenio-openaire/languages","stargazers_url":"https://api.github.com/repos/krzysztof/invenio-openaire/stargazers","contributors_url":"https://api.github.com/repos/krzysztof/invenio-openaire/contributors","subscribers_url":"https://api.github.com/repos/krzysztof/invenio-openaire/subscribers","subscription_url":"https://api.github.com/repos/krzysztof/invenio-openaire/subscription","commits_url":"https://api.github.com/repos/krzysztof/invenio-openaire/commits{/sha}","git_commits_url":"https://api.github.com/repos/krzysztof/invenio-openaire/git/commits{/sha}","comments_url":"https://api.github.com/repos/krzysztof/invenio-openaire/comments{/number}","issue_comment_url":"https://api.github.com/repos/krzysztof/invenio-openaire/issues/comments{/number}","contents_url":"https://api.github.com/repos/krzysztof/invenio-openaire/contents/{+path}","compare_url":"https://api.github.com/repos/krzysztof/invenio-openaire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krzysztof/invenio-openaire/merges","archive_url":"https://api.github.com/repos/krzysztof/invenio-openaire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krzysztof/invenio-openaire/downloads","issues_url":"https://api.github.com/repos/krzysztof/invenio-openaire/issues{/number}","pulls_url":"https://api.github.com/repos/krzysztof/invenio-openaire/pulls{/number}","milestones_url":"https://api.github.com/repos/krzysztof/invenio-openaire/milestones{/number}","notifications_url":"https://api.github.com/repos/krzysztof/invenio-openaire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krzysztof/invenio-openaire/labels{/name}","releases_url":"https://api.github.com/repos/krzysztof/invenio-openaire/releases{/id}","created_at":"2015-11-20T10:15:17Z","updated_at":"2015-11-20T10:15:18Z","pushed_at":"2016-01-05T09:46:59Z","git_url":"git://github.com/krzysztof/invenio-openaire.git","ssh_url":"git@github.com:krzysztof/invenio-openaire.git","clone_url":"https://github.com/krzysztof/invenio-openaire.git","svn_url":"https://github.com/krzysztof/invenio-openaire","homepage":null,"size":1500,"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":"inveniosoftware:master","ref":"master","sha":"74c6075db079c87549a19b0d026b28e5d55c4070","user":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":46347602,"name":"invenio-openaire","full_name":"inveniosoftware/invenio-openaire","owner":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inveniosoftware/invenio-openaire","description":"Invenio module for OpenAIRE integration.","fork":false,"url":"https://api.github.com/repos/inveniosoftware/invenio-openaire","forks_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/forks","keys_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/teams","hooks_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/hooks","issue_events_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/issues/events{/number}","events_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/events","assignees_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/assignees{/user}","branches_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/branches{/branch}","tags_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/tags","blobs_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/git/refs{/sha}","trees_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/statuses/{sha}","languages_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/languages","stargazers_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/stargazers","contributors_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/contributors","subscribers_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/subscribers","subscription_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/subscription","commits_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/commits{/sha}","git_commits_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/git/commits{/sha}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/comments{/number}","issue_comment_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/issues/comments{/number}","contents_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/contents/{+path}","compare_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/merges","archive_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/downloads","issues_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/issues{/number}","pulls_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls{/number}","milestones_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/milestones{/number}","notifications_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/labels{/name}","releases_url":"https://api.github.com/repos/inveniosoftware/invenio-openaire/releases{/id}","created_at":"2015-11-17T13:06:20Z","updated_at":"2015-11-17T13:08:31Z","pushed_at":"2016-01-05T09:47:00Z","git_url":"git://github.com/inveniosoftware/invenio-openaire.git","ssh_url":"git@github.com:inveniosoftware/invenio-openaire.git","clone_url":"https://github.com/inveniosoftware/invenio-openaire.git","svn_url":"https://github.com/inveniosoftware/invenio-openaire","homepage":null,"size":30,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/4"},"html":{"href":"https://github.com/inveniosoftware/invenio-openaire/pull/4"},"issue":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/issues/4"},"comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/inveniosoftware/invenio-openaire/statuses/bb5680ff0b3c3df5a81d012f2c7a0ec5fc1b834e"}}}}