{"action":"created","comment":{"url":"https://api.github.com/repos/eHealthAfrica/aether/pulls/comments/220198979","pull_request_review_id":158550015,"id":220198979,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDE5ODk3OQ==","diff_hunk":"@@ -134,10 +136,16 @@ def upsert_project_artefacts(\n     # 4. create/update the mappings\n     for raw_mapping in mappings:\n         ignore_fields = ['name']\n-        if raw_mapping.get('definition') is None:\n+        mapping_definition = raw_mapping.get('definition')\n+        if mapping_definition is None:\n             # in case of no mapping rules were indicated, do not update them.\n             ignore_fields.append('definition')\n-\n+            mapping_definition = {'mappings': [], 'entities': {}}\n+        else:\n+            mapping_definition = {\n+                'mapping': mapping_definition.get('mapping', []),\n+                'entities': mapping_project_schemas,","path":"aether-kernel/aether/kernel/api/project_artefacts.py","position":30,"original_position":30,"commit_id":"80c27ed97fb4017b7ef58043d3b7c3cbdf1f2e4c","original_commit_id":"80c27ed97fb4017b7ef58043d3b7c3cbdf1f2e4c","user":{"login":"obdulia-losantos","id":8459537,"node_id":"MDQ6VXNlcjg0NTk1Mzc=","avatar_url":"https://avatars1.githubusercontent.com/u/8459537?v=4","gravatar_id":"","url":"https://api.github.com/users/obdulia-losantos","html_url":"https://github.com/obdulia-losantos","followers_url":"https://api.github.com/users/obdulia-losantos/followers","following_url":"https://api.github.com/users/obdulia-losantos/following{/other_user}","gists_url":"https://api.github.com/users/obdulia-losantos/gists{/gist_id}","starred_url":"https://api.github.com/users/obdulia-losantos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obdulia-losantos/subscriptions","organizations_url":"https://api.github.com/users/obdulia-losantos/orgs","repos_url":"https://api.github.com/users/obdulia-losantos/repos","events_url":"https://api.github.com/users/obdulia-losantos/events{/privacy}","received_events_url":"https://api.github.com/users/obdulia-losantos/received_events","type":"User","site_admin":false},"body":"Another point is that ALL the schemas/project schemas are being assigned to ALL mappings... is there a simple way to detect only the used ones.","created_at":"2018-09-25T13:47:24Z","updated_at":"2018-09-25T13:47:24Z","html_url":"https://github.com/eHealthAfrica/aether/pull/373#discussion_r220198979","pull_request_url":"https://api.github.com/repos/eHealthAfrica/aether/pulls/373","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eHealthAfrica/aether/pulls/comments/220198979"},"html":{"href":"https://github.com/eHealthAfrica/aether/pull/373#discussion_r220198979"},"pull_request":{"href":"https://api.github.com/repos/eHealthAfrica/aether/pulls/373"}}},"pull_request":{"url":"https://api.github.com/repos/eHealthAfrica/aether/pulls/373","id":217577912,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NTc3OTEy","html_url":"https://github.com/eHealthAfrica/aether/pull/373","diff_url":"https://github.com/eHealthAfrica/aether/pull/373.diff","patch_url":"https://github.com/eHealthAfrica/aether/pull/373.patch","issue_url":"https://api.github.com/repos/eHealthAfrica/aether/issues/373","number":373,"state":"open","locked":false,"title":"feat (ui): pipeline fetch/publish using mapping set","user":{"login":"lordmallam","id":16849953,"node_id":"MDQ6VXNlcjE2ODQ5OTUz","avatar_url":"https://avatars3.githubusercontent.com/u/16849953?v=4","gravatar_id":"","url":"https://api.github.com/users/lordmallam","html_url":"https://github.com/lordmallam","followers_url":"https://api.github.com/users/lordmallam/followers","following_url":"https://api.github.com/users/lordmallam/following{/other_user}","gists_url":"https://api.github.com/users/lordmallam/gists{/gist_id}","starred_url":"https://api.github.com/users/lordmallam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lordmallam/subscriptions","organizations_url":"https://api.github.com/users/lordmallam/orgs","repos_url":"https://api.github.com/users/lordmallam/repos","events_url":"https://api.github.com/users/lordmallam/events{/privacy}","received_events_url":"https://api.github.com/users/lordmallam/received_events","type":"User","site_admin":false},"body":"Fetch kernel artefacts and stores them as `pipeline -> contracts` grouped by mapping sets\r\nAllows pipeline create, edit and publish from UI to kernel using mapping sets\r\nRevalidate grouped contracts on pipeline update\r\nRefactor identity mapping to use mapping sets as contracts\r\nEnforce read only pipelines (on input(pipeline) and contract levels individually)\r\n\r\nRelated JIRA Tickets:\r\n[AET-346](https://jira.ehealthafrica.org/browse/AET-346)\r\n[AET-342](https://jira.ehealthafrica.org/browse/AET-342)\r\n[AET-277](https://jira.ehealthafrica.org/browse/AET-277)\r\n[AET-347](https://jira.ehealthafrica.org/browse/AET-347)\r\n[AET-343](https://jira.ehealthafrica.org/browse/AET-343)\r\n","created_at":"2018-09-24T07:55:32Z","updated_at":"2018-09-25T13:47:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6bbcc25631e8ec87b63aae1e5d64025610dbfbb1","assignee":null,"assignees":[],"requested_reviewers":[{"login":"adamvert","id":1815204,"node_id":"MDQ6VXNlcjE4MTUyMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1815204?v=4","gravatar_id":"","url":"https://api.github.com/users/adamvert","html_url":"https://github.com/adamvert","followers_url":"https://api.github.com/users/adamvert/followers","following_url":"https://api.github.com/users/adamvert/following{/other_user}","gists_url":"https://api.github.com/users/adamvert/gists{/gist_id}","starred_url":"https://api.github.com/users/adamvert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamvert/subscriptions","organizations_url":"https://api.github.com/users/adamvert/orgs","repos_url":"https://api.github.com/users/adamvert/repos","events_url":"https://api.github.com/users/adamvert/events{/privacy}","received_events_url":"https://api.github.com/users/adamvert/received_events","type":"User","site_admin":false},{"login":"quesebifurcan","id":3536066,"node_id":"MDQ6VXNlcjM1MzYwNjY=","avatar_url":"https://avatars1.githubusercontent.com/u/3536066?v=4","gravatar_id":"","url":"https://api.github.com/users/quesebifurcan","html_url":"https://github.com/quesebifurcan","followers_url":"https://api.github.com/users/quesebifurcan/followers","following_url":"https://api.github.com/users/quesebifurcan/following{/other_user}","gists_url":"https://api.github.com/users/quesebifurcan/gists{/gist_id}","starred_url":"https://api.github.com/users/quesebifurcan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quesebifurcan/subscriptions","organizations_url":"https://api.github.com/users/quesebifurcan/orgs","repos_url":"https://api.github.com/users/quesebifurcan/repos","events_url":"https://api.github.com/users/quesebifurcan/events{/privacy}","received_events_url":"https://api.github.com/users/quesebifurcan/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eHealthAfrica/aether/pulls/373/commits","review_comments_url":"https://api.github.com/repos/eHealthAfrica/aether/pulls/373/comments","review_comment_url":"https://api.github.com/repos/eHealthAfrica/aether/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eHealthAfrica/aether/issues/373/comments","statuses_url":"https://api.github.com/repos/eHealthAfrica/aether/statuses/80c27ed97fb4017b7ef58043d3b7c3cbdf1f2e4c","head":{"label":"eHealthAfrica:ui-pipeline-publish-mapping-set","ref":"ui-pipeline-publish-mapping-set","sha":"80c27ed97fb4017b7ef58043d3b7c3cbdf1f2e4c","user":{"login":"eHealthAfrica","id":3214042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMTQwNDI=","avatar_url":"https://avatars0.githubusercontent.com/u/3214042?v=4","gravatar_id":"","url":"https://api.github.com/users/eHealthAfrica","html_url":"https://github.com/eHealthAfrica","followers_url":"https://api.github.com/users/eHealthAfrica/followers","following_url":"https://api.github.com/users/eHealthAfrica/following{/other_user}","gists_url":"https://api.github.com/users/eHealthAfrica/gists{/gist_id}","starred_url":"https://api.github.com/users/eHealthAfrica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eHealthAfrica/subscriptions","organizations_url":"https://api.github.com/users/eHealthAfrica/orgs","repos_url":"https://api.github.com/users/eHealthAfrica/repos","events_url":"https://api.github.com/users/eHealthAfrica/events{/privacy}","received_events_url":"https://api.github.com/users/eHealthAfrica/received_events","type":"Organization","site_admin":false},"repo":{"id":110524187,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA1MjQxODc=","name":"aether","full_name":"eHealthAfrica/aether","private":false,"owner":{"login":"eHealthAfrica","id":3214042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMTQwNDI=","avatar_url":"https://avatars0.githubusercontent.com/u/3214042?v=4","gravatar_id":"","url":"https://api.github.com/users/eHealthAfrica","html_url":"https://github.com/eHealthAfrica","followers_url":"https://api.github.com/users/eHealthAfrica/followers","following_url":"https://api.github.com/users/eHealthAfrica/following{/other_user}","gists_url":"https://api.github.com/users/eHealthAfrica/gists{/gist_id}","starred_url":"https://api.github.com/users/eHealthAfrica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eHealthAfrica/subscriptions","organizations_url":"https://api.github.com/users/eHealthAfrica/orgs","repos_url":"https://api.github.com/users/eHealthAfrica/repos","events_url":"https://api.github.com/users/eHealthAfrica/events{/privacy}","received_events_url":"https://api.github.com/users/eHealthAfrica/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/eHealthAfrica/aether","description":"A platform for data curation, exchange, and publication","fork":false,"url":"https://api.github.com/repos/eHealthAfrica/aether","forks_url":"https://api.github.com/repos/eHealthAfrica/aether/forks","keys_url":"https://api.github.com/repos/eHealthAfrica/aether/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eHealthAfrica/aether/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eHealthAfrica/aether/teams","hooks_url":"https://api.github.com/repos/eHealthAfrica/aether/hooks","issue_events_url":"https://api.github.com/repos/eHealthAfrica/aether/issues/events{/number}","events_url":"https://api.github.com/repos/eHealthAfrica/aether/events","assignees_url":"https://api.github.com/repos/eHealthAfrica/aether/assignees{/user}","branches_url":"https://api.github.com/repos/eHealthAfrica/aether/branches{/branch}","tags_url":"https://api.github.com/repos/eHealthAfrica/aether/tags","blobs_url":"https://api.github.com/repos/eHealthAfrica/aether/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eHealthAfrica/aether/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eHealthAfrica/aether/git/refs{/sha}","trees_url":"https://api.github.com/repos/eHealthAfrica/aether/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eHealthAfrica/aether/statuses/{sha}","languages_url":"https://api.github.com/repos/eHealthAfrica/aether/languages","stargazers_url":"https://api.github.com/repos/eHealthAfrica/aether/stargazers","contributors_url":"https://api.github.com/repos/eHealthAfrica/aether/contributors","subscribers_url":"https://api.github.com/repos/eHealthAfrica/aether/subscribers","subscription_url":"https://api.github.com/repos/eHealthAfrica/aether/subscription","commits_url":"https://api.github.com/repos/eHealthAfrica/aether/commits{/sha}","git_commits_url":"https://api.github.com/repos/eHealthAfrica/aether/git/commits{/sha}","comments_url":"https://api.github.com/repos/eHealthAfrica/aether/comments{/number}","issue_comment_url":"https://api.github.com/repos/eHealthAfrica/aether/issues/comments{/number}","contents_url":"https://api.github.com/repos/eHealthAfrica/aether/contents/{+path}","compare_url":"https://api.github.com/repos/eHealthAfrica/aether/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eHealthAfrica/aether/merges","archive_url":"https://api.github.com/repos/eHealthAfrica/aether/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eHealthAfrica/aether/downloads","issues_url":"https://api.github.com/repos/eHealthAfrica/aether/issues{/number}","pulls_url":"https://api.github.com/repos/eHealthAfrica/aether/pulls{/number}","milestones_url":"https://api.github.com/repos/eHealthAfrica/aether/milestones{/number}","notifications_url":"https://api.github.com/repos/eHealthAfrica/aether/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eHealthAfrica/aether/labels{/name}","releases_url":"https://api.github.com/repos/eHealthAfrica/aether/releases{/id}","deployments_url":"https://api.github.com/repos/eHealthAfrica/aether/deployments","created_at":"2017-11-13T08:59:49Z","updated_at":"2018-09-24T13:53:10Z","pushed_at":"2018-09-25T13:36:40Z","git_url":"git://github.com/eHealthAfrica/aether.git","ssh_url":"git@github.com:eHealthAfrica/aether.git","clone_url":"https://github.com/eHealthAfrica/aether.git","svn_url":"https://github.com/eHealthAfrica/aether","homepage":"https://aether.ehealthafrica.org/","size":21998,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":8,"watchers":1,"default_branch":"develop"}},"base":{"label":"eHealthAfrica:parallel-extraction","ref":"parallel-extraction","sha":"34f92e456ec3555ff3f545804361500f0ddb447b","user":{"login":"eHealthAfrica","id":3214042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMTQwNDI=","avatar_url":"https://avatars0.githubusercontent.com/u/3214042?v=4","gravatar_id":"","url":"https://api.github.com/users/eHealthAfrica","html_url":"https://github.com/eHealthAfrica","followers_url":"https://api.github.com/users/eHealthAfrica/followers","following_url":"https://api.github.com/users/eHealthAfrica/following{/other_user}","gists_url":"https://api.github.com/users/eHealthAfrica/gists{/gist_id}","starred_url":"https://api.github.com/users/eHealthAfrica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eHealthAfrica/subscriptions","organizations_url":"https://api.github.com/users/eHealthAfrica/orgs","repos_url":"https://api.github.com/users/eHealthAfrica/repos","events_url":"https://api.github.com/users/eHealthAfrica/events{/privacy}","received_events_url":"https://api.github.com/users/eHealthAfrica/received_events","type":"Organization","site_admin":false},"repo":{"id":110524187,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA1MjQxODc=","name":"aether","full_name":"eHealthAfrica/aether","private":false,"owner":{"login":"eHealthAfrica","id":3214042,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMTQwNDI=","avatar_url":"https://avatars0.githubusercontent.com/u/3214042?v=4","gravatar_id":"","url":"https://api.github.com/users/eHealthAfrica","html_url":"https://github.com/eHealthAfrica","followers_url":"https://api.github.com/users/eHealthAfrica/followers","following_url":"https://api.github.com/users/eHealthAfrica/following{/other_user}","gists_url":"https://api.github.com/users/eHealthAfrica/gists{/gist_id}","starred_url":"https://api.github.com/users/eHealthAfrica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eHealthAfrica/subscriptions","organizations_url":"https://api.github.com/users/eHealthAfrica/orgs","repos_url":"https://api.github.com/users/eHealthAfrica/repos","events_url":"https://api.github.com/users/eHealthAfrica/events{/privacy}","received_events_url":"https://api.github.com/users/eHealthAfrica/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/eHealthAfrica/aether","description":"A platform for data curation, exchange, and publication","fork":false,"url":"https://api.github.com/repos/eHealthAfrica/aether","forks_url":"https://api.github.com/repos/eHealthAfrica/aether/forks","keys_url":"https://api.github.com/repos/eHealthAfrica/aether/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eHealthAfrica/aether/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eHealthAfrica/aether/teams","hooks_url":"https://api.github.com/repos/eHealthAfrica/aether/hooks","issue_events_url":"https://api.github.com/repos/eHealthAfrica/aether/issues/events{/number}","events_url":"https://api.github.com/repos/eHealthAfrica/aether/events","assignees_url":"https://api.github.com/repos/eHealthAfrica/aether/assignees{/user}","branches_url":"https://api.github.com/repos/eHealthAfrica/aether/branches{/branch}","tags_url":"https://api.github.com/repos/eHealthAfrica/aether/tags","blobs_url":"https://api.github.com/repos/eHealthAfrica/aether/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eHealthAfrica/aether/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eHealthAfrica/aether/git/refs{/sha}","trees_url":"https://api.github.com/repos/eHealthAfrica/aether/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eHealthAfrica/aether/statuses/{sha}","languages_url":"https://api.github.com/repos/eHealthAfrica/aether/languages","stargazers_url":"https://api.github.com/repos/eHealthAfrica/aether/stargazers","contributors_url":"https://api.github.com/repos/eHealthAfrica/aether/contributors","subscribers_url":"https://api.github.com/repos/eHealthAfrica/aether/subscribers","subscription_url":"https://api.github.com/repos/eHealthAfrica/aether/subscription","commits_url":"https://api.github.com/repos/eHealthAfrica/aether/commits{/sha}","git_commits_url":"https://api.github.com/repos/eHealthAfrica/aether/git/commits{/sha}","comments_url":"https://api.github.com/repos/eHealthAfrica/aether/comments{/number}","issue_comment_url":"https://api.github.com/repos/eHealthAfrica/aether/issues/comments{/number}","contents_url":"https://api.github.com/repos/eHealthAfrica/aether/contents/{+path}","compare_url":"https://api.github.com/repos/eHealthAfrica/aether/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eHealthAfrica/aether/merges","archive_url":"https://api.github.com/repos/eHealthAfrica/aether/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eHealthAfrica/aether/downloads","issues_url":"https://api.github.com/repos/eHealthAfrica/aether/issues{/number}","pulls_url":"https://api.github.com/repos/eHealthAfrica/aether/pulls{/number}","milestones_url":"https://api.github.com/repos/eHealthAfrica/aether/milestones{/number}","notifications_url":"https://api.github.com/repos/eHealthAfrica/aether/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eHealthAfrica/aether/labels{/name}","releases_url":"https://api.github.com/repos/eHealthAfrica/aether/releases{/id}","deployments_url":"https://api.github.com/repos/eHealthAfrica/aether/deployments","created_at":"2017-11-13T08:59:49Z","updated_at":"2018-09-24T13:53:10Z","pushed_at":"2018-09-25T13:36:40Z","git_url":"git://github.com/eHealthAfrica/aether.git","ssh_url":"git@github.com:eHealthAfrica/aether.git","clone_url":"https://github.com/eHealthAfrica/aether.git","svn_url":"https://github.com/eHealthAfrica/aether","homepage":"https://aether.ehealthafrica.org/","size":21998,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":8,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/eHealthAfrica/aether/pulls/373"},"html":{"href":"https://github.com/eHealthAfrica/aether/pull/373"},"issue":{"href":"https://api.github.com/repos/eHealthAfrica/aether/issues/373"},"comments":{"href":"https://api.github.com/repos/eHealthAfrica/aether/issues/373/comments"},"review_comments":{"href":"https://api.github.com/repos/eHealthAfrica/aether/pulls/373/comments"},"review_comment":{"href":"https://api.github.com/repos/eHealthAfrica/aether/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eHealthAfrica/aether/pulls/373/commits"},"statuses":{"href":"https://api.github.com/repos/eHealthAfrica/aether/statuses/80c27ed97fb4017b7ef58043d3b7c3cbdf1f2e4c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"obdulia-losantos"}}