{"action":"created","comment":{"url":"https://api.github.com/repos/etalab/udata/pulls/comments/45755518","id":45755518,"diff_hunk":"@@ -175,3 +175,25 @@ def to_bool(value):\n def hash_url(url):\n     '''Hash an URL to make it indexable'''\n     return hashlib.sha1(url.encode('utf-8')).hexdigest() if url else None\n+\n+\n+def recursive_get(obj, key):\n+    '''\n+    Get an attribute or a key recursively.\n+\n+    :param obj: The object to fetch attribute or key on\n+    :type obj: object|dict\n+    :param key: Either a string in dotted-notation ar an array of string\n+    :type key: string|list|tuple\n+    '''\n+    if not obj or not key:\n+        return\n+    parts = key.split('.') if isinstance(key, basestring) else key","path":"udata/utils.py","position":17,"original_position":17,"commit_id":"cf4e014ec6286867083f1b96f8198ba17b03cd24","original_commit_id":"cf4e014ec6286867083f1b96f8198ba17b03cd24","user":{"login":"davidbgk","id":3556,"avatar_url":"https://avatars.githubusercontent.com/u/3556?v=3","gravatar_id":"","url":"https://api.github.com/users/davidbgk","html_url":"https://github.com/davidbgk","followers_url":"https://api.github.com/users/davidbgk/followers","following_url":"https://api.github.com/users/davidbgk/following{/other_user}","gists_url":"https://api.github.com/users/davidbgk/gists{/gist_id}","starred_url":"https://api.github.com/users/davidbgk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidbgk/subscriptions","organizations_url":"https://api.github.com/users/davidbgk/orgs","repos_url":"https://api.github.com/users/davidbgk/repos","events_url":"https://api.github.com/users/davidbgk/events{/privacy}","received_events_url":"https://api.github.com/users/davidbgk/received_events","type":"User","site_admin":false},"body":"Well, not that much actually.","created_at":"2015-11-24T16:09:23Z","updated_at":"2015-11-24T16:09:23Z","html_url":"https://github.com/etalab/udata/pull/269#discussion_r45755518","pull_request_url":"https://api.github.com/repos/etalab/udata/pulls/269","_links":{"self":{"href":"https://api.github.com/repos/etalab/udata/pulls/comments/45755518"},"html":{"href":"https://github.com/etalab/udata/pull/269#discussion_r45755518"},"pull_request":{"href":"https://api.github.com/repos/etalab/udata/pulls/269"}}},"pull_request":{"url":"https://api.github.com/repos/etalab/udata/pulls/269","id":51661710,"html_url":"https://github.com/etalab/udata/pull/269","diff_url":"https://github.com/etalab/udata/pull/269.diff","patch_url":"https://github.com/etalab/udata/pull/269.patch","issue_url":"https://api.github.com/repos/etalab/udata/issues/269","number":269,"state":"open","locked":false,"title":"Complete csvs","user":{"login":"noirbizarre","id":15725,"avatar_url":"https://avatars.githubusercontent.com/u/15725?v=3","gravatar_id":"","url":"https://api.github.com/users/noirbizarre","html_url":"https://github.com/noirbizarre","followers_url":"https://api.github.com/users/noirbizarre/followers","following_url":"https://api.github.com/users/noirbizarre/following{/other_user}","gists_url":"https://api.github.com/users/noirbizarre/gists{/gist_id}","starred_url":"https://api.github.com/users/noirbizarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noirbizarre/subscriptions","organizations_url":"https://api.github.com/users/noirbizarre/orgs","repos_url":"https://api.github.com/users/noirbizarre/repos","events_url":"https://api.github.com/users/noirbizarre/events{/privacy}","received_events_url":"https://api.github.com/users/noirbizarre/received_events","type":"User","site_admin":false},"body":"This PR add some missing fields into datasets.csv.\r\n\r\nIt also provide a reusable helper to fetch nested attributes/keys on any object","created_at":"2015-11-24T13:52:21Z","updated_at":"2015-11-24T16:09:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22e53733ca955901afd22d346f5d206ee0bf8610","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/etalab/udata/pulls/269/commits","review_comments_url":"https://api.github.com/repos/etalab/udata/pulls/269/comments","review_comment_url":"https://api.github.com/repos/etalab/udata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/etalab/udata/issues/269/comments","statuses_url":"https://api.github.com/repos/etalab/udata/statuses/cf4e014ec6286867083f1b96f8198ba17b03cd24","head":{"label":"noirbizarre:complete-csvs","ref":"complete-csvs","sha":"cf4e014ec6286867083f1b96f8198ba17b03cd24","user":{"login":"noirbizarre","id":15725,"avatar_url":"https://avatars.githubusercontent.com/u/15725?v=3","gravatar_id":"","url":"https://api.github.com/users/noirbizarre","html_url":"https://github.com/noirbizarre","followers_url":"https://api.github.com/users/noirbizarre/followers","following_url":"https://api.github.com/users/noirbizarre/following{/other_user}","gists_url":"https://api.github.com/users/noirbizarre/gists{/gist_id}","starred_url":"https://api.github.com/users/noirbizarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noirbizarre/subscriptions","organizations_url":"https://api.github.com/users/noirbizarre/orgs","repos_url":"https://api.github.com/users/noirbizarre/repos","events_url":"https://api.github.com/users/noirbizarre/events{/privacy}","received_events_url":"https://api.github.com/users/noirbizarre/received_events","type":"User","site_admin":false},"repo":{"id":45184052,"name":"udata","full_name":"noirbizarre/udata","owner":{"login":"noirbizarre","id":15725,"avatar_url":"https://avatars.githubusercontent.com/u/15725?v=3","gravatar_id":"","url":"https://api.github.com/users/noirbizarre","html_url":"https://github.com/noirbizarre","followers_url":"https://api.github.com/users/noirbizarre/followers","following_url":"https://api.github.com/users/noirbizarre/following{/other_user}","gists_url":"https://api.github.com/users/noirbizarre/gists{/gist_id}","starred_url":"https://api.github.com/users/noirbizarre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noirbizarre/subscriptions","organizations_url":"https://api.github.com/users/noirbizarre/orgs","repos_url":"https://api.github.com/users/noirbizarre/repos","events_url":"https://api.github.com/users/noirbizarre/events{/privacy}","received_events_url":"https://api.github.com/users/noirbizarre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noirbizarre/udata","description":"Social data platform","fork":true,"url":"https://api.github.com/repos/noirbizarre/udata","forks_url":"https://api.github.com/repos/noirbizarre/udata/forks","keys_url":"https://api.github.com/repos/noirbizarre/udata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noirbizarre/udata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noirbizarre/udata/teams","hooks_url":"https://api.github.com/repos/noirbizarre/udata/hooks","issue_events_url":"https://api.github.com/repos/noirbizarre/udata/issues/events{/number}","events_url":"https://api.github.com/repos/noirbizarre/udata/events","assignees_url":"https://api.github.com/repos/noirbizarre/udata/assignees{/user}","branches_url":"https://api.github.com/repos/noirbizarre/udata/branches{/branch}","tags_url":"https://api.github.com/repos/noirbizarre/udata/tags","blobs_url":"https://api.github.com/repos/noirbizarre/udata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noirbizarre/udata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noirbizarre/udata/git/refs{/sha}","trees_url":"https://api.github.com/repos/noirbizarre/udata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noirbizarre/udata/statuses/{sha}","languages_url":"https://api.github.com/repos/noirbizarre/udata/languages","stargazers_url":"https://api.github.com/repos/noirbizarre/udata/stargazers","contributors_url":"https://api.github.com/repos/noirbizarre/udata/contributors","subscribers_url":"https://api.github.com/repos/noirbizarre/udata/subscribers","subscription_url":"https://api.github.com/repos/noirbizarre/udata/subscription","commits_url":"https://api.github.com/repos/noirbizarre/udata/commits{/sha}","git_commits_url":"https://api.github.com/repos/noirbizarre/udata/git/commits{/sha}","comments_url":"https://api.github.com/repos/noirbizarre/udata/comments{/number}","issue_comment_url":"https://api.github.com/repos/noirbizarre/udata/issues/comments{/number}","contents_url":"https://api.github.com/repos/noirbizarre/udata/contents/{+path}","compare_url":"https://api.github.com/repos/noirbizarre/udata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noirbizarre/udata/merges","archive_url":"https://api.github.com/repos/noirbizarre/udata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noirbizarre/udata/downloads","issues_url":"https://api.github.com/repos/noirbizarre/udata/issues{/number}","pulls_url":"https://api.github.com/repos/noirbizarre/udata/pulls{/number}","milestones_url":"https://api.github.com/repos/noirbizarre/udata/milestones{/number}","notifications_url":"https://api.github.com/repos/noirbizarre/udata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noirbizarre/udata/labels{/name}","releases_url":"https://api.github.com/repos/noirbizarre/udata/releases{/id}","created_at":"2015-10-29T13:15:39Z","updated_at":"2015-10-29T13:15:41Z","pushed_at":"2015-11-24T15:39:29Z","git_url":"git://github.com/noirbizarre/udata.git","ssh_url":"git@github.com:noirbizarre/udata.git","clone_url":"https://github.com/noirbizarre/udata.git","svn_url":"https://github.com/noirbizarre/udata","homepage":null,"size":4775,"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":"etalab:master","ref":"master","sha":"80610b53a3c181904df5502eb0d9afdaab0069df","user":{"login":"etalab","id":5313610,"avatar_url":"https://avatars.githubusercontent.com/u/5313610?v=3","gravatar_id":"","url":"https://api.github.com/users/etalab","html_url":"https://github.com/etalab","followers_url":"https://api.github.com/users/etalab/followers","following_url":"https://api.github.com/users/etalab/following{/other_user}","gists_url":"https://api.github.com/users/etalab/gists{/gist_id}","starred_url":"https://api.github.com/users/etalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etalab/subscriptions","organizations_url":"https://api.github.com/users/etalab/orgs","repos_url":"https://api.github.com/users/etalab/repos","events_url":"https://api.github.com/users/etalab/events{/privacy}","received_events_url":"https://api.github.com/users/etalab/received_events","type":"Organization","site_admin":false},"repo":{"id":19141754,"name":"udata","full_name":"etalab/udata","owner":{"login":"etalab","id":5313610,"avatar_url":"https://avatars.githubusercontent.com/u/5313610?v=3","gravatar_id":"","url":"https://api.github.com/users/etalab","html_url":"https://github.com/etalab","followers_url":"https://api.github.com/users/etalab/followers","following_url":"https://api.github.com/users/etalab/following{/other_user}","gists_url":"https://api.github.com/users/etalab/gists{/gist_id}","starred_url":"https://api.github.com/users/etalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/etalab/subscriptions","organizations_url":"https://api.github.com/users/etalab/orgs","repos_url":"https://api.github.com/users/etalab/repos","events_url":"https://api.github.com/users/etalab/events{/privacy}","received_events_url":"https://api.github.com/users/etalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/etalab/udata","description":"Social data platform","fork":false,"url":"https://api.github.com/repos/etalab/udata","forks_url":"https://api.github.com/repos/etalab/udata/forks","keys_url":"https://api.github.com/repos/etalab/udata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/etalab/udata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/etalab/udata/teams","hooks_url":"https://api.github.com/repos/etalab/udata/hooks","issue_events_url":"https://api.github.com/repos/etalab/udata/issues/events{/number}","events_url":"https://api.github.com/repos/etalab/udata/events","assignees_url":"https://api.github.com/repos/etalab/udata/assignees{/user}","branches_url":"https://api.github.com/repos/etalab/udata/branches{/branch}","tags_url":"https://api.github.com/repos/etalab/udata/tags","blobs_url":"https://api.github.com/repos/etalab/udata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/etalab/udata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/etalab/udata/git/refs{/sha}","trees_url":"https://api.github.com/repos/etalab/udata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/etalab/udata/statuses/{sha}","languages_url":"https://api.github.com/repos/etalab/udata/languages","stargazers_url":"https://api.github.com/repos/etalab/udata/stargazers","contributors_url":"https://api.github.com/repos/etalab/udata/contributors","subscribers_url":"https://api.github.com/repos/etalab/udata/subscribers","subscription_url":"https://api.github.com/repos/etalab/udata/subscription","commits_url":"https://api.github.com/repos/etalab/udata/commits{/sha}","git_commits_url":"https://api.github.com/repos/etalab/udata/git/commits{/sha}","comments_url":"https://api.github.com/repos/etalab/udata/comments{/number}","issue_comment_url":"https://api.github.com/repos/etalab/udata/issues/comments{/number}","contents_url":"https://api.github.com/repos/etalab/udata/contents/{+path}","compare_url":"https://api.github.com/repos/etalab/udata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/etalab/udata/merges","archive_url":"https://api.github.com/repos/etalab/udata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/etalab/udata/downloads","issues_url":"https://api.github.com/repos/etalab/udata/issues{/number}","pulls_url":"https://api.github.com/repos/etalab/udata/pulls{/number}","milestones_url":"https://api.github.com/repos/etalab/udata/milestones{/number}","notifications_url":"https://api.github.com/repos/etalab/udata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/etalab/udata/labels{/name}","releases_url":"https://api.github.com/repos/etalab/udata/releases{/id}","created_at":"2014-04-25T09:57:34Z","updated_at":"2015-11-12T16:59:30Z","pushed_at":"2015-11-24T15:39:30Z","git_url":"git://github.com/etalab/udata.git","ssh_url":"git@github.com:etalab/udata.git","clone_url":"https://github.com/etalab/udata.git","svn_url":"https://github.com/etalab/udata","homepage":null,"size":4879,"stargazers_count":18,"watchers_count":18,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":18,"forks":11,"open_issues":18,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/etalab/udata/pulls/269"},"html":{"href":"https://github.com/etalab/udata/pull/269"},"issue":{"href":"https://api.github.com/repos/etalab/udata/issues/269"},"comments":{"href":"https://api.github.com/repos/etalab/udata/issues/269/comments"},"review_comments":{"href":"https://api.github.com/repos/etalab/udata/pulls/269/comments"},"review_comment":{"href":"https://api.github.com/repos/etalab/udata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/etalab/udata/pulls/269/commits"},"statuses":{"href":"https://api.github.com/repos/etalab/udata/statuses/cf4e014ec6286867083f1b96f8198ba17b03cd24"}}}}