{"action":"created","comment":{"url":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments/58003912","id":58003912,"diff_hunk":"@@ -0,0 +1,10 @@\n+\"\"\"pytest hooks\"\"\"","path":"conftest.py","position":1,"original_position":1,"commit_id":"a5cd81f54ffccafac551779d639b78ef5e1259fc","original_commit_id":"a5cd81f54ffccafac551779d639b78ef5e1259fc","user":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"body":"Unfortunately no; pytest won't recognize it otherwise.","created_at":"2016-03-31T05:53:19Z","updated_at":"2016-03-31T05:53:19Z","html_url":"https://github.com/CCI-MOC/haas/pull/561#discussion_r58003912","pull_request_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/561","_links":{"self":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments/58003912"},"html":{"href":"https://github.com/CCI-MOC/haas/pull/561#discussion_r58003912"},"pull_request":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/561"}}},"pull_request":{"url":"https://api.github.com/repos/CCI-MOC/haas/pulls/561","id":64190453,"html_url":"https://github.com/CCI-MOC/haas/pull/561","diff_url":"https://github.com/CCI-MOC/haas/pull/561.diff","patch_url":"https://github.com/CCI-MOC/haas/pull/561.patch","issue_url":"https://api.github.com/repos/CCI-MOC/haas/issues/561","number":561,"state":"open","locked":false,"title":" Flask-SQLAlchemy and Database Migrations (try 2)","user":{"login":"henn","id":1813729,"avatar_url":"https://avatars.githubusercontent.com/u/1813729?v=3","gravatar_id":"","url":"https://api.github.com/users/henn","html_url":"https://github.com/henn","followers_url":"https://api.github.com/users/henn/followers","following_url":"https://api.github.com/users/henn/following{/other_user}","gists_url":"https://api.github.com/users/henn/gists{/gist_id}","starred_url":"https://api.github.com/users/henn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henn/subscriptions","organizations_url":"https://api.github.com/users/henn/orgs","repos_url":"https://api.github.com/users/henn/repos","events_url":"https://api.github.com/users/henn/events{/privacy}","received_events_url":"https://api.github.com/users/henn/received_events","type":"User","site_admin":false},"body":"This is replacing #556, as for some reason github wasn't removing the merged commits and thus the diffs were bigger than they had to be.\r\n\r\nIan's (@zenhack) comments from #556:\r\n> This isn't quite ready yet, but it's worth having folks start looking at it. This is both moving over to the flask sqlalchemy extension and adding a database migration infrastructure. It includes a migration script that upgrades the content of my auth pr (#491) to the contents of the latest commit on this repository. Note that it does not handle upgrading the database for the OBM work that @SahilTikale did, since that was merged first.\r\n> \r\n> It also includes some changes to the travis stuff; we run tests/stress.py, and we run the tests against both sqlite and postgres.\r\n> \r\n> It does not yet include automated testing for the database migration infrastructure; I wanted to run my ideas about how to do that by you guys first:\r\n> \r\n>     Write a function like initial_db in tests/unit/api/auth.py (or just use that one), which populates a db with some useful objects.\r\n>     Before making any changes to the schema, use said script to populate a postgres database, then dump the database as a sql script (via pg_dump). Commit the result.\r\n>     Make your changes, and add a migration script.\r\n>     Testing will consist of:\r\n>         run the sql script to populate a (previously empty) database.\r\n>         run the migration script, to upgrade to the latest schema.\r\n>         run a series of tests that expect said initial database.\r\n> \r\n> I'm also still trying to pin down how the schema changes due to adding and removing extensions should work. Alembic has some support for branching and merging schema, but I need to do a bit more reading before I can decide what I think the right thing to do is there.\r\n> \r\n> I also need to write some developer docs describing how to do database migrations.\r\n> \r\n> @SahilTikale, @henn, let me know what you think.\r\n> ","created_at":"2016-03-25T18:14:24Z","updated_at":"2016-03-31T05:53:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7cf5c57b12f45a6fffcf357eaf88bd6c000af25","assignee":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/561/commits","review_comments_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/561/comments","review_comment_url":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CCI-MOC/haas/issues/561/comments","statuses_url":"https://api.github.com/repos/CCI-MOC/haas/statuses/a5cd81f54ffccafac551779d639b78ef5e1259fc","head":{"label":"zenhack:flask-db","ref":"flask-db","sha":"a5cd81f54ffccafac551779d639b78ef5e1259fc","user":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"repo":{"id":19796467,"name":"haas","full_name":"zenhack/haas","owner":{"login":"zenhack","id":883774,"avatar_url":"https://avatars.githubusercontent.com/u/883774?v=3","gravatar_id":"","url":"https://api.github.com/users/zenhack","html_url":"https://github.com/zenhack","followers_url":"https://api.github.com/users/zenhack/followers","following_url":"https://api.github.com/users/zenhack/following{/other_user}","gists_url":"https://api.github.com/users/zenhack/gists{/gist_id}","starred_url":"https://api.github.com/users/zenhack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenhack/subscriptions","organizations_url":"https://api.github.com/users/zenhack/orgs","repos_url":"https://api.github.com/users/zenhack/repos","events_url":"https://api.github.com/users/zenhack/events{/privacy}","received_events_url":"https://api.github.com/users/zenhack/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zenhack/haas","description":"","fork":true,"url":"https://api.github.com/repos/zenhack/haas","forks_url":"https://api.github.com/repos/zenhack/haas/forks","keys_url":"https://api.github.com/repos/zenhack/haas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zenhack/haas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zenhack/haas/teams","hooks_url":"https://api.github.com/repos/zenhack/haas/hooks","issue_events_url":"https://api.github.com/repos/zenhack/haas/issues/events{/number}","events_url":"https://api.github.com/repos/zenhack/haas/events","assignees_url":"https://api.github.com/repos/zenhack/haas/assignees{/user}","branches_url":"https://api.github.com/repos/zenhack/haas/branches{/branch}","tags_url":"https://api.github.com/repos/zenhack/haas/tags","blobs_url":"https://api.github.com/repos/zenhack/haas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zenhack/haas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zenhack/haas/git/refs{/sha}","trees_url":"https://api.github.com/repos/zenhack/haas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zenhack/haas/statuses/{sha}","languages_url":"https://api.github.com/repos/zenhack/haas/languages","stargazers_url":"https://api.github.com/repos/zenhack/haas/stargazers","contributors_url":"https://api.github.com/repos/zenhack/haas/contributors","subscribers_url":"https://api.github.com/repos/zenhack/haas/subscribers","subscription_url":"https://api.github.com/repos/zenhack/haas/subscription","commits_url":"https://api.github.com/repos/zenhack/haas/commits{/sha}","git_commits_url":"https://api.github.com/repos/zenhack/haas/git/commits{/sha}","comments_url":"https://api.github.com/repos/zenhack/haas/comments{/number}","issue_comment_url":"https://api.github.com/repos/zenhack/haas/issues/comments{/number}","contents_url":"https://api.github.com/repos/zenhack/haas/contents/{+path}","compare_url":"https://api.github.com/repos/zenhack/haas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zenhack/haas/merges","archive_url":"https://api.github.com/repos/zenhack/haas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zenhack/haas/downloads","issues_url":"https://api.github.com/repos/zenhack/haas/issues{/number}","pulls_url":"https://api.github.com/repos/zenhack/haas/pulls{/number}","milestones_url":"https://api.github.com/repos/zenhack/haas/milestones{/number}","notifications_url":"https://api.github.com/repos/zenhack/haas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zenhack/haas/labels{/name}","releases_url":"https://api.github.com/repos/zenhack/haas/releases{/id}","deployments_url":"https://api.github.com/repos/zenhack/haas/deployments","created_at":"2014-05-14T21:13:52Z","updated_at":"2015-12-10T14:32:56Z","pushed_at":"2016-03-30T03:39:20Z","git_url":"git://github.com/zenhack/haas.git","ssh_url":"git@github.com:zenhack/haas.git","clone_url":"https://github.com/zenhack/haas.git","svn_url":"https://github.com/zenhack/haas","homepage":null,"size":2024,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"devel"}},"base":{"label":"CCI-MOC:master","ref":"master","sha":"6e03fae4b5cd3544e155683225ad6a00d93ebce8","user":{"login":"CCI-MOC","id":3578683,"avatar_url":"https://avatars.githubusercontent.com/u/3578683?v=3","gravatar_id":"","url":"https://api.github.com/users/CCI-MOC","html_url":"https://github.com/CCI-MOC","followers_url":"https://api.github.com/users/CCI-MOC/followers","following_url":"https://api.github.com/users/CCI-MOC/following{/other_user}","gists_url":"https://api.github.com/users/CCI-MOC/gists{/gist_id}","starred_url":"https://api.github.com/users/CCI-MOC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCI-MOC/subscriptions","organizations_url":"https://api.github.com/users/CCI-MOC/orgs","repos_url":"https://api.github.com/users/CCI-MOC/repos","events_url":"https://api.github.com/users/CCI-MOC/events{/privacy}","received_events_url":"https://api.github.com/users/CCI-MOC/received_events","type":"Organization","site_admin":false},"repo":{"id":16487339,"name":"haas","full_name":"CCI-MOC/haas","owner":{"login":"CCI-MOC","id":3578683,"avatar_url":"https://avatars.githubusercontent.com/u/3578683?v=3","gravatar_id":"","url":"https://api.github.com/users/CCI-MOC","html_url":"https://github.com/CCI-MOC","followers_url":"https://api.github.com/users/CCI-MOC/followers","following_url":"https://api.github.com/users/CCI-MOC/following{/other_user}","gists_url":"https://api.github.com/users/CCI-MOC/gists{/gist_id}","starred_url":"https://api.github.com/users/CCI-MOC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CCI-MOC/subscriptions","organizations_url":"https://api.github.com/users/CCI-MOC/orgs","repos_url":"https://api.github.com/users/CCI-MOC/repos","events_url":"https://api.github.com/users/CCI-MOC/events{/privacy}","received_events_url":"https://api.github.com/users/CCI-MOC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CCI-MOC/haas","description":"Hardware as a Service","fork":false,"url":"https://api.github.com/repos/CCI-MOC/haas","forks_url":"https://api.github.com/repos/CCI-MOC/haas/forks","keys_url":"https://api.github.com/repos/CCI-MOC/haas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CCI-MOC/haas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CCI-MOC/haas/teams","hooks_url":"https://api.github.com/repos/CCI-MOC/haas/hooks","issue_events_url":"https://api.github.com/repos/CCI-MOC/haas/issues/events{/number}","events_url":"https://api.github.com/repos/CCI-MOC/haas/events","assignees_url":"https://api.github.com/repos/CCI-MOC/haas/assignees{/user}","branches_url":"https://api.github.com/repos/CCI-MOC/haas/branches{/branch}","tags_url":"https://api.github.com/repos/CCI-MOC/haas/tags","blobs_url":"https://api.github.com/repos/CCI-MOC/haas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CCI-MOC/haas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CCI-MOC/haas/git/refs{/sha}","trees_url":"https://api.github.com/repos/CCI-MOC/haas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CCI-MOC/haas/statuses/{sha}","languages_url":"https://api.github.com/repos/CCI-MOC/haas/languages","stargazers_url":"https://api.github.com/repos/CCI-MOC/haas/stargazers","contributors_url":"https://api.github.com/repos/CCI-MOC/haas/contributors","subscribers_url":"https://api.github.com/repos/CCI-MOC/haas/subscribers","subscription_url":"https://api.github.com/repos/CCI-MOC/haas/subscription","commits_url":"https://api.github.com/repos/CCI-MOC/haas/commits{/sha}","git_commits_url":"https://api.github.com/repos/CCI-MOC/haas/git/commits{/sha}","comments_url":"https://api.github.com/repos/CCI-MOC/haas/comments{/number}","issue_comment_url":"https://api.github.com/repos/CCI-MOC/haas/issues/comments{/number}","contents_url":"https://api.github.com/repos/CCI-MOC/haas/contents/{+path}","compare_url":"https://api.github.com/repos/CCI-MOC/haas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CCI-MOC/haas/merges","archive_url":"https://api.github.com/repos/CCI-MOC/haas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CCI-MOC/haas/downloads","issues_url":"https://api.github.com/repos/CCI-MOC/haas/issues{/number}","pulls_url":"https://api.github.com/repos/CCI-MOC/haas/pulls{/number}","milestones_url":"https://api.github.com/repos/CCI-MOC/haas/milestones{/number}","notifications_url":"https://api.github.com/repos/CCI-MOC/haas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CCI-MOC/haas/labels{/name}","releases_url":"https://api.github.com/repos/CCI-MOC/haas/releases{/id}","deployments_url":"https://api.github.com/repos/CCI-MOC/haas/deployments","created_at":"2014-02-03T17:48:01Z","updated_at":"2016-03-18T19:29:41Z","pushed_at":"2016-03-30T16:01:15Z","git_url":"git://github.com/CCI-MOC/haas.git","ssh_url":"git@github.com:CCI-MOC/haas.git","clone_url":"https://github.com/CCI-MOC/haas.git","svn_url":"https://github.com/CCI-MOC/haas","homepage":"","size":2256,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":123,"forks":26,"open_issues":123,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/561"},"html":{"href":"https://github.com/CCI-MOC/haas/pull/561"},"issue":{"href":"https://api.github.com/repos/CCI-MOC/haas/issues/561"},"comments":{"href":"https://api.github.com/repos/CCI-MOC/haas/issues/561/comments"},"review_comments":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/561/comments"},"review_comment":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CCI-MOC/haas/pulls/561/commits"},"statuses":{"href":"https://api.github.com/repos/CCI-MOC/haas/statuses/a5cd81f54ffccafac551779d639b78ef5e1259fc"}}}}