{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/LabPy/lantz_core/pulls/2","id":30006026,"html_url":"https://github.com/LabPy/lantz_core/pull/2","diff_url":"https://github.com/LabPy/lantz_core/pull/2.diff","patch_url":"https://github.com/LabPy/lantz_core/pull/2.patch","issue_url":"https://api.github.com/repos/LabPy/lantz_core/issues/2","number":2,"state":"closed","locked":false,"title":"Feature method composition","user":{"login":"MatthieuDartiailh","id":4481740,"avatar_url":"https://avatars.githubusercontent.com/u/4481740?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthieuDartiailh","html_url":"https://github.com/MatthieuDartiailh","followers_url":"https://api.github.com/users/MatthieuDartiailh/followers","following_url":"https://api.github.com/users/MatthieuDartiailh/following{/other_user}","gists_url":"https://api.github.com/users/MatthieuDartiailh/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthieuDartiailh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthieuDartiailh/subscriptions","organizations_url":"https://api.github.com/users/MatthieuDartiailh/orgs","repos_url":"https://api.github.com/users/MatthieuDartiailh/repos","events_url":"https://api.github.com/users/MatthieuDartiailh/events{/privacy}","received_events_url":"https://api.github.com/users/MatthieuDartiailh/received_events","type":"User","site_admin":false},"body":"I tried to move a bit forward with the implementation of the base Feature class. One thing that was going to be an issue was when we had a lot of things to do at a particular stage as determined by the kwargs. Rebuilding a new function each time would be a mess so I a proposing a composition system. This allows also to decorate specially named method (_post_get, ...) so that they do not override the standard behavior but are rather prepended, appended, or added before or after another operation, this can be quite handy to avoid calling the methods linked to the kwargs by hand. I tried to make it play well with set_feat in the case in which we have some customization using specially named function in some base classes. That part is not pretty but use case for it should be uncommon and strongly discouraged in the docs, I just like the idea that it is possible in some cases.\r\n\r\nThis is not yet tested but I would appreciate some feedback about those ideas.\r\n\r\nWhen reviewing you can focus on the following modules : \r\n- features/features.py\r\n- features/util.py\r\n- has_features.py","created_at":"2015-02-25T17:14:07Z","updated_at":"2015-03-29T15:05:54Z","closed_at":"2015-03-29T15:05:54Z","merged_at":"2015-03-29T15:05:54Z","merge_commit_sha":"172e2d2a94ef933845856696a1982b7509c5b1b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/LabPy/lantz_core/pulls/2/commits","review_comments_url":"https://api.github.com/repos/LabPy/lantz_core/pulls/2/comments","review_comment_url":"https://api.github.com/repos/LabPy/lantz_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LabPy/lantz_core/issues/2/comments","statuses_url":"https://api.github.com/repos/LabPy/lantz_core/statuses/fae2cd681f7b97fdb048069faa097dab94e14e10","head":{"label":"MatthieuDartiailh:feature-compose","ref":"feature-compose","sha":"fae2cd681f7b97fdb048069faa097dab94e14e10","user":{"login":"MatthieuDartiailh","id":4481740,"avatar_url":"https://avatars.githubusercontent.com/u/4481740?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthieuDartiailh","html_url":"https://github.com/MatthieuDartiailh","followers_url":"https://api.github.com/users/MatthieuDartiailh/followers","following_url":"https://api.github.com/users/MatthieuDartiailh/following{/other_user}","gists_url":"https://api.github.com/users/MatthieuDartiailh/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthieuDartiailh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthieuDartiailh/subscriptions","organizations_url":"https://api.github.com/users/MatthieuDartiailh/orgs","repos_url":"https://api.github.com/users/MatthieuDartiailh/repos","events_url":"https://api.github.com/users/MatthieuDartiailh/events{/privacy}","received_events_url":"https://api.github.com/users/MatthieuDartiailh/received_events","type":"User","site_admin":false},"repo":{"id":31136418,"name":"lantz_core","full_name":"MatthieuDartiailh/lantz_core","owner":{"login":"MatthieuDartiailh","id":4481740,"avatar_url":"https://avatars.githubusercontent.com/u/4481740?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthieuDartiailh","html_url":"https://github.com/MatthieuDartiailh","followers_url":"https://api.github.com/users/MatthieuDartiailh/followers","following_url":"https://api.github.com/users/MatthieuDartiailh/following{/other_user}","gists_url":"https://api.github.com/users/MatthieuDartiailh/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthieuDartiailh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthieuDartiailh/subscriptions","organizations_url":"https://api.github.com/users/MatthieuDartiailh/orgs","repos_url":"https://api.github.com/users/MatthieuDartiailh/repos","events_url":"https://api.github.com/users/MatthieuDartiailh/events{/privacy}","received_events_url":"https://api.github.com/users/MatthieuDartiailh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MatthieuDartiailh/lantz_core","description":"","fork":true,"url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core","forks_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/forks","keys_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/teams","hooks_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/hooks","issue_events_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/issues/events{/number}","events_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/events","assignees_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/assignees{/user}","branches_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/branches{/branch}","tags_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/tags","blobs_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/statuses/{sha}","languages_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/languages","stargazers_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/stargazers","contributors_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/contributors","subscribers_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/subscribers","subscription_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/subscription","commits_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/contents/{+path}","compare_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/merges","archive_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/downloads","issues_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/issues{/number}","pulls_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/pulls{/number}","milestones_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/milestones{/number}","notifications_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/labels{/name}","releases_url":"https://api.github.com/repos/MatthieuDartiailh/lantz_core/releases{/id}","created_at":"2015-02-21T18:48:41Z","updated_at":"2015-03-02T06:51:22Z","pushed_at":"2015-03-23T10:05:56Z","git_url":"git://github.com/MatthieuDartiailh/lantz_core.git","ssh_url":"git@github.com:MatthieuDartiailh/lantz_core.git","clone_url":"https://github.com/MatthieuDartiailh/lantz_core.git","svn_url":"https://github.com/MatthieuDartiailh/lantz_core","homepage":null,"size":244,"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":"LabPy:master","ref":"master","sha":"07c6ad4bf4846399ad7591b681052d36249a6a65","user":{"login":"LabPy","id":10745958,"avatar_url":"https://avatars.githubusercontent.com/u/10745958?v=3","gravatar_id":"","url":"https://api.github.com/users/LabPy","html_url":"https://github.com/LabPy","followers_url":"https://api.github.com/users/LabPy/followers","following_url":"https://api.github.com/users/LabPy/following{/other_user}","gists_url":"https://api.github.com/users/LabPy/gists{/gist_id}","starred_url":"https://api.github.com/users/LabPy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LabPy/subscriptions","organizations_url":"https://api.github.com/users/LabPy/orgs","repos_url":"https://api.github.com/users/LabPy/repos","events_url":"https://api.github.com/users/LabPy/events{/privacy}","received_events_url":"https://api.github.com/users/LabPy/received_events","type":"Organization","site_admin":false},"repo":{"id":31136382,"name":"lantz_core","full_name":"LabPy/lantz_core","owner":{"login":"LabPy","id":10745958,"avatar_url":"https://avatars.githubusercontent.com/u/10745958?v=3","gravatar_id":"","url":"https://api.github.com/users/LabPy","html_url":"https://github.com/LabPy","followers_url":"https://api.github.com/users/LabPy/followers","following_url":"https://api.github.com/users/LabPy/following{/other_user}","gists_url":"https://api.github.com/users/LabPy/gists{/gist_id}","starred_url":"https://api.github.com/users/LabPy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LabPy/subscriptions","organizations_url":"https://api.github.com/users/LabPy/orgs","repos_url":"https://api.github.com/users/LabPy/repos","events_url":"https://api.github.com/users/LabPy/events{/privacy}","received_events_url":"https://api.github.com/users/LabPy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LabPy/lantz_core","description":"","fork":false,"url":"https://api.github.com/repos/LabPy/lantz_core","forks_url":"https://api.github.com/repos/LabPy/lantz_core/forks","keys_url":"https://api.github.com/repos/LabPy/lantz_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LabPy/lantz_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LabPy/lantz_core/teams","hooks_url":"https://api.github.com/repos/LabPy/lantz_core/hooks","issue_events_url":"https://api.github.com/repos/LabPy/lantz_core/issues/events{/number}","events_url":"https://api.github.com/repos/LabPy/lantz_core/events","assignees_url":"https://api.github.com/repos/LabPy/lantz_core/assignees{/user}","branches_url":"https://api.github.com/repos/LabPy/lantz_core/branches{/branch}","tags_url":"https://api.github.com/repos/LabPy/lantz_core/tags","blobs_url":"https://api.github.com/repos/LabPy/lantz_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LabPy/lantz_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LabPy/lantz_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/LabPy/lantz_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LabPy/lantz_core/statuses/{sha}","languages_url":"https://api.github.com/repos/LabPy/lantz_core/languages","stargazers_url":"https://api.github.com/repos/LabPy/lantz_core/stargazers","contributors_url":"https://api.github.com/repos/LabPy/lantz_core/contributors","subscribers_url":"https://api.github.com/repos/LabPy/lantz_core/subscribers","subscription_url":"https://api.github.com/repos/LabPy/lantz_core/subscription","commits_url":"https://api.github.com/repos/LabPy/lantz_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/LabPy/lantz_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/LabPy/lantz_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/LabPy/lantz_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/LabPy/lantz_core/contents/{+path}","compare_url":"https://api.github.com/repos/LabPy/lantz_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LabPy/lantz_core/merges","archive_url":"https://api.github.com/repos/LabPy/lantz_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LabPy/lantz_core/downloads","issues_url":"https://api.github.com/repos/LabPy/lantz_core/issues{/number}","pulls_url":"https://api.github.com/repos/LabPy/lantz_core/pulls{/number}","milestones_url":"https://api.github.com/repos/LabPy/lantz_core/milestones{/number}","notifications_url":"https://api.github.com/repos/LabPy/lantz_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LabPy/lantz_core/labels{/name}","releases_url":"https://api.github.com/repos/LabPy/lantz_core/releases{/id}","created_at":"2015-02-21T18:47:30Z","updated_at":"2015-03-01T15:43:10Z","pushed_at":"2015-03-29T15:05:54Z","git_url":"git://github.com/LabPy/lantz_core.git","ssh_url":"git@github.com:LabPy/lantz_core.git","clone_url":"https://github.com/LabPy/lantz_core.git","svn_url":"https://github.com/LabPy/lantz_core","homepage":null,"size":296,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LabPy/lantz_core/pulls/2"},"html":{"href":"https://github.com/LabPy/lantz_core/pull/2"},"issue":{"href":"https://api.github.com/repos/LabPy/lantz_core/issues/2"},"comments":{"href":"https://api.github.com/repos/LabPy/lantz_core/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/LabPy/lantz_core/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/LabPy/lantz_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LabPy/lantz_core/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/LabPy/lantz_core/statuses/fae2cd681f7b97fdb048069faa097dab94e14e10"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"MatthieuDartiailh","id":4481740,"avatar_url":"https://avatars.githubusercontent.com/u/4481740?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthieuDartiailh","html_url":"https://github.com/MatthieuDartiailh","followers_url":"https://api.github.com/users/MatthieuDartiailh/followers","following_url":"https://api.github.com/users/MatthieuDartiailh/following{/other_user}","gists_url":"https://api.github.com/users/MatthieuDartiailh/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthieuDartiailh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthieuDartiailh/subscriptions","organizations_url":"https://api.github.com/users/MatthieuDartiailh/orgs","repos_url":"https://api.github.com/users/MatthieuDartiailh/repos","events_url":"https://api.github.com/users/MatthieuDartiailh/events{/privacy}","received_events_url":"https://api.github.com/users/MatthieuDartiailh/received_events","type":"User","site_admin":false},"comments":10,"review_comments":0,"commits":18,"additions":1160,"deletions":175,"changed_files":11}}