{"action":"created","comment":{"url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/comments/173854925","pull_request_review_id":103112607,"id":173854925,"diff_hunk":"@@ -75,9 +85,17 @@ def _func_person_role(self, person_role):\n         )\n         return mapping\n \n-    @functions.signature({'types': ['string']})\n-    def _func_jisc_id(self, publisher_name):\n-        return JISC_ID.get(publisher_name) or 0\n+    @functions.signature({'types': []})\n+    def _func_jisc_id(self, node):\n+        return 799\n+\n+    @functions.signature({'types': []})\n+    def _func_org_addr(self, node):\n+        return HEI_ADDRESS[799]\n+\n+    @functions.signature({'types': []})\n+    def _func_dummy_uuid(self, node):","path":"pure_adaptor/pure/base/remapper.py","position":51,"original_position":51,"commit_id":"b93ef5f11fa905a5fb8696b0c8027ac4a99416a2","original_commit_id":"b93ef5f11fa905a5fb8696b0c8027ac4a99416a2","user":{"login":"camilla-synbyote","id":32636411,"avatar_url":"https://avatars2.githubusercontent.com/u/32636411?v=4","gravatar_id":"","url":"https://api.github.com/users/camilla-synbyote","html_url":"https://github.com/camilla-synbyote","followers_url":"https://api.github.com/users/camilla-synbyote/followers","following_url":"https://api.github.com/users/camilla-synbyote/following{/other_user}","gists_url":"https://api.github.com/users/camilla-synbyote/gists{/gist_id}","starred_url":"https://api.github.com/users/camilla-synbyote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camilla-synbyote/subscriptions","organizations_url":"https://api.github.com/users/camilla-synbyote/orgs","repos_url":"https://api.github.com/users/camilla-synbyote/repos","events_url":"https://api.github.com/users/camilla-synbyote/events{/privacy}","received_events_url":"https://api.github.com/users/camilla-synbyote/received_events","type":"User","site_admin":false},"body":"Unfortunately, the JMESPath documentation is not super clear when it comes to custom functions \r\nall of the examples always pass some sort of argument into the func. I've experiment with not having a node argument and JMESPath seems to forget that `dummy_uuid` is a object method and thus accepts `self` as an additional argument. When you try to call a custom func without passing in a node, you get the following error\r\n\r\n\r\n    def _validate_arguments(self, args, signature, function_name):\r\n        if signature and signature[-1].get('variadic'):\r\n            if len(args) < len(signature):\r\n                raise exceptions.VariadictArityError(\r\n                    len(signature), len(args), function_name)\r\n        elif len(args) != len(signature):\r\n            raise exceptions.ArityError(\r\n>               len(signature), len(args), function_name)\r\nE           jmespath.exceptions.ArityError: Expected 1 argument for function dummy_uuid(), received 0","created_at":"2018-03-12T16:13:57Z","updated_at":"2018-03-12T16:13:57Z","html_url":"https://github.com/JiscRDSS/rdss-pure-adaptor/pull/7#discussion_r173854925","pull_request_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/7","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/comments/173854925"},"html":{"href":"https://github.com/JiscRDSS/rdss-pure-adaptor/pull/7#discussion_r173854925"},"pull_request":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/7"}},"in_reply_to_id":173806402},"pull_request":{"url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/7","id":174363999,"html_url":"https://github.com/JiscRDSS/rdss-pure-adaptor/pull/7","diff_url":"https://github.com/JiscRDSS/rdss-pure-adaptor/pull/7.diff","patch_url":"https://github.com/JiscRDSS/rdss-pure-adaptor/pull/7.patch","issue_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues/7","number":7,"state":"open","locked":false,"title":"Feature/rdss 1784","user":{"login":"camilla-synbyote","id":32636411,"avatar_url":"https://avatars2.githubusercontent.com/u/32636411?v=4","gravatar_id":"","url":"https://api.github.com/users/camilla-synbyote","html_url":"https://github.com/camilla-synbyote","followers_url":"https://api.github.com/users/camilla-synbyote/followers","following_url":"https://api.github.com/users/camilla-synbyote/following{/other_user}","gists_url":"https://api.github.com/users/camilla-synbyote/gists{/gist_id}","starred_url":"https://api.github.com/users/camilla-synbyote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camilla-synbyote/subscriptions","organizations_url":"https://api.github.com/users/camilla-synbyote/orgs","repos_url":"https://api.github.com/users/camilla-synbyote/repos","events_url":"https://api.github.com/users/camilla-synbyote/events{/privacy}","received_events_url":"https://api.github.com/users/camilla-synbyote/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-12T13:15:10Z","updated_at":"2018-03-12T16:13:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85ce1a5eb1de5d8d84b35d1c993d7aba796f5a4d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/7/commits","review_comments_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/7/comments","review_comment_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues/7/comments","statuses_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/statuses/b93ef5f11fa905a5fb8696b0c8027ac4a99416a2","head":{"label":"JiscRDSS:feature/RDSS-1784","ref":"feature/RDSS-1784","sha":"b93ef5f11fa905a5fb8696b0c8027ac4a99416a2","user":{"login":"JiscRDSS","id":22818449,"avatar_url":"https://avatars0.githubusercontent.com/u/22818449?v=4","gravatar_id":"","url":"https://api.github.com/users/JiscRDSS","html_url":"https://github.com/JiscRDSS","followers_url":"https://api.github.com/users/JiscRDSS/followers","following_url":"https://api.github.com/users/JiscRDSS/following{/other_user}","gists_url":"https://api.github.com/users/JiscRDSS/gists{/gist_id}","starred_url":"https://api.github.com/users/JiscRDSS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiscRDSS/subscriptions","organizations_url":"https://api.github.com/users/JiscRDSS/orgs","repos_url":"https://api.github.com/users/JiscRDSS/repos","events_url":"https://api.github.com/users/JiscRDSS/events{/privacy}","received_events_url":"https://api.github.com/users/JiscRDSS/received_events","type":"Organization","site_admin":false},"repo":{"id":104334428,"name":"rdss-pure-adaptor","full_name":"JiscRDSS/rdss-pure-adaptor","owner":{"login":"JiscRDSS","id":22818449,"avatar_url":"https://avatars0.githubusercontent.com/u/22818449?v=4","gravatar_id":"","url":"https://api.github.com/users/JiscRDSS","html_url":"https://github.com/JiscRDSS","followers_url":"https://api.github.com/users/JiscRDSS/followers","following_url":"https://api.github.com/users/JiscRDSS/following{/other_user}","gists_url":"https://api.github.com/users/JiscRDSS/gists{/gist_id}","starred_url":"https://api.github.com/users/JiscRDSS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiscRDSS/subscriptions","organizations_url":"https://api.github.com/users/JiscRDSS/orgs","repos_url":"https://api.github.com/users/JiscRDSS/repos","events_url":"https://api.github.com/users/JiscRDSS/events{/privacy}","received_events_url":"https://api.github.com/users/JiscRDSS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JiscRDSS/rdss-pure-adaptor","description":"Per-institution adaptor for harvesting datasets from the Pure research information system into RDSS.","fork":false,"url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor","forks_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/forks","keys_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/teams","hooks_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/hooks","issue_events_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues/events{/number}","events_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/events","assignees_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/assignees{/user}","branches_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/branches{/branch}","tags_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/tags","blobs_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/refs{/sha}","trees_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/statuses/{sha}","languages_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/languages","stargazers_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/stargazers","contributors_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/contributors","subscribers_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/subscribers","subscription_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/subscription","commits_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/commits{/sha}","git_commits_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/commits{/sha}","comments_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/comments{/number}","issue_comment_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues/comments{/number}","contents_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/contents/{+path}","compare_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/merges","archive_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/downloads","issues_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues{/number}","pulls_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls{/number}","milestones_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/milestones{/number}","notifications_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/labels{/name}","releases_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/releases{/id}","deployments_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/deployments","created_at":"2017-09-21T10:30:11Z","updated_at":"2018-03-12T13:56:46Z","pushed_at":"2018-03-12T13:15:43Z","git_url":"git://github.com/JiscRDSS/rdss-pure-adaptor.git","ssh_url":"git@github.com:JiscRDSS/rdss-pure-adaptor.git","clone_url":"https://github.com/JiscRDSS/rdss-pure-adaptor.git","svn_url":"https://github.com/JiscRDSS/rdss-pure-adaptor","homepage":"","size":369,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"JiscRDSS:develop","ref":"develop","sha":"02df52b4291baa103f35793a2eace4d4c6e973c9","user":{"login":"JiscRDSS","id":22818449,"avatar_url":"https://avatars0.githubusercontent.com/u/22818449?v=4","gravatar_id":"","url":"https://api.github.com/users/JiscRDSS","html_url":"https://github.com/JiscRDSS","followers_url":"https://api.github.com/users/JiscRDSS/followers","following_url":"https://api.github.com/users/JiscRDSS/following{/other_user}","gists_url":"https://api.github.com/users/JiscRDSS/gists{/gist_id}","starred_url":"https://api.github.com/users/JiscRDSS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiscRDSS/subscriptions","organizations_url":"https://api.github.com/users/JiscRDSS/orgs","repos_url":"https://api.github.com/users/JiscRDSS/repos","events_url":"https://api.github.com/users/JiscRDSS/events{/privacy}","received_events_url":"https://api.github.com/users/JiscRDSS/received_events","type":"Organization","site_admin":false},"repo":{"id":104334428,"name":"rdss-pure-adaptor","full_name":"JiscRDSS/rdss-pure-adaptor","owner":{"login":"JiscRDSS","id":22818449,"avatar_url":"https://avatars0.githubusercontent.com/u/22818449?v=4","gravatar_id":"","url":"https://api.github.com/users/JiscRDSS","html_url":"https://github.com/JiscRDSS","followers_url":"https://api.github.com/users/JiscRDSS/followers","following_url":"https://api.github.com/users/JiscRDSS/following{/other_user}","gists_url":"https://api.github.com/users/JiscRDSS/gists{/gist_id}","starred_url":"https://api.github.com/users/JiscRDSS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JiscRDSS/subscriptions","organizations_url":"https://api.github.com/users/JiscRDSS/orgs","repos_url":"https://api.github.com/users/JiscRDSS/repos","events_url":"https://api.github.com/users/JiscRDSS/events{/privacy}","received_events_url":"https://api.github.com/users/JiscRDSS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JiscRDSS/rdss-pure-adaptor","description":"Per-institution adaptor for harvesting datasets from the Pure research information system into RDSS.","fork":false,"url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor","forks_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/forks","keys_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/teams","hooks_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/hooks","issue_events_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues/events{/number}","events_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/events","assignees_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/assignees{/user}","branches_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/branches{/branch}","tags_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/tags","blobs_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/refs{/sha}","trees_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/statuses/{sha}","languages_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/languages","stargazers_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/stargazers","contributors_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/contributors","subscribers_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/subscribers","subscription_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/subscription","commits_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/commits{/sha}","git_commits_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/git/commits{/sha}","comments_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/comments{/number}","issue_comment_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues/comments{/number}","contents_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/contents/{+path}","compare_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/merges","archive_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/downloads","issues_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues{/number}","pulls_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls{/number}","milestones_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/milestones{/number}","notifications_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/labels{/name}","releases_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/releases{/id}","deployments_url":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/deployments","created_at":"2017-09-21T10:30:11Z","updated_at":"2018-03-12T13:56:46Z","pushed_at":"2018-03-12T13:15:43Z","git_url":"git://github.com/JiscRDSS/rdss-pure-adaptor.git","ssh_url":"git@github.com:JiscRDSS/rdss-pure-adaptor.git","clone_url":"https://github.com/JiscRDSS/rdss-pure-adaptor.git","svn_url":"https://github.com/JiscRDSS/rdss-pure-adaptor","homepage":"","size":369,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/7"},"html":{"href":"https://github.com/JiscRDSS/rdss-pure-adaptor/pull/7"},"issue":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues/7"},"comments":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/JiscRDSS/rdss-pure-adaptor/statuses/b93ef5f11fa905a5fb8696b0c8027ac4a99416a2"}},"author_association":"NONE"}}
{"actor":{"display_login":"camilla-synbyote"}}