{"action":"created","comment":{"url":"https://api.github.com/repos/pacificclimate/pdp/pulls/comments/86412053","pull_request_review_id":7073194,"id":86412053,"diff_hunk":"@@ -15,6 +15,7 @@\n import yaml\n import static\n from beaker.middleware import SessionMiddleware\n+from git import Repo","path":"pdp/__init__.py","position":4,"original_position":4,"commit_id":"dc362958aaddde4f4aa466f184c2fecc8efe2a47","original_commit_id":"dc362958aaddde4f4aa466f184c2fecc8efe2a47","user":{"login":"jameshiebert","id":3904316,"avatar_url":"https://avatars.githubusercontent.com/u/3904316?v=3","gravatar_id":"","url":"https://api.github.com/users/jameshiebert","html_url":"https://github.com/jameshiebert","followers_url":"https://api.github.com/users/jameshiebert/followers","following_url":"https://api.github.com/users/jameshiebert/following{/other_user}","gists_url":"https://api.github.com/users/jameshiebert/gists{/gist_id}","starred_url":"https://api.github.com/users/jameshiebert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameshiebert/subscriptions","organizations_url":"https://api.github.com/users/jameshiebert/orgs","repos_url":"https://api.github.com/users/jameshiebert/repos","events_url":"https://api.github.com/users/jameshiebert/events{/privacy}","received_events_url":"https://api.github.com/users/jameshiebert/received_events","type":"User","site_admin":false},"body":"So, I initially liked this approach. However, the big, big drawback is that with this change, you would *always* need to run the code out of an existing git repository. This would basically eliminate the ability to run the code as a [source distribution](https://packaging.python.org/distributing/#source-distributions) or a built [wheel](https://packaging.python.org/distributing/#wheels).\r\n\r\nI think that it would be a better choice to put all of the `get_commitish()` code in the setup.py to be run at build time or doc build time. That way we have the option of building our package on a dev machine, pushing the build to our PyPI repo, and installing from there on a prod machine (that wouldn't necessarily have git installed).","created_at":"2016-11-03T18:26:40Z","updated_at":"2016-11-03T18:26:40Z","html_url":"https://github.com/pacificclimate/pdp/pull/52#discussion_r86412053","pull_request_url":"https://api.github.com/repos/pacificclimate/pdp/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/pacificclimate/pdp/pulls/comments/86412053"},"html":{"href":"https://github.com/pacificclimate/pdp/pull/52#discussion_r86412053"},"pull_request":{"href":"https://api.github.com/repos/pacificclimate/pdp/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/pacificclimate/pdp/pulls/52","id":92038288,"html_url":"https://github.com/pacificclimate/pdp/pull/52","diff_url":"https://github.com/pacificclimate/pdp/pull/52.diff","patch_url":"https://github.com/pacificclimate/pdp/pull/52.patch","issue_url":"https://api.github.com/repos/pacificclimate/pdp/issues/52","number":52,"state":"open","locked":false,"title":"Feature/show dev branch","user":{"login":"CBMasri","id":10861443,"avatar_url":"https://avatars.githubusercontent.com/u/10861443?v=3","gravatar_id":"","url":"https://api.github.com/users/CBMasri","html_url":"https://github.com/CBMasri","followers_url":"https://api.github.com/users/CBMasri/followers","following_url":"https://api.github.com/users/CBMasri/following{/other_user}","gists_url":"https://api.github.com/users/CBMasri/gists{/gist_id}","starred_url":"https://api.github.com/users/CBMasri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CBMasri/subscriptions","organizations_url":"https://api.github.com/users/CBMasri/orgs","repos_url":"https://api.github.com/users/CBMasri/repos","events_url":"https://api.github.com/users/CBMasri/events{/privacy}","received_events_url":"https://api.github.com/users/CBMasri/received_events","type":"User","site_admin":false},"body":"Fixes #48. Shows the branch and commit on the dataportal\r\n\r\n![pdp-commit](https://cloud.githubusercontent.com/assets/10861443/19943723/e7f3181a-a0f5-11e6-9e07-87f21fb95f32.png)\r\n\r\nas well as in the docs\r\n\r\n![pdp-docs](https://cloud.githubusercontent.com/assets/10861443/19943911/b5a21e3c-a0f6-11e6-8b80-f59dc17cd96d.png)","created_at":"2016-11-02T19:23:00Z","updated_at":"2016-11-03T18:29:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"411e1e43e6ed8cca9aa8ecaa2d9f8f8b28680d4b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pacificclimate/pdp/pulls/52/commits","review_comments_url":"https://api.github.com/repos/pacificclimate/pdp/pulls/52/comments","review_comment_url":"https://api.github.com/repos/pacificclimate/pdp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pacificclimate/pdp/issues/52/comments","statuses_url":"https://api.github.com/repos/pacificclimate/pdp/statuses/dc362958aaddde4f4aa466f184c2fecc8efe2a47","head":{"label":"pacificclimate:feature/show-dev-branch","ref":"feature/show-dev-branch","sha":"dc362958aaddde4f4aa466f184c2fecc8efe2a47","user":{"login":"pacificclimate","id":7443397,"avatar_url":"https://avatars.githubusercontent.com/u/7443397?v=3","gravatar_id":"","url":"https://api.github.com/users/pacificclimate","html_url":"https://github.com/pacificclimate","followers_url":"https://api.github.com/users/pacificclimate/followers","following_url":"https://api.github.com/users/pacificclimate/following{/other_user}","gists_url":"https://api.github.com/users/pacificclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/pacificclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pacificclimate/subscriptions","organizations_url":"https://api.github.com/users/pacificclimate/orgs","repos_url":"https://api.github.com/users/pacificclimate/repos","events_url":"https://api.github.com/users/pacificclimate/events{/privacy}","received_events_url":"https://api.github.com/users/pacificclimate/received_events","type":"Organization","site_admin":false},"repo":{"id":20577962,"name":"pdp","full_name":"pacificclimate/pdp","owner":{"login":"pacificclimate","id":7443397,"avatar_url":"https://avatars.githubusercontent.com/u/7443397?v=3","gravatar_id":"","url":"https://api.github.com/users/pacificclimate","html_url":"https://github.com/pacificclimate","followers_url":"https://api.github.com/users/pacificclimate/followers","following_url":"https://api.github.com/users/pacificclimate/following{/other_user}","gists_url":"https://api.github.com/users/pacificclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/pacificclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pacificclimate/subscriptions","organizations_url":"https://api.github.com/users/pacificclimate/orgs","repos_url":"https://api.github.com/users/pacificclimate/repos","events_url":"https://api.github.com/users/pacificclimate/events{/privacy}","received_events_url":"https://api.github.com/users/pacificclimate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pacificclimate/pdp","description":"The PCIC Data Portal - Server software to run the entire web application","fork":false,"url":"https://api.github.com/repos/pacificclimate/pdp","forks_url":"https://api.github.com/repos/pacificclimate/pdp/forks","keys_url":"https://api.github.com/repos/pacificclimate/pdp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pacificclimate/pdp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pacificclimate/pdp/teams","hooks_url":"https://api.github.com/repos/pacificclimate/pdp/hooks","issue_events_url":"https://api.github.com/repos/pacificclimate/pdp/issues/events{/number}","events_url":"https://api.github.com/repos/pacificclimate/pdp/events","assignees_url":"https://api.github.com/repos/pacificclimate/pdp/assignees{/user}","branches_url":"https://api.github.com/repos/pacificclimate/pdp/branches{/branch}","tags_url":"https://api.github.com/repos/pacificclimate/pdp/tags","blobs_url":"https://api.github.com/repos/pacificclimate/pdp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pacificclimate/pdp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pacificclimate/pdp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pacificclimate/pdp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pacificclimate/pdp/statuses/{sha}","languages_url":"https://api.github.com/repos/pacificclimate/pdp/languages","stargazers_url":"https://api.github.com/repos/pacificclimate/pdp/stargazers","contributors_url":"https://api.github.com/repos/pacificclimate/pdp/contributors","subscribers_url":"https://api.github.com/repos/pacificclimate/pdp/subscribers","subscription_url":"https://api.github.com/repos/pacificclimate/pdp/subscription","commits_url":"https://api.github.com/repos/pacificclimate/pdp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pacificclimate/pdp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pacificclimate/pdp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pacificclimate/pdp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pacificclimate/pdp/contents/{+path}","compare_url":"https://api.github.com/repos/pacificclimate/pdp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pacificclimate/pdp/merges","archive_url":"https://api.github.com/repos/pacificclimate/pdp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pacificclimate/pdp/downloads","issues_url":"https://api.github.com/repos/pacificclimate/pdp/issues{/number}","pulls_url":"https://api.github.com/repos/pacificclimate/pdp/pulls{/number}","milestones_url":"https://api.github.com/repos/pacificclimate/pdp/milestones{/number}","notifications_url":"https://api.github.com/repos/pacificclimate/pdp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pacificclimate/pdp/labels{/name}","releases_url":"https://api.github.com/repos/pacificclimate/pdp/releases{/id}","deployments_url":"https://api.github.com/repos/pacificclimate/pdp/deployments","created_at":"2014-06-06T20:56:11Z","updated_at":"2015-05-06T23:42:59Z","pushed_at":"2016-11-03T17:17:35Z","git_url":"git://github.com/pacificclimate/pdp.git","ssh_url":"git@github.com:pacificclimate/pdp.git","clone_url":"https://github.com/pacificclimate/pdp.git","svn_url":"https://github.com/pacificclimate/pdp","homepage":null,"size":5422,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"pacificclimate:dev","ref":"dev","sha":"d491dbdd211afd8fadf997a40fa5bfa4c59dd77d","user":{"login":"pacificclimate","id":7443397,"avatar_url":"https://avatars.githubusercontent.com/u/7443397?v=3","gravatar_id":"","url":"https://api.github.com/users/pacificclimate","html_url":"https://github.com/pacificclimate","followers_url":"https://api.github.com/users/pacificclimate/followers","following_url":"https://api.github.com/users/pacificclimate/following{/other_user}","gists_url":"https://api.github.com/users/pacificclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/pacificclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pacificclimate/subscriptions","organizations_url":"https://api.github.com/users/pacificclimate/orgs","repos_url":"https://api.github.com/users/pacificclimate/repos","events_url":"https://api.github.com/users/pacificclimate/events{/privacy}","received_events_url":"https://api.github.com/users/pacificclimate/received_events","type":"Organization","site_admin":false},"repo":{"id":20577962,"name":"pdp","full_name":"pacificclimate/pdp","owner":{"login":"pacificclimate","id":7443397,"avatar_url":"https://avatars.githubusercontent.com/u/7443397?v=3","gravatar_id":"","url":"https://api.github.com/users/pacificclimate","html_url":"https://github.com/pacificclimate","followers_url":"https://api.github.com/users/pacificclimate/followers","following_url":"https://api.github.com/users/pacificclimate/following{/other_user}","gists_url":"https://api.github.com/users/pacificclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/pacificclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pacificclimate/subscriptions","organizations_url":"https://api.github.com/users/pacificclimate/orgs","repos_url":"https://api.github.com/users/pacificclimate/repos","events_url":"https://api.github.com/users/pacificclimate/events{/privacy}","received_events_url":"https://api.github.com/users/pacificclimate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pacificclimate/pdp","description":"The PCIC Data Portal - Server software to run the entire web application","fork":false,"url":"https://api.github.com/repos/pacificclimate/pdp","forks_url":"https://api.github.com/repos/pacificclimate/pdp/forks","keys_url":"https://api.github.com/repos/pacificclimate/pdp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pacificclimate/pdp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pacificclimate/pdp/teams","hooks_url":"https://api.github.com/repos/pacificclimate/pdp/hooks","issue_events_url":"https://api.github.com/repos/pacificclimate/pdp/issues/events{/number}","events_url":"https://api.github.com/repos/pacificclimate/pdp/events","assignees_url":"https://api.github.com/repos/pacificclimate/pdp/assignees{/user}","branches_url":"https://api.github.com/repos/pacificclimate/pdp/branches{/branch}","tags_url":"https://api.github.com/repos/pacificclimate/pdp/tags","blobs_url":"https://api.github.com/repos/pacificclimate/pdp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pacificclimate/pdp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pacificclimate/pdp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pacificclimate/pdp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pacificclimate/pdp/statuses/{sha}","languages_url":"https://api.github.com/repos/pacificclimate/pdp/languages","stargazers_url":"https://api.github.com/repos/pacificclimate/pdp/stargazers","contributors_url":"https://api.github.com/repos/pacificclimate/pdp/contributors","subscribers_url":"https://api.github.com/repos/pacificclimate/pdp/subscribers","subscription_url":"https://api.github.com/repos/pacificclimate/pdp/subscription","commits_url":"https://api.github.com/repos/pacificclimate/pdp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pacificclimate/pdp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pacificclimate/pdp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pacificclimate/pdp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pacificclimate/pdp/contents/{+path}","compare_url":"https://api.github.com/repos/pacificclimate/pdp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pacificclimate/pdp/merges","archive_url":"https://api.github.com/repos/pacificclimate/pdp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pacificclimate/pdp/downloads","issues_url":"https://api.github.com/repos/pacificclimate/pdp/issues{/number}","pulls_url":"https://api.github.com/repos/pacificclimate/pdp/pulls{/number}","milestones_url":"https://api.github.com/repos/pacificclimate/pdp/milestones{/number}","notifications_url":"https://api.github.com/repos/pacificclimate/pdp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pacificclimate/pdp/labels{/name}","releases_url":"https://api.github.com/repos/pacificclimate/pdp/releases{/id}","deployments_url":"https://api.github.com/repos/pacificclimate/pdp/deployments","created_at":"2014-06-06T20:56:11Z","updated_at":"2015-05-06T23:42:59Z","pushed_at":"2016-11-03T17:17:35Z","git_url":"git://github.com/pacificclimate/pdp.git","ssh_url":"git@github.com:pacificclimate/pdp.git","clone_url":"https://github.com/pacificclimate/pdp.git","svn_url":"https://github.com/pacificclimate/pdp","homepage":null,"size":5422,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pacificclimate/pdp/pulls/52"},"html":{"href":"https://github.com/pacificclimate/pdp/pull/52"},"issue":{"href":"https://api.github.com/repos/pacificclimate/pdp/issues/52"},"comments":{"href":"https://api.github.com/repos/pacificclimate/pdp/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/pacificclimate/pdp/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/pacificclimate/pdp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pacificclimate/pdp/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/pacificclimate/pdp/statuses/dc362958aaddde4f4aa466f184c2fecc8efe2a47"}}}}
{"actor":{"display_login":"jameshiebert"}}