{"action":"created","comment":{"url":"https://api.github.com/repos/Candihub/pixel/pulls/comments/172060364","pull_request_review_id":101015460,"id":172060364,"diff_hunk":"@@ -26,11 +26,94 @@ def get(self, request, *args, **kwargs):\n                 ' GROUP BY core_species.name'\n             ))\n \n+            pixels_by_OmicsUnitType = Pixel.objects.raw((\n+                'SELECT core_OmicsUnitType.name AS name, count(*) AS nb,'\n+                ' 1 as id'  # this is a hack to overcome Django ORM limitations\n+                ' FROM core_pixel'\n+                ' JOIN core_omicsunit'\n+                '   ON omics_unit_id = core_omicsunit.id'\n+                ' JOIN core_OmicsUnitType'\n+                '   ON core_omicsunit.type_id = core_OmicsUnitType.id'\n+                ' GROUP BY core_OmicsUnitType.name'\n+            ))\n+\n+            pixels_by_OmicsArea = Pixel.objects.raw((\n+                'SELECT core_OmicsArea.name AS name, count(*) AS nb,'\n+                ' 1 as id'  # this is a hack to overcome Django ORM limitations\n+                ' FROM core_pixel'\n+                ' JOIN core_PixelSet'\n+                '   ON pixel_set_id = core_PixelSet.id'\n+                ' JOIN core_Analysis'\n+                '   ON core_PixelSet.analysis_id = core_Analysis.id'\n+                ' JOIN core_analysis_experiments'\n+                '   ON core_Analysis.id = '\n+                '   core_analysis_experiments.analysis_id'\n+                ' JOIN core_Experiment'\n+                '   ON core_analysis_experiments. experiment_id = '\n+                '   core_Experiment.id'\n+                ' JOIN core_OmicsArea'\n+                '   ON core_Experiment.omics_area_id = core_OmicsArea.id'\n+                ' where core_OmicsArea.level = 0'\n+                ' GROUP BY core_OmicsArea.name'\n+            ))\n+\n+            saved_analysis = Pixel.objects.raw((\n+                \"Select to_char(saved_at, 'YYYY,MM,DD') AS date,\"\n+                \" count(*) AS nb,\"\n+                \" 1 as id\"\n+                \" FROM core_analysis\"\n+                \" GROUP BY date;\"\n+            ))\n+\n+            pixelers_infos = Pixel.objects.raw((\n+                \"Select first_name, last_name, email,\"\n+                \" to_char(date_joined, 'YYYY-MM-DD') as date, 1 as id\"\n+                \" from core_pixeler\"\n+                \" order by last_name;\"\n+            ))\n+\n+            tags_infos = Pixel.objects.raw((","path":"apps/core/views.py","position":50,"original_position":50,"commit_id":"afad1a1612f4ed3ccb1e6ef1f4b18e86b425b886","original_commit_id":"afad1a1612f4ed3ccb1e6ef1f4b18e86b425b886","user":{"login":"willdurand","id":217628,"avatar_url":"https://avatars0.githubusercontent.com/u/217628?v=4","gravatar_id":"","url":"https://api.github.com/users/willdurand","html_url":"https://github.com/willdurand","followers_url":"https://api.github.com/users/willdurand/followers","following_url":"https://api.github.com/users/willdurand/following{/other_user}","gists_url":"https://api.github.com/users/willdurand/gists{/gist_id}","starred_url":"https://api.github.com/users/willdurand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willdurand/subscriptions","organizations_url":"https://api.github.com/users/willdurand/orgs","repos_url":"https://api.github.com/users/willdurand/repos","events_url":"https://api.github.com/users/willdurand/events{/privacy}","received_events_url":"https://api.github.com/users/willdurand/received_events","type":"User","site_admin":false},"body":"I think this could be done in Python with the Django ORM.","created_at":"2018-03-04T19:13:38Z","updated_at":"2018-03-04T19:15:16Z","html_url":"https://github.com/Candihub/pixel/pull/267#discussion_r172060364","pull_request_url":"https://api.github.com/repos/Candihub/pixel/pulls/267","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Candihub/pixel/pulls/comments/172060364"},"html":{"href":"https://github.com/Candihub/pixel/pull/267#discussion_r172060364"},"pull_request":{"href":"https://api.github.com/repos/Candihub/pixel/pulls/267"}}},"pull_request":{"url":"https://api.github.com/repos/Candihub/pixel/pulls/267","id":172255656,"html_url":"https://github.com/Candihub/pixel/pull/267","diff_url":"https://github.com/Candihub/pixel/pull/267.diff","patch_url":"https://github.com/Candihub/pixel/pull/267.patch","issue_url":"https://api.github.com/repos/Candihub/pixel/issues/267","number":267,"state":"open","locked":false,"title":"New charts in homepage","user":{"login":"thomasdenecker","id":21334113,"avatar_url":"https://avatars2.githubusercontent.com/u/21334113?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasdenecker","html_url":"https://github.com/thomasdenecker","followers_url":"https://api.github.com/users/thomasdenecker/followers","following_url":"https://api.github.com/users/thomasdenecker/following{/other_user}","gists_url":"https://api.github.com/users/thomasdenecker/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasdenecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasdenecker/subscriptions","organizations_url":"https://api.github.com/users/thomasdenecker/orgs","repos_url":"https://api.github.com/users/thomasdenecker/repos","events_url":"https://api.github.com/users/thomasdenecker/events{/privacy}","received_events_url":"https://api.github.com/users/thomasdenecker/received_events","type":"User","site_admin":false},"body":"- [X] Add news charts in homepage\r\n- [X] Add an architecture to this page\r\n- [X] Realize an adaptive home page","created_at":"2018-03-01T14:43:25Z","updated_at":"2018-03-04T19:15:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87e6c8ee6767766eb829745690766d2ca657c11c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":708569808,"url":"https://api.github.com/repos/Candihub/pixel/labels/improvement","name":"improvement","color":"9900ff","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Candihub/pixel/pulls/267/commits","review_comments_url":"https://api.github.com/repos/Candihub/pixel/pulls/267/comments","review_comment_url":"https://api.github.com/repos/Candihub/pixel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Candihub/pixel/issues/267/comments","statuses_url":"https://api.github.com/repos/Candihub/pixel/statuses/afad1a1612f4ed3ccb1e6ef1f4b18e86b425b886","head":{"label":"Candihub:new_charts_homepage","ref":"new_charts_homepage","sha":"afad1a1612f4ed3ccb1e6ef1f4b18e86b425b886","user":{"login":"Candihub","id":32354284,"avatar_url":"https://avatars3.githubusercontent.com/u/32354284?v=4","gravatar_id":"","url":"https://api.github.com/users/Candihub","html_url":"https://github.com/Candihub","followers_url":"https://api.github.com/users/Candihub/followers","following_url":"https://api.github.com/users/Candihub/following{/other_user}","gists_url":"https://api.github.com/users/Candihub/gists{/gist_id}","starred_url":"https://api.github.com/users/Candihub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Candihub/subscriptions","organizations_url":"https://api.github.com/users/Candihub/orgs","repos_url":"https://api.github.com/users/Candihub/repos","events_url":"https://api.github.com/users/Candihub/events{/privacy}","received_events_url":"https://api.github.com/users/Candihub/received_events","type":"Organization","site_admin":false},"repo":{"id":105243843,"name":"pixel","full_name":"Candihub/pixel","owner":{"login":"Candihub","id":32354284,"avatar_url":"https://avatars3.githubusercontent.com/u/32354284?v=4","gravatar_id":"","url":"https://api.github.com/users/Candihub","html_url":"https://github.com/Candihub","followers_url":"https://api.github.com/users/Candihub/followers","following_url":"https://api.github.com/users/Candihub/following{/other_user}","gists_url":"https://api.github.com/users/Candihub/gists{/gist_id}","starred_url":"https://api.github.com/users/Candihub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Candihub/subscriptions","organizations_url":"https://api.github.com/users/Candihub/orgs","repos_url":"https://api.github.com/users/Candihub/repos","events_url":"https://api.github.com/users/Candihub/events{/privacy}","received_events_url":"https://api.github.com/users/Candihub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Candihub/pixel","description":"Integration of smart 'omics' data :green_book: :bulb:","fork":false,"url":"https://api.github.com/repos/Candihub/pixel","forks_url":"https://api.github.com/repos/Candihub/pixel/forks","keys_url":"https://api.github.com/repos/Candihub/pixel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Candihub/pixel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Candihub/pixel/teams","hooks_url":"https://api.github.com/repos/Candihub/pixel/hooks","issue_events_url":"https://api.github.com/repos/Candihub/pixel/issues/events{/number}","events_url":"https://api.github.com/repos/Candihub/pixel/events","assignees_url":"https://api.github.com/repos/Candihub/pixel/assignees{/user}","branches_url":"https://api.github.com/repos/Candihub/pixel/branches{/branch}","tags_url":"https://api.github.com/repos/Candihub/pixel/tags","blobs_url":"https://api.github.com/repos/Candihub/pixel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Candihub/pixel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Candihub/pixel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Candihub/pixel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Candihub/pixel/statuses/{sha}","languages_url":"https://api.github.com/repos/Candihub/pixel/languages","stargazers_url":"https://api.github.com/repos/Candihub/pixel/stargazers","contributors_url":"https://api.github.com/repos/Candihub/pixel/contributors","subscribers_url":"https://api.github.com/repos/Candihub/pixel/subscribers","subscription_url":"https://api.github.com/repos/Candihub/pixel/subscription","commits_url":"https://api.github.com/repos/Candihub/pixel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Candihub/pixel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Candihub/pixel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Candihub/pixel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Candihub/pixel/contents/{+path}","compare_url":"https://api.github.com/repos/Candihub/pixel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Candihub/pixel/merges","archive_url":"https://api.github.com/repos/Candihub/pixel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Candihub/pixel/downloads","issues_url":"https://api.github.com/repos/Candihub/pixel/issues{/number}","pulls_url":"https://api.github.com/repos/Candihub/pixel/pulls{/number}","milestones_url":"https://api.github.com/repos/Candihub/pixel/milestones{/number}","notifications_url":"https://api.github.com/repos/Candihub/pixel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Candihub/pixel/labels{/name}","releases_url":"https://api.github.com/repos/Candihub/pixel/releases{/id}","deployments_url":"https://api.github.com/repos/Candihub/pixel/deployments","created_at":"2017-09-29T07:37:01Z","updated_at":"2018-01-29T14:26:06Z","pushed_at":"2018-03-02T16:04:19Z","git_url":"git://github.com/Candihub/pixel.git","ssh_url":"git@github.com:Candihub/pixel.git","clone_url":"https://github.com/Candihub/pixel.git","svn_url":"https://github.com/Candihub/pixel","homepage":"","size":6503,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":1,"open_issues":18,"watchers":3,"default_branch":"master"}},"base":{"label":"Candihub:master","ref":"master","sha":"eb805087a893b8d8edc8f58e4fc8d03142210988","user":{"login":"Candihub","id":32354284,"avatar_url":"https://avatars3.githubusercontent.com/u/32354284?v=4","gravatar_id":"","url":"https://api.github.com/users/Candihub","html_url":"https://github.com/Candihub","followers_url":"https://api.github.com/users/Candihub/followers","following_url":"https://api.github.com/users/Candihub/following{/other_user}","gists_url":"https://api.github.com/users/Candihub/gists{/gist_id}","starred_url":"https://api.github.com/users/Candihub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Candihub/subscriptions","organizations_url":"https://api.github.com/users/Candihub/orgs","repos_url":"https://api.github.com/users/Candihub/repos","events_url":"https://api.github.com/users/Candihub/events{/privacy}","received_events_url":"https://api.github.com/users/Candihub/received_events","type":"Organization","site_admin":false},"repo":{"id":105243843,"name":"pixel","full_name":"Candihub/pixel","owner":{"login":"Candihub","id":32354284,"avatar_url":"https://avatars3.githubusercontent.com/u/32354284?v=4","gravatar_id":"","url":"https://api.github.com/users/Candihub","html_url":"https://github.com/Candihub","followers_url":"https://api.github.com/users/Candihub/followers","following_url":"https://api.github.com/users/Candihub/following{/other_user}","gists_url":"https://api.github.com/users/Candihub/gists{/gist_id}","starred_url":"https://api.github.com/users/Candihub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Candihub/subscriptions","organizations_url":"https://api.github.com/users/Candihub/orgs","repos_url":"https://api.github.com/users/Candihub/repos","events_url":"https://api.github.com/users/Candihub/events{/privacy}","received_events_url":"https://api.github.com/users/Candihub/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Candihub/pixel","description":"Integration of smart 'omics' data :green_book: :bulb:","fork":false,"url":"https://api.github.com/repos/Candihub/pixel","forks_url":"https://api.github.com/repos/Candihub/pixel/forks","keys_url":"https://api.github.com/repos/Candihub/pixel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Candihub/pixel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Candihub/pixel/teams","hooks_url":"https://api.github.com/repos/Candihub/pixel/hooks","issue_events_url":"https://api.github.com/repos/Candihub/pixel/issues/events{/number}","events_url":"https://api.github.com/repos/Candihub/pixel/events","assignees_url":"https://api.github.com/repos/Candihub/pixel/assignees{/user}","branches_url":"https://api.github.com/repos/Candihub/pixel/branches{/branch}","tags_url":"https://api.github.com/repos/Candihub/pixel/tags","blobs_url":"https://api.github.com/repos/Candihub/pixel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Candihub/pixel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Candihub/pixel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Candihub/pixel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Candihub/pixel/statuses/{sha}","languages_url":"https://api.github.com/repos/Candihub/pixel/languages","stargazers_url":"https://api.github.com/repos/Candihub/pixel/stargazers","contributors_url":"https://api.github.com/repos/Candihub/pixel/contributors","subscribers_url":"https://api.github.com/repos/Candihub/pixel/subscribers","subscription_url":"https://api.github.com/repos/Candihub/pixel/subscription","commits_url":"https://api.github.com/repos/Candihub/pixel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Candihub/pixel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Candihub/pixel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Candihub/pixel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Candihub/pixel/contents/{+path}","compare_url":"https://api.github.com/repos/Candihub/pixel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Candihub/pixel/merges","archive_url":"https://api.github.com/repos/Candihub/pixel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Candihub/pixel/downloads","issues_url":"https://api.github.com/repos/Candihub/pixel/issues{/number}","pulls_url":"https://api.github.com/repos/Candihub/pixel/pulls{/number}","milestones_url":"https://api.github.com/repos/Candihub/pixel/milestones{/number}","notifications_url":"https://api.github.com/repos/Candihub/pixel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Candihub/pixel/labels{/name}","releases_url":"https://api.github.com/repos/Candihub/pixel/releases{/id}","deployments_url":"https://api.github.com/repos/Candihub/pixel/deployments","created_at":"2017-09-29T07:37:01Z","updated_at":"2018-01-29T14:26:06Z","pushed_at":"2018-03-02T16:04:19Z","git_url":"git://github.com/Candihub/pixel.git","ssh_url":"git@github.com:Candihub/pixel.git","clone_url":"https://github.com/Candihub/pixel.git","svn_url":"https://github.com/Candihub/pixel","homepage":"","size":6503,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":1,"open_issues":18,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Candihub/pixel/pulls/267"},"html":{"href":"https://github.com/Candihub/pixel/pull/267"},"issue":{"href":"https://api.github.com/repos/Candihub/pixel/issues/267"},"comments":{"href":"https://api.github.com/repos/Candihub/pixel/issues/267/comments"},"review_comments":{"href":"https://api.github.com/repos/Candihub/pixel/pulls/267/comments"},"review_comment":{"href":"https://api.github.com/repos/Candihub/pixel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Candihub/pixel/pulls/267/commits"},"statuses":{"href":"https://api.github.com/repos/Candihub/pixel/statuses/afad1a1612f4ed3ccb1e6ef1f4b18e86b425b886"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"willdurand"}}