{"action":"created","comment":{"url":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/comments/214896238","pull_request_review_id":152043524,"id":214896238,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDg5NjIzOA==","diff_hunk":"@@ -125,20 +184,21 @@ def project_summary_data(self, row):\n \n         return row\n \n-    def list_projects(self, filter_projects='all', oldest_date='2012-01-01', youngest_date=datetime.datetime.now().strftime(\"%Y-%m-%d\")):\n+    def list_projects(self, filter_projects='all', start_date=(datetime.datetime.now() - relativedelta(years=2)), end_date=datetime.datetime.now().strftime(\"%Y-%m-%d\")):","path":"status/projects.py","position":101,"original_position":101,"commit_id":"c210c803766b532c64bccddd7bfe2e4580e42377","original_commit_id":"c210c803766b532c64bccddd7bfe2e4580e42377","user":{"login":"senthil10","id":5311007,"node_id":"MDQ6VXNlcjUzMTEwMDc=","avatar_url":"https://avatars3.githubusercontent.com/u/5311007?v=4","gravatar_id":"","url":"https://api.github.com/users/senthil10","html_url":"https://github.com/senthil10","followers_url":"https://api.github.com/users/senthil10/followers","following_url":"https://api.github.com/users/senthil10/following{/other_user}","gists_url":"https://api.github.com/users/senthil10/gists{/gist_id}","starred_url":"https://api.github.com/users/senthil10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senthil10/subscriptions","organizations_url":"https://api.github.com/users/senthil10/orgs","repos_url":"https://api.github.com/users/senthil10/repos","events_url":"https://api.github.com/users/senthil10/events{/privacy}","received_events_url":"https://api.github.com/users/senthil10/received_events","type":"User","site_admin":false},"body":"As we discussed when you re-write this function, you could also use the date efficiently by sorting it first before iterating on all the project. Cause then if the \"start_open_date\" is only 2 years till today, then while iterating on sorted list of projects (descending), then you can break the iteration when a projects open_date is less than the \"start_open_date\".\r\n\r\nFor example, in order to get all open projects within 2 years currently it will iterate through all 3220 projects (at the moment). But when you do sort and break, you would have only iterated over 1192 projects (projects open for past two years from today)\r\n\r\n**Note:** This is just a draft suggestion to give you an idea, of course this doesn't cover different scenarios. But when you refactor this function you can implement it in such way that it handles all 👍 ","created_at":"2018-09-04T12:36:10Z","updated_at":"2018-09-04T12:36:11Z","html_url":"https://github.com/SciLifeLab/genomics-status/pull/396#discussion_r214896238","pull_request_url":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/396","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/comments/214896238"},"html":{"href":"https://github.com/SciLifeLab/genomics-status/pull/396#discussion_r214896238"},"pull_request":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/396"}}},"pull_request":{"url":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/396","id":211144098,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMTQ0MDk4","html_url":"https://github.com/SciLifeLab/genomics-status/pull/396","diff_url":"https://github.com/SciLifeLab/genomics-status/pull/396.diff","patch_url":"https://github.com/SciLifeLab/genomics-status/pull/396.patch","issue_url":"https://api.github.com/repos/SciLifeLab/genomics-status/issues/396","number":396,"state":"open","locked":false,"title":"New Projects page and associated changes ","user":{"login":"aanil","id":11080857,"node_id":"MDQ6VXNlcjExMDgwODU3","avatar_url":"https://avatars3.githubusercontent.com/u/11080857?v=4","gravatar_id":"","url":"https://api.github.com/users/aanil","html_url":"https://github.com/aanil","followers_url":"https://api.github.com/users/aanil/followers","following_url":"https://api.github.com/users/aanil/following{/other_user}","gists_url":"https://api.github.com/users/aanil/gists{/gist_id}","starred_url":"https://api.github.com/users/aanil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanil/subscriptions","organizations_url":"https://api.github.com/users/aanil/orgs","repos_url":"https://api.github.com/users/aanil/repos","events_url":"https://api.github.com/users/aanil/events{/privacy}","received_events_url":"https://api.github.com/users/aanil/received_events","type":"User","site_admin":false},"body":"Code for a revamping the old project pages.\r\n\r\n### Highlights\r\n- Merged all the different project pages into one\r\n- Allows multiple selection of project statuses in a single search \r\n- Allows users to save presets\r\n- Settings to load the result table on page load  ","created_at":"2018-08-27T15:24:34Z","updated_at":"2018-09-04T12:36:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0c5448a59237e391bd3d3e26a409b6b925c2c32","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":570125714,"node_id":"MDU6TGFiZWw1NzAxMjU3MTQ=","url":"https://api.github.com/repos/SciLifeLab/genomics-status/labels/WIP","name":"WIP","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/396/commits","review_comments_url":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/396/comments","review_comment_url":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SciLifeLab/genomics-status/issues/396/comments","statuses_url":"https://api.github.com/repos/SciLifeLab/genomics-status/statuses/c210c803766b532c64bccddd7bfe2e4580e42377","head":{"label":"aanil:master","ref":"master","sha":"c210c803766b532c64bccddd7bfe2e4580e42377","user":{"login":"aanil","id":11080857,"node_id":"MDQ6VXNlcjExMDgwODU3","avatar_url":"https://avatars3.githubusercontent.com/u/11080857?v=4","gravatar_id":"","url":"https://api.github.com/users/aanil","html_url":"https://github.com/aanil","followers_url":"https://api.github.com/users/aanil/followers","following_url":"https://api.github.com/users/aanil/following{/other_user}","gists_url":"https://api.github.com/users/aanil/gists{/gist_id}","starred_url":"https://api.github.com/users/aanil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanil/subscriptions","organizations_url":"https://api.github.com/users/aanil/orgs","repos_url":"https://api.github.com/users/aanil/repos","events_url":"https://api.github.com/users/aanil/events{/privacy}","received_events_url":"https://api.github.com/users/aanil/received_events","type":"User","site_admin":false},"repo":{"id":128779999,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg3Nzk5OTk=","name":"genomics-status","full_name":"aanil/genomics-status","owner":{"login":"aanil","id":11080857,"node_id":"MDQ6VXNlcjExMDgwODU3","avatar_url":"https://avatars3.githubusercontent.com/u/11080857?v=4","gravatar_id":"","url":"https://api.github.com/users/aanil","html_url":"https://github.com/aanil","followers_url":"https://api.github.com/users/aanil/followers","following_url":"https://api.github.com/users/aanil/following{/other_user}","gists_url":"https://api.github.com/users/aanil/gists{/gist_id}","starred_url":"https://api.github.com/users/aanil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanil/subscriptions","organizations_url":"https://api.github.com/users/aanil/orgs","repos_url":"https://api.github.com/users/aanil/repos","events_url":"https://api.github.com/users/aanil/events{/privacy}","received_events_url":"https://api.github.com/users/aanil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aanil/genomics-status","description":"Tornado server for tracking samples at NGI Stockholm","fork":true,"url":"https://api.github.com/repos/aanil/genomics-status","forks_url":"https://api.github.com/repos/aanil/genomics-status/forks","keys_url":"https://api.github.com/repos/aanil/genomics-status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aanil/genomics-status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aanil/genomics-status/teams","hooks_url":"https://api.github.com/repos/aanil/genomics-status/hooks","issue_events_url":"https://api.github.com/repos/aanil/genomics-status/issues/events{/number}","events_url":"https://api.github.com/repos/aanil/genomics-status/events","assignees_url":"https://api.github.com/repos/aanil/genomics-status/assignees{/user}","branches_url":"https://api.github.com/repos/aanil/genomics-status/branches{/branch}","tags_url":"https://api.github.com/repos/aanil/genomics-status/tags","blobs_url":"https://api.github.com/repos/aanil/genomics-status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aanil/genomics-status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aanil/genomics-status/git/refs{/sha}","trees_url":"https://api.github.com/repos/aanil/genomics-status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aanil/genomics-status/statuses/{sha}","languages_url":"https://api.github.com/repos/aanil/genomics-status/languages","stargazers_url":"https://api.github.com/repos/aanil/genomics-status/stargazers","contributors_url":"https://api.github.com/repos/aanil/genomics-status/contributors","subscribers_url":"https://api.github.com/repos/aanil/genomics-status/subscribers","subscription_url":"https://api.github.com/repos/aanil/genomics-status/subscription","commits_url":"https://api.github.com/repos/aanil/genomics-status/commits{/sha}","git_commits_url":"https://api.github.com/repos/aanil/genomics-status/git/commits{/sha}","comments_url":"https://api.github.com/repos/aanil/genomics-status/comments{/number}","issue_comment_url":"https://api.github.com/repos/aanil/genomics-status/issues/comments{/number}","contents_url":"https://api.github.com/repos/aanil/genomics-status/contents/{+path}","compare_url":"https://api.github.com/repos/aanil/genomics-status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aanil/genomics-status/merges","archive_url":"https://api.github.com/repos/aanil/genomics-status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aanil/genomics-status/downloads","issues_url":"https://api.github.com/repos/aanil/genomics-status/issues{/number}","pulls_url":"https://api.github.com/repos/aanil/genomics-status/pulls{/number}","milestones_url":"https://api.github.com/repos/aanil/genomics-status/milestones{/number}","notifications_url":"https://api.github.com/repos/aanil/genomics-status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aanil/genomics-status/labels{/name}","releases_url":"https://api.github.com/repos/aanil/genomics-status/releases{/id}","deployments_url":"https://api.github.com/repos/aanil/genomics-status/deployments","created_at":"2018-04-09T13:54:45Z","updated_at":"2018-09-03T11:01:52Z","pushed_at":"2018-09-03T11:01:51Z","git_url":"git://github.com/aanil/genomics-status.git","ssh_url":"git@github.com:aanil/genomics-status.git","clone_url":"https://github.com/aanil/genomics-status.git","svn_url":"https://github.com/aanil/genomics-status","homepage":"https://genomics-status.scilifelab.se","size":4387,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SciLifeLab:master","ref":"master","sha":"01dbe7efd3c3c69bd9e0f479a898710c10e20e76","user":{"login":"SciLifeLab","id":713611,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMzYxMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/713611?v=4","gravatar_id":"","url":"https://api.github.com/users/SciLifeLab","html_url":"https://github.com/SciLifeLab","followers_url":"https://api.github.com/users/SciLifeLab/followers","following_url":"https://api.github.com/users/SciLifeLab/following{/other_user}","gists_url":"https://api.github.com/users/SciLifeLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SciLifeLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SciLifeLab/subscriptions","organizations_url":"https://api.github.com/users/SciLifeLab/orgs","repos_url":"https://api.github.com/users/SciLifeLab/repos","events_url":"https://api.github.com/users/SciLifeLab/events{/privacy}","received_events_url":"https://api.github.com/users/SciLifeLab/received_events","type":"Organization","site_admin":false},"repo":{"id":4652091,"node_id":"MDEwOlJlcG9zaXRvcnk0NjUyMDkx","name":"genomics-status","full_name":"SciLifeLab/genomics-status","owner":{"login":"SciLifeLab","id":713611,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcxMzYxMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/713611?v=4","gravatar_id":"","url":"https://api.github.com/users/SciLifeLab","html_url":"https://github.com/SciLifeLab","followers_url":"https://api.github.com/users/SciLifeLab/followers","following_url":"https://api.github.com/users/SciLifeLab/following{/other_user}","gists_url":"https://api.github.com/users/SciLifeLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SciLifeLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SciLifeLab/subscriptions","organizations_url":"https://api.github.com/users/SciLifeLab/orgs","repos_url":"https://api.github.com/users/SciLifeLab/repos","events_url":"https://api.github.com/users/SciLifeLab/events{/privacy}","received_events_url":"https://api.github.com/users/SciLifeLab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SciLifeLab/genomics-status","description":"Tornado server for tracking samples at NGI Stockholm","fork":true,"url":"https://api.github.com/repos/SciLifeLab/genomics-status","forks_url":"https://api.github.com/repos/SciLifeLab/genomics-status/forks","keys_url":"https://api.github.com/repos/SciLifeLab/genomics-status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SciLifeLab/genomics-status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SciLifeLab/genomics-status/teams","hooks_url":"https://api.github.com/repos/SciLifeLab/genomics-status/hooks","issue_events_url":"https://api.github.com/repos/SciLifeLab/genomics-status/issues/events{/number}","events_url":"https://api.github.com/repos/SciLifeLab/genomics-status/events","assignees_url":"https://api.github.com/repos/SciLifeLab/genomics-status/assignees{/user}","branches_url":"https://api.github.com/repos/SciLifeLab/genomics-status/branches{/branch}","tags_url":"https://api.github.com/repos/SciLifeLab/genomics-status/tags","blobs_url":"https://api.github.com/repos/SciLifeLab/genomics-status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SciLifeLab/genomics-status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SciLifeLab/genomics-status/git/refs{/sha}","trees_url":"https://api.github.com/repos/SciLifeLab/genomics-status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SciLifeLab/genomics-status/statuses/{sha}","languages_url":"https://api.github.com/repos/SciLifeLab/genomics-status/languages","stargazers_url":"https://api.github.com/repos/SciLifeLab/genomics-status/stargazers","contributors_url":"https://api.github.com/repos/SciLifeLab/genomics-status/contributors","subscribers_url":"https://api.github.com/repos/SciLifeLab/genomics-status/subscribers","subscription_url":"https://api.github.com/repos/SciLifeLab/genomics-status/subscription","commits_url":"https://api.github.com/repos/SciLifeLab/genomics-status/commits{/sha}","git_commits_url":"https://api.github.com/repos/SciLifeLab/genomics-status/git/commits{/sha}","comments_url":"https://api.github.com/repos/SciLifeLab/genomics-status/comments{/number}","issue_comment_url":"https://api.github.com/repos/SciLifeLab/genomics-status/issues/comments{/number}","contents_url":"https://api.github.com/repos/SciLifeLab/genomics-status/contents/{+path}","compare_url":"https://api.github.com/repos/SciLifeLab/genomics-status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SciLifeLab/genomics-status/merges","archive_url":"https://api.github.com/repos/SciLifeLab/genomics-status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SciLifeLab/genomics-status/downloads","issues_url":"https://api.github.com/repos/SciLifeLab/genomics-status/issues{/number}","pulls_url":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls{/number}","milestones_url":"https://api.github.com/repos/SciLifeLab/genomics-status/milestones{/number}","notifications_url":"https://api.github.com/repos/SciLifeLab/genomics-status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SciLifeLab/genomics-status/labels{/name}","releases_url":"https://api.github.com/repos/SciLifeLab/genomics-status/releases{/id}","deployments_url":"https://api.github.com/repos/SciLifeLab/genomics-status/deployments","created_at":"2012-06-13T14:39:29Z","updated_at":"2018-08-21T15:46:21Z","pushed_at":"2018-09-03T11:01:52Z","git_url":"git://github.com/SciLifeLab/genomics-status.git","ssh_url":"git@github.com:SciLifeLab/genomics-status.git","clone_url":"https://github.com/SciLifeLab/genomics-status.git","svn_url":"https://github.com/SciLifeLab/genomics-status","homepage":"https://genomics-status.scilifelab.se","size":4299,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":15,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/396"},"html":{"href":"https://github.com/SciLifeLab/genomics-status/pull/396"},"issue":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/issues/396"},"comments":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/issues/396/comments"},"review_comments":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/396/comments"},"review_comment":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/pulls/396/commits"},"statuses":{"href":"https://api.github.com/repos/SciLifeLab/genomics-status/statuses/c210c803766b532c64bccddd7bfe2e4580e42377"}},"author_association":"NONE"}}
{"actor":{"display_login":"senthil10"}}