{"action":"opened","number":343,"pull_request":{"url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/343","id":45186138,"html_url":"https://github.com/openfisca/openfisca-core/pull/343","diff_url":"https://github.com/openfisca/openfisca-core/pull/343.diff","patch_url":"https://github.com/openfisca/openfisca-core/pull/343.patch","issue_url":"https://api.github.com/repos/openfisca/openfisca-core/issues/343","number":343,"state":"open","locked":false,"title":"Introduce reference periods","user":{"login":"fpagnoux","id":11834997,"avatar_url":"https://avatars.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":"Introduce some reference periods in openfisca_core/periods.py in order to simplify period uses in formula.\r\n\r\nEg : \r\n\r\nBefore : \r\n```python\r\n        period = period.start.offset('first-of', 'month').period('month')\r\n        two_years_ago = period.start.offset('first-of', 'year').period('year').offset(-2)\r\n        last_month = period.start.period('month').offset(-1)\r\n```\r\nAfter :\r\n```python\r\n        period = period.this_month\r\n        two_years_ago = period.n_2\r\n        last_month = period.last_month\r\n```","created_at":"2015-09-16T15:26:27Z","updated_at":"2015-09-16T15:26:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/343/commits","review_comments_url":"https://api.github.com/repos/openfisca/openfisca-core/pulls/343/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/343/comments","statuses_url":"https://api.github.com/repos/openfisca/openfisca-core/statuses/cca60265b5796b31f662b3949b22eaf1b22ea0b7","head":{"label":"openfisca:introduce-reference-periods","ref":"introduce-reference-periods","sha":"cca60265b5796b31f662b3949b22eaf1b22ea0b7","user":{"login":"openfisca","id":1794404,"avatar_url":"https://avatars.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://avatars.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":"Core module of OpenFisca, with neither GUI 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}","created_at":"2013-12-29T15:17:04Z","updated_at":"2015-06-27T14:40:41Z","pushed_at":"2015-09-16T15:22:14Z","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":null,"size":6955,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":37,"forks":32,"open_issues":37,"watchers":7,"default_branch":"master"}},"base":{"label":"openfisca:next","ref":"next","sha":"7083fc26d330e475bc6c841633880f582910a1a2","user":{"login":"openfisca","id":1794404,"avatar_url":"https://avatars.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://avatars.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":"Core module of OpenFisca, with neither GUI 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}","created_at":"2013-12-29T15:17:04Z","updated_at":"2015-06-27T14:40:41Z","pushed_at":"2015-09-16T15:22:14Z","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":null,"size":6955,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":37,"forks":32,"open_issues":37,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfisca/openfisca-core/pulls/343"},"html":{"href":"https://github.com/openfisca/openfisca-core/pull/343"},"issue":{"href":"https://api.github.com/repos/openfisca/openfisca-core/issues/343"},"comments":{"href":"https://api.github.com/repos/openfisca/openfisca-core/issues/343/comments"},"review_comments":{"href":"https://api.github.com/repos/openfisca/openfisca-core/pulls/343/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/343/commits"},"statuses":{"href":"https://api.github.com/repos/openfisca/openfisca-core/statuses/cca60265b5796b31f662b3949b22eaf1b22ea0b7"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":23,"deletions":0,"changed_files":1}}