{"action":"created","comment":{"url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/comments/203392936","pull_request_review_id":138271849,"id":203392936,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzM5MjkzNg==","diff_hunk":"@@ -45,6 +43,81 @@ def get_well_lithography(agency_cd, location_id, service_root=SERVICE_ROOT):\n     return parse_xml(resp.content)\n \n \n+def get_water_quality_activities(agency_cd, location_id):\n+    \"\"\"\n+    Retrieves water-quality data from the NGWMN iddata service.\n+\n+    :param str agency_cd: agency code for the agency that manages the location\n+    :param str location_id: the location's identifier\n+    :return: array of activity dictionaries\n+    :rtype: array\n+    \"\"\"\n+    xml = get_iddata('water_quality', agency_cd, location_id)\n+    if xml is None:\n+        return []\n+\n+    organization = xml.find('.//Organization', xml.nsmap)\n+\n+    return [{","path":"server/ngwmn/services/ngwmn.py","position":52,"original_position":52,"commit_id":"27709f55993a2f88e3b0a4c0c9d181456b0bd6ac","original_commit_id":"27709f55993a2f88e3b0a4c0c9d181456b0bd6ac","user":{"login":"danielnaab","id":136512,"node_id":"MDQ6VXNlcjEzNjUxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/136512?v=4","gravatar_id":"","url":"https://api.github.com/users/danielnaab","html_url":"https://github.com/danielnaab","followers_url":"https://api.github.com/users/danielnaab/followers","following_url":"https://api.github.com/users/danielnaab/following{/other_user}","gists_url":"https://api.github.com/users/danielnaab/gists{/gist_id}","starred_url":"https://api.github.com/users/danielnaab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielnaab/subscriptions","organizations_url":"https://api.github.com/users/danielnaab/orgs","repos_url":"https://api.github.com/users/danielnaab/repos","events_url":"https://api.github.com/users/danielnaab/events{/privacy}","received_events_url":"https://api.github.com/users/danielnaab/received_events","type":"User","site_admin":false},"body":"Yeah it's pretty dense, although I find using the declarative, inline dict and list comprehensions make it easier to read than for loops with append and assignment operations.\r\n\r\nTo avoid extending XML-isms into code, I personally like this way of parsing.. it's more explicit than a direct XML-to-dict conversion, and we could be doing other Python conversions here - eg, return date objects rather than strings. But I'm certainly open to using other approaches.","created_at":"2018-07-18T14:08:34Z","updated_at":"2018-07-18T14:08:34Z","html_url":"https://github.com/ACWI-SOGW/ngwmn-ui/pull/18#discussion_r203392936","pull_request_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/18","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/comments/203392936"},"html":{"href":"https://github.com/ACWI-SOGW/ngwmn-ui/pull/18#discussion_r203392936"},"pull_request":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/18"}},"in_reply_to_id":203383656},"pull_request":{"url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/18","id":202083431,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMDgzNDMx","html_url":"https://github.com/ACWI-SOGW/ngwmn-ui/pull/18","diff_url":"https://github.com/ACWI-SOGW/ngwmn-ui/pull/18.diff","patch_url":"https://github.com/ACWI-SOGW/ngwmn-ui/pull/18.patch","issue_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/issues/18","number":18,"state":"open","locked":false,"title":"Add water quality table to site page","user":{"login":"danielnaab","id":136512,"node_id":"MDQ6VXNlcjEzNjUxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/136512?v=4","gravatar_id":"","url":"https://api.github.com/users/danielnaab","html_url":"https://github.com/danielnaab","followers_url":"https://api.github.com/users/danielnaab/followers","following_url":"https://api.github.com/users/danielnaab/following{/other_user}","gists_url":"https://api.github.com/users/danielnaab/gists{/gist_id}","starred_url":"https://api.github.com/users/danielnaab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielnaab/subscriptions","organizations_url":"https://api.github.com/users/danielnaab/orgs","repos_url":"https://api.github.com/users/danielnaab/repos","events_url":"https://api.github.com/users/danielnaab/events{/privacy}","received_events_url":"https://api.github.com/users/danielnaab/received_events","type":"User","site_admin":false},"body":"Before making a pull request\r\n----------------------------\r\n\r\n- [x] Make sure all tests run\r\n- [x] Update the changelog appropriately\r\n\r\nDescription\r\n-----------\r\nThis includes the same columns as the table on the existing water quality tab.\r\n\r\nAfter making a pull request\r\n---------------------------\r\n- [x] If appropriate, put the link to the PR in the JIRA ticket\r\n- [x] Assign someone to review unless the change is trivial\r\n","created_at":"2018-07-17T21:48:20Z","updated_at":"2018-07-18T14:08:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"50e8215103a7f69f3a39a1ef942f5abbe05c5955","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/18/commits","review_comments_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/18/comments","review_comment_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/issues/18/comments","statuses_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/statuses/27709f55993a2f88e3b0a4c0c9d181456b0bd6ac","head":{"label":"danielnaab:water-quality","ref":"water-quality","sha":"27709f55993a2f88e3b0a4c0c9d181456b0bd6ac","user":{"login":"danielnaab","id":136512,"node_id":"MDQ6VXNlcjEzNjUxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/136512?v=4","gravatar_id":"","url":"https://api.github.com/users/danielnaab","html_url":"https://github.com/danielnaab","followers_url":"https://api.github.com/users/danielnaab/followers","following_url":"https://api.github.com/users/danielnaab/following{/other_user}","gists_url":"https://api.github.com/users/danielnaab/gists{/gist_id}","starred_url":"https://api.github.com/users/danielnaab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielnaab/subscriptions","organizations_url":"https://api.github.com/users/danielnaab/orgs","repos_url":"https://api.github.com/users/danielnaab/repos","events_url":"https://api.github.com/users/danielnaab/events{/privacy}","received_events_url":"https://api.github.com/users/danielnaab/received_events","type":"User","site_admin":false},"repo":{"id":140336675,"node_id":"MDEwOlJlcG9zaXRvcnkxNDAzMzY2NzU=","name":"ngwmn-ui","full_name":"danielnaab/ngwmn-ui","owner":{"login":"danielnaab","id":136512,"node_id":"MDQ6VXNlcjEzNjUxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/136512?v=4","gravatar_id":"","url":"https://api.github.com/users/danielnaab","html_url":"https://github.com/danielnaab","followers_url":"https://api.github.com/users/danielnaab/followers","following_url":"https://api.github.com/users/danielnaab/following{/other_user}","gists_url":"https://api.github.com/users/danielnaab/gists{/gist_id}","starred_url":"https://api.github.com/users/danielnaab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielnaab/subscriptions","organizations_url":"https://api.github.com/users/danielnaab/orgs","repos_url":"https://api.github.com/users/danielnaab/repos","events_url":"https://api.github.com/users/danielnaab/events{/privacy}","received_events_url":"https://api.github.com/users/danielnaab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielnaab/ngwmn-ui","description":null,"fork":true,"url":"https://api.github.com/repos/danielnaab/ngwmn-ui","forks_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/forks","keys_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/teams","hooks_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/hooks","issue_events_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/issues/events{/number}","events_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/events","assignees_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/assignees{/user}","branches_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/branches{/branch}","tags_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/tags","blobs_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/languages","stargazers_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/stargazers","contributors_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/contributors","subscribers_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/subscribers","subscription_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/subscription","commits_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/contents/{+path}","compare_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/merges","archive_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/downloads","issues_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/issues{/number}","pulls_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/labels{/name}","releases_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/releases{/id}","deployments_url":"https://api.github.com/repos/danielnaab/ngwmn-ui/deployments","created_at":"2018-07-09T20:07:44Z","updated_at":"2018-07-09T20:07:46Z","pushed_at":"2018-07-17T21:48:52Z","git_url":"git://github.com/danielnaab/ngwmn-ui.git","ssh_url":"git@github.com:danielnaab/ngwmn-ui.git","clone_url":"https://github.com/danielnaab/ngwmn-ui.git","svn_url":"https://github.com/danielnaab/ngwmn-ui","homepage":null,"size":343,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ACWI-SOGW:master","ref":"master","sha":"4d32f030552f911ba41db715f472b03052e026cc","user":{"login":"ACWI-SOGW","id":38867956,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODY3OTU2","avatar_url":"https://avatars2.githubusercontent.com/u/38867956?v=4","gravatar_id":"","url":"https://api.github.com/users/ACWI-SOGW","html_url":"https://github.com/ACWI-SOGW","followers_url":"https://api.github.com/users/ACWI-SOGW/followers","following_url":"https://api.github.com/users/ACWI-SOGW/following{/other_user}","gists_url":"https://api.github.com/users/ACWI-SOGW/gists{/gist_id}","starred_url":"https://api.github.com/users/ACWI-SOGW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ACWI-SOGW/subscriptions","organizations_url":"https://api.github.com/users/ACWI-SOGW/orgs","repos_url":"https://api.github.com/users/ACWI-SOGW/repos","events_url":"https://api.github.com/users/ACWI-SOGW/events{/privacy}","received_events_url":"https://api.github.com/users/ACWI-SOGW/received_events","type":"Organization","site_admin":false},"repo":{"id":136947777,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY5NDc3Nzc=","name":"ngwmn-ui","full_name":"ACWI-SOGW/ngwmn-ui","owner":{"login":"ACWI-SOGW","id":38867956,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODY3OTU2","avatar_url":"https://avatars2.githubusercontent.com/u/38867956?v=4","gravatar_id":"","url":"https://api.github.com/users/ACWI-SOGW","html_url":"https://github.com/ACWI-SOGW","followers_url":"https://api.github.com/users/ACWI-SOGW/followers","following_url":"https://api.github.com/users/ACWI-SOGW/following{/other_user}","gists_url":"https://api.github.com/users/ACWI-SOGW/gists{/gist_id}","starred_url":"https://api.github.com/users/ACWI-SOGW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ACWI-SOGW/subscriptions","organizations_url":"https://api.github.com/users/ACWI-SOGW/orgs","repos_url":"https://api.github.com/users/ACWI-SOGW/repos","events_url":"https://api.github.com/users/ACWI-SOGW/events{/privacy}","received_events_url":"https://api.github.com/users/ACWI-SOGW/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ACWI-SOGW/ngwmn-ui","description":null,"fork":false,"url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui","forks_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/forks","keys_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/teams","hooks_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/hooks","issue_events_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/issues/events{/number}","events_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/events","assignees_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/assignees{/user}","branches_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/branches{/branch}","tags_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/tags","blobs_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/languages","stargazers_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/stargazers","contributors_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/contributors","subscribers_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/subscribers","subscription_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/subscription","commits_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/contents/{+path}","compare_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/merges","archive_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/downloads","issues_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/issues{/number}","pulls_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/labels{/name}","releases_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/releases{/id}","deployments_url":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/deployments","created_at":"2018-06-11T15:46:43Z","updated_at":"2018-07-17T17:15:59Z","pushed_at":"2018-07-17T21:48:54Z","git_url":"git://github.com/ACWI-SOGW/ngwmn-ui.git","ssh_url":"git@github.com:ACWI-SOGW/ngwmn-ui.git","clone_url":"https://github.com/ACWI-SOGW/ngwmn-ui.git","svn_url":"https://github.com/ACWI-SOGW/ngwmn-ui","homepage":null,"size":336,"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":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/18"},"html":{"href":"https://github.com/ACWI-SOGW/ngwmn-ui/pull/18"},"issue":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/issues/18"},"comments":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/ACWI-SOGW/ngwmn-ui/statuses/27709f55993a2f88e3b0a4c0c9d181456b0bd6ac"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"danielnaab"}}