{"action":"created","comment":{"url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/comments/112280253","pull_request_review_id":33582930,"id":112280253,"diff_hunk":"@@ -126,58 +126,43 @@ def build_node(node, path_index):\n \n \n def update_items(items, start, stop, value):\n-    def is_contained_in(inner, outer):\n-        '''Returns True if `inner` is contained in `outer`.'''\n-        return inner['start'] >= outer['start'] and (\n-            outer.get('stop') is None or inner.get('stop') is not None and inner['stop'] <= outer['stop']\n-            )\n-    items = sorted(items, key=lambda item: item['start'])\n-    new_item = create_item(start, stop, value)\n-    split_items = list(split_item_containing_instant(start, items))\n-    if stop is not None:\n-        split_items = list(split_item_containing_instant(stop.offset(+1, 'day'), split_items))\n-    not_contained_items = list(filter(lambda item: not is_contained_in(item, new_item), split_items))\n-    if not_contained_items and not_contained_items[-1].get('stop') is None \\\n-            and str(start) > not_contained_items[-1]['start']:\n-        last_not_contained_item = not_contained_items[-1].copy()  # Copy to avoid modifying `items` argument.\n-        last_not_contained_item['stop'] = str(start.offset(-1, 'day'))\n-        not_contained_items[-1] = last_not_contained_item\n-    new_items = sorted(not_contained_items + [new_item], key=lambda item: item['start'])\n-    return new_items\n-\n-\n-def create_item(start, stop, value):\n-    dict_items = []\n-    if start is not None:\n-        dict_items.append(('start', str(start)))\n-    if stop is not None:\n-        dict_items.append(('stop', str(stop)))\n-    dict_items.append(('value', value))\n-    return collections.OrderedDict(dict_items)\n-\n-\n-def split_item_containing_instant(instant, items):","path":"openfisca_core/reforms.py","position":43,"original_position":43,"commit_id":"ef228175745ae6799fb5e998374921be54965890","original_commit_id":"ef228175745ae6799fb5e998374921be54965890","user":{"login":"fpagnoux","id":11834997,"avatar_url":"https://avatars0.githubusercontent.com/u/11834997?v=3","gravatar_id":"","url":"https://api.github.com/users/fpagnoux","html_url":"https://github.com/fpagnoux","followers_url":"https://api.github.com/users/fpagnoux/followers","following_url":"https://api.github.com/users/fpagnoux/following{/other_user}","gists_url":"https://api.github.com/users/fpagnoux/gists{/gist_id}","starred_url":"https://api.github.com/users/fpagnoux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fpagnoux/subscriptions","organizations_url":"https://api.github.com/users/fpagnoux/orgs","repos_url":"https://api.github.com/users/fpagnoux/repos","events_url":"https://api.github.com/users/fpagnoux/events{/privacy}","received_events_url":"https://api.github.com/users/fpagnoux/received_events","type":"User","site_admin":false},"body":"Same here","created_at":"2017-04-19T18:31:04Z","updated_at":"2017-04-19T18:51:23Z","html_url":"https://github.com/openfisca/openfisca-core/pull/488#discussion_r112280253","pull_request_url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/488","_links":{"self":{"href":"https://api.github.com/repos/openfisca/openfisca-core/pulls/comments/112280253"},"html":{"href":"https://github.com/openfisca/openfisca-core/pull/488#discussion_r112280253"},"pull_request":{"href":"https://api.github.com/repos/openfisca/openfisca-core/pulls/488"}}},"pull_request":{"url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/488","id":115969392,"html_url":"https://github.com/openfisca/openfisca-core/pull/488","diff_url":"https://github.com/openfisca/openfisca-core/pull/488.diff","patch_url":"https://github.com/openfisca/openfisca-core/pull/488.patch","issue_url":"https://api.github.com/repos/openfisca/openfisca-core/issues/488","number":488,"state":"open","locked":false,"title":"Remove fuzzy","user":{"login":"michelbl","id":3307008,"avatar_url":"https://avatars2.githubusercontent.com/u/3307008?v=3","gravatar_id":"","url":"https://api.github.com/users/michelbl","html_url":"https://github.com/michelbl","followers_url":"https://api.github.com/users/michelbl/followers","following_url":"https://api.github.com/users/michelbl/following{/other_user}","gists_url":"https://api.github.com/users/michelbl/gists{/gist_id}","starred_url":"https://api.github.com/users/michelbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michelbl/subscriptions","organizations_url":"https://api.github.com/users/michelbl/orgs","repos_url":"https://api.github.com/users/michelbl/repos","events_url":"https://api.github.com/users/michelbl/events{/privacy}","received_events_url":"https://api.github.com/users/michelbl/received_events","type":"User","site_admin":false},"body":"Connected to #437 ","created_at":"2017-04-14T18:25:02Z","updated_at":"2017-04-19T18:51:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49e93ed9f4df640b12b10319a8b267535bb73e4a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/488/commits","review_comments_url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/488/comments","review_comment_url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfisca/openfisca-core/issues/488/comments","statuses_url":"https://api.github.com/repos/openfisca/openfisca-core/statuses/ef228175745ae6799fb5e998374921be54965890","head":{"label":"openfisca:remove-fuzzy","ref":"remove-fuzzy","sha":"ef228175745ae6799fb5e998374921be54965890","user":{"login":"openfisca","id":1794404,"avatar_url":"https://avatars3.githubusercontent.com/u/1794404?v=3","gravatar_id":"","url":"https://api.github.com/users/openfisca","html_url":"https://github.com/openfisca","followers_url":"https://api.github.com/users/openfisca/followers","following_url":"https://api.github.com/users/openfisca/following{/other_user}","gists_url":"https://api.github.com/users/openfisca/gists{/gist_id}","starred_url":"https://api.github.com/users/openfisca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfisca/subscriptions","organizations_url":"https://api.github.com/users/openfisca/orgs","repos_url":"https://api.github.com/users/openfisca/repos","events_url":"https://api.github.com/users/openfisca/events{/privacy}","received_events_url":"https://api.github.com/users/openfisca/received_events","type":"Organization","site_admin":false},"repo":{"id":15510254,"name":"openfisca-core","full_name":"openfisca/openfisca-core","owner":{"login":"openfisca","id":1794404,"avatar_url":"https://avatars3.githubusercontent.com/u/1794404?v=3","gravatar_id":"","url":"https://api.github.com/users/openfisca","html_url":"https://github.com/openfisca","followers_url":"https://api.github.com/users/openfisca/followers","following_url":"https://api.github.com/users/openfisca/following{/other_user}","gists_url":"https://api.github.com/users/openfisca/gists{/gist_id}","starred_url":"https://api.github.com/users/openfisca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfisca/subscriptions","organizations_url":"https://api.github.com/users/openfisca/orgs","repos_url":"https://api.github.com/users/openfisca/repos","events_url":"https://api.github.com/users/openfisca/events{/privacy}","received_events_url":"https://api.github.com/users/openfisca/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfisca/openfisca-core","description":"OpenFisca core engine, without UI nor countries-specific code & data","fork":false,"url":"https://api.github.com/repos/openfisca/openfisca-core","forks_url":"https://api.github.com/repos/openfisca/openfisca-core/forks","keys_url":"https://api.github.com/repos/openfisca/openfisca-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfisca/openfisca-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfisca/openfisca-core/teams","hooks_url":"https://api.github.com/repos/openfisca/openfisca-core/hooks","issue_events_url":"https://api.github.com/repos/openfisca/openfisca-core/issues/events{/number}","events_url":"https://api.github.com/repos/openfisca/openfisca-core/events","assignees_url":"https://api.github.com/repos/openfisca/openfisca-core/assignees{/user}","branches_url":"https://api.github.com/repos/openfisca/openfisca-core/branches{/branch}","tags_url":"https://api.github.com/repos/openfisca/openfisca-core/tags","blobs_url":"https://api.github.com/repos/openfisca/openfisca-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfisca/openfisca-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfisca/openfisca-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfisca/openfisca-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfisca/openfisca-core/statuses/{sha}","languages_url":"https://api.github.com/repos/openfisca/openfisca-core/languages","stargazers_url":"https://api.github.com/repos/openfisca/openfisca-core/stargazers","contributors_url":"https://api.github.com/repos/openfisca/openfisca-core/contributors","subscribers_url":"https://api.github.com/repos/openfisca/openfisca-core/subscribers","subscription_url":"https://api.github.com/repos/openfisca/openfisca-core/subscription","commits_url":"https://api.github.com/repos/openfisca/openfisca-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfisca/openfisca-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfisca/openfisca-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfisca/openfisca-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfisca/openfisca-core/contents/{+path}","compare_url":"https://api.github.com/repos/openfisca/openfisca-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfisca/openfisca-core/merges","archive_url":"https://api.github.com/repos/openfisca/openfisca-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfisca/openfisca-core/downloads","issues_url":"https://api.github.com/repos/openfisca/openfisca-core/issues{/number}","pulls_url":"https://api.github.com/repos/openfisca/openfisca-core/pulls{/number}","milestones_url":"https://api.github.com/repos/openfisca/openfisca-core/milestones{/number}","notifications_url":"https://api.github.com/repos/openfisca/openfisca-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfisca/openfisca-core/labels{/name}","releases_url":"https://api.github.com/repos/openfisca/openfisca-core/releases{/id}","deployments_url":"https://api.github.com/repos/openfisca/openfisca-core/deployments","created_at":"2013-12-29T15:17:04Z","updated_at":"2017-01-24T14:37:15Z","pushed_at":"2017-04-19T18:27:27Z","git_url":"git://github.com/openfisca/openfisca-core.git","ssh_url":"git@github.com:openfisca/openfisca-core.git","clone_url":"https://github.com/openfisca/openfisca-core.git","svn_url":"https://github.com/openfisca/openfisca-core","homepage":"https://www.openfisca.fr/","size":24964,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":20,"forks":41,"open_issues":20,"watchers":30,"default_branch":"master"}},"base":{"label":"openfisca:master","ref":"master","sha":"f3534e4360b8a292f2cabd860cdc178d850daa56","user":{"login":"openfisca","id":1794404,"avatar_url":"https://avatars3.githubusercontent.com/u/1794404?v=3","gravatar_id":"","url":"https://api.github.com/users/openfisca","html_url":"https://github.com/openfisca","followers_url":"https://api.github.com/users/openfisca/followers","following_url":"https://api.github.com/users/openfisca/following{/other_user}","gists_url":"https://api.github.com/users/openfisca/gists{/gist_id}","starred_url":"https://api.github.com/users/openfisca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfisca/subscriptions","organizations_url":"https://api.github.com/users/openfisca/orgs","repos_url":"https://api.github.com/users/openfisca/repos","events_url":"https://api.github.com/users/openfisca/events{/privacy}","received_events_url":"https://api.github.com/users/openfisca/received_events","type":"Organization","site_admin":false},"repo":{"id":15510254,"name":"openfisca-core","full_name":"openfisca/openfisca-core","owner":{"login":"openfisca","id":1794404,"avatar_url":"https://avatars3.githubusercontent.com/u/1794404?v=3","gravatar_id":"","url":"https://api.github.com/users/openfisca","html_url":"https://github.com/openfisca","followers_url":"https://api.github.com/users/openfisca/followers","following_url":"https://api.github.com/users/openfisca/following{/other_user}","gists_url":"https://api.github.com/users/openfisca/gists{/gist_id}","starred_url":"https://api.github.com/users/openfisca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfisca/subscriptions","organizations_url":"https://api.github.com/users/openfisca/orgs","repos_url":"https://api.github.com/users/openfisca/repos","events_url":"https://api.github.com/users/openfisca/events{/privacy}","received_events_url":"https://api.github.com/users/openfisca/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfisca/openfisca-core","description":"OpenFisca core engine, without UI nor countries-specific code & data","fork":false,"url":"https://api.github.com/repos/openfisca/openfisca-core","forks_url":"https://api.github.com/repos/openfisca/openfisca-core/forks","keys_url":"https://api.github.com/repos/openfisca/openfisca-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfisca/openfisca-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfisca/openfisca-core/teams","hooks_url":"https://api.github.com/repos/openfisca/openfisca-core/hooks","issue_events_url":"https://api.github.com/repos/openfisca/openfisca-core/issues/events{/number}","events_url":"https://api.github.com/repos/openfisca/openfisca-core/events","assignees_url":"https://api.github.com/repos/openfisca/openfisca-core/assignees{/user}","branches_url":"https://api.github.com/repos/openfisca/openfisca-core/branches{/branch}","tags_url":"https://api.github.com/repos/openfisca/openfisca-core/tags","blobs_url":"https://api.github.com/repos/openfisca/openfisca-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfisca/openfisca-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfisca/openfisca-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfisca/openfisca-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfisca/openfisca-core/statuses/{sha}","languages_url":"https://api.github.com/repos/openfisca/openfisca-core/languages","stargazers_url":"https://api.github.com/repos/openfisca/openfisca-core/stargazers","contributors_url":"https://api.github.com/repos/openfisca/openfisca-core/contributors","subscribers_url":"https://api.github.com/repos/openfisca/openfisca-core/subscribers","subscription_url":"https://api.github.com/repos/openfisca/openfisca-core/subscription","commits_url":"https://api.github.com/repos/openfisca/openfisca-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfisca/openfisca-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfisca/openfisca-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfisca/openfisca-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfisca/openfisca-core/contents/{+path}","compare_url":"https://api.github.com/repos/openfisca/openfisca-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfisca/openfisca-core/merges","archive_url":"https://api.github.com/repos/openfisca/openfisca-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfisca/openfisca-core/downloads","issues_url":"https://api.github.com/repos/openfisca/openfisca-core/issues{/number}","pulls_url":"https://api.github.com/repos/openfisca/openfisca-core/pulls{/number}","milestones_url":"https://api.github.com/repos/openfisca/openfisca-core/milestones{/number}","notifications_url":"https://api.github.com/repos/openfisca/openfisca-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfisca/openfisca-core/labels{/name}","releases_url":"https://api.github.com/repos/openfisca/openfisca-core/releases{/id}","deployments_url":"https://api.github.com/repos/openfisca/openfisca-core/deployments","created_at":"2013-12-29T15:17:04Z","updated_at":"2017-01-24T14:37:15Z","pushed_at":"2017-04-19T18:27:27Z","git_url":"git://github.com/openfisca/openfisca-core.git","ssh_url":"git@github.com:openfisca/openfisca-core.git","clone_url":"https://github.com/openfisca/openfisca-core.git","svn_url":"https://github.com/openfisca/openfisca-core","homepage":"https://www.openfisca.fr/","size":24964,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":20,"forks":41,"open_issues":20,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfisca/openfisca-core/pulls/488"},"html":{"href":"https://github.com/openfisca/openfisca-core/pull/488"},"issue":{"href":"https://api.github.com/repos/openfisca/openfisca-core/issues/488"},"comments":{"href":"https://api.github.com/repos/openfisca/openfisca-core/issues/488/comments"},"review_comments":{"href":"https://api.github.com/repos/openfisca/openfisca-core/pulls/488/comments"},"review_comment":{"href":"https://api.github.com/repos/openfisca/openfisca-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfisca/openfisca-core/pulls/488/commits"},"statuses":{"href":"https://api.github.com/repos/openfisca/openfisca-core/statuses/ef228175745ae6799fb5e998374921be54965890"}}}}
{"actor":{"display_login":"fpagnoux"}}