{"action":"created","comment":{"url":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/comments/99809536","pull_request_review_id":20493492,"id":99809536,"diff_hunk":"@@ -0,0 +1,86 @@\n+import json\n+from sqlalchemy import *\n+from sqlalchemy.orm import sessionmaker\n+import numpy as np\n+\n+def get_models_pretty_list(engine, conn, table):\n+    s = select([table])\n+    result = conn.execute(s)\n+    models = []\n+\n+    for row in result:\n+        models += [{'title': 'Data analysing model : \"' + str(row['model_name']) + '\"', 'id': str(int(row['model_id']))}]\n+\n+    return models\n+\n+\n+def get_model_info(engine, conn, model_id, models_table, model_2_data_table, dataset_table):\n+    session = sessionmaker(bind=engine)()\n+    models = session.query(models_table, model_2_data_table).\\\n+            join(model_2_data_table, model_2_data_table.c.model_id == models_table.c.model_id).\\\n+            filter(models_table.c.model_id == model_id)\n+\n+#    import pdb; pdb.set_trace()\n+    dataset_list = []\n+    model_info = []\n+\n+    for model in models:\n+        model_info = [{\n+                'title' : 'Model name',\n+                'value' : model.model_name\n+            },\n+            {\n+                'title' : 'Description',\n+                'value' : model.description,\n+            },{\n+                'title' : 'Model type',\n+                'value' : model.model_type,\n+            }]\n+\n+        s = select([dataset_table]).where(dataset_table.c.data_set_id == model.data_set_id)\n+        data_set = conn.execute(s).first()","path":"server/helpers.py","position":41,"original_position":41,"commit_id":"29c0cb2bb1e6222c204238c2c7d12b0606e5d3d7","original_commit_id":"29c0cb2bb1e6222c204238c2c7d12b0606e5d3d7","user":{"login":"Foka-jr","id":24394976,"avatar_url":"https://avatars.githubusercontent.com/u/24394976?v=3","gravatar_id":"","url":"https://api.github.com/users/Foka-jr","html_url":"https://github.com/Foka-jr","followers_url":"https://api.github.com/users/Foka-jr/followers","following_url":"https://api.github.com/users/Foka-jr/following{/other_user}","gists_url":"https://api.github.com/users/Foka-jr/gists{/gist_id}","starred_url":"https://api.github.com/users/Foka-jr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Foka-jr/subscriptions","organizations_url":"https://api.github.com/users/Foka-jr/orgs","repos_url":"https://api.github.com/users/Foka-jr/repos","events_url":"https://api.github.com/users/Foka-jr/events{/privacy}","received_events_url":"https://api.github.com/users/Foka-jr/received_events","type":"User","site_admin":false},"body":"если вернет None - у тебя все что ниже свалится","created_at":"2017-02-07T12:21:47Z","updated_at":"2017-02-07T12:26:38Z","html_url":"https://github.com/OpenTRM/OpenNeurons/pull/5#discussion_r99809536","pull_request_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/comments/99809536"},"html":{"href":"https://github.com/OpenTRM/OpenNeurons/pull/5#discussion_r99809536"},"pull_request":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/5","id":104981632,"html_url":"https://github.com/OpenTRM/OpenNeurons/pull/5","diff_url":"https://github.com/OpenTRM/OpenNeurons/pull/5.diff","patch_url":"https://github.com/OpenTRM/OpenNeurons/pull/5.patch","issue_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/issues/5","number":5,"state":"open","locked":false,"title":"Добавлена страница для просмотра моделей и выборок","user":{"login":"ilyshnikova","id":9670676,"avatar_url":"https://avatars.githubusercontent.com/u/9670676?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyshnikova","html_url":"https://github.com/ilyshnikova","followers_url":"https://api.github.com/users/ilyshnikova/followers","following_url":"https://api.github.com/users/ilyshnikova/following{/other_user}","gists_url":"https://api.github.com/users/ilyshnikova/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyshnikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyshnikova/subscriptions","organizations_url":"https://api.github.com/users/ilyshnikova/orgs","repos_url":"https://api.github.com/users/ilyshnikova/repos","events_url":"https://api.github.com/users/ilyshnikova/events{/privacy}","received_events_url":"https://api.github.com/users/ilyshnikova/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-07T11:03:02Z","updated_at":"2017-02-07T12:26:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f28e9b4766e7c2a6bbaaf3dcf62f390df918a16","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/5/commits","review_comments_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/5/comments","review_comment_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/issues/5/comments","statuses_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/statuses/29c0cb2bb1e6222c204238c2c7d12b0606e5d3d7","head":{"label":"ilyshnikova:master","ref":"master","sha":"29c0cb2bb1e6222c204238c2c7d12b0606e5d3d7","user":{"login":"ilyshnikova","id":9670676,"avatar_url":"https://avatars.githubusercontent.com/u/9670676?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyshnikova","html_url":"https://github.com/ilyshnikova","followers_url":"https://api.github.com/users/ilyshnikova/followers","following_url":"https://api.github.com/users/ilyshnikova/following{/other_user}","gists_url":"https://api.github.com/users/ilyshnikova/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyshnikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyshnikova/subscriptions","organizations_url":"https://api.github.com/users/ilyshnikova/orgs","repos_url":"https://api.github.com/users/ilyshnikova/repos","events_url":"https://api.github.com/users/ilyshnikova/events{/privacy}","received_events_url":"https://api.github.com/users/ilyshnikova/received_events","type":"User","site_admin":false},"repo":{"id":76810303,"name":"OpenNeurons","full_name":"ilyshnikova/OpenNeurons","owner":{"login":"ilyshnikova","id":9670676,"avatar_url":"https://avatars.githubusercontent.com/u/9670676?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyshnikova","html_url":"https://github.com/ilyshnikova","followers_url":"https://api.github.com/users/ilyshnikova/followers","following_url":"https://api.github.com/users/ilyshnikova/following{/other_user}","gists_url":"https://api.github.com/users/ilyshnikova/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyshnikova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyshnikova/subscriptions","organizations_url":"https://api.github.com/users/ilyshnikova/orgs","repos_url":"https://api.github.com/users/ilyshnikova/repos","events_url":"https://api.github.com/users/ilyshnikova/events{/privacy}","received_events_url":"https://api.github.com/users/ilyshnikova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ilyshnikova/OpenNeurons","description":null,"fork":true,"url":"https://api.github.com/repos/ilyshnikova/OpenNeurons","forks_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/forks","keys_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/teams","hooks_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/hooks","issue_events_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/issues/events{/number}","events_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/events","assignees_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/assignees{/user}","branches_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/branches{/branch}","tags_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/tags","blobs_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/git/refs{/sha}","trees_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/statuses/{sha}","languages_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/languages","stargazers_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/stargazers","contributors_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/contributors","subscribers_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/subscribers","subscription_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/subscription","commits_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/commits{/sha}","git_commits_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/git/commits{/sha}","comments_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/comments{/number}","issue_comment_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/issues/comments{/number}","contents_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/contents/{+path}","compare_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/merges","archive_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/downloads","issues_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/issues{/number}","pulls_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/pulls{/number}","milestones_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/milestones{/number}","notifications_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/labels{/name}","releases_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/releases{/id}","deployments_url":"https://api.github.com/repos/ilyshnikova/OpenNeurons/deployments","created_at":"2016-12-18T22:25:21Z","updated_at":"2016-12-18T23:03:29Z","pushed_at":"2017-02-07T00:58:08Z","git_url":"git://github.com/ilyshnikova/OpenNeurons.git","ssh_url":"git@github.com:ilyshnikova/OpenNeurons.git","clone_url":"https://github.com/ilyshnikova/OpenNeurons.git","svn_url":"https://github.com/ilyshnikova/OpenNeurons","homepage":null,"size":286,"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":"OpenTRM:master","ref":"master","sha":"cbd81f6e90af1ea9f8ff002196ab16ef564262d0","user":{"login":"OpenTRM","id":24375897,"avatar_url":"https://avatars.githubusercontent.com/u/24375897?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenTRM","html_url":"https://github.com/OpenTRM","followers_url":"https://api.github.com/users/OpenTRM/followers","following_url":"https://api.github.com/users/OpenTRM/following{/other_user}","gists_url":"https://api.github.com/users/OpenTRM/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenTRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenTRM/subscriptions","organizations_url":"https://api.github.com/users/OpenTRM/orgs","repos_url":"https://api.github.com/users/OpenTRM/repos","events_url":"https://api.github.com/users/OpenTRM/events{/privacy}","received_events_url":"https://api.github.com/users/OpenTRM/received_events","type":"Organization","site_admin":false},"repo":{"id":75716067,"name":"OpenNeurons","full_name":"OpenTRM/OpenNeurons","owner":{"login":"OpenTRM","id":24375897,"avatar_url":"https://avatars.githubusercontent.com/u/24375897?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenTRM","html_url":"https://github.com/OpenTRM","followers_url":"https://api.github.com/users/OpenTRM/followers","following_url":"https://api.github.com/users/OpenTRM/following{/other_user}","gists_url":"https://api.github.com/users/OpenTRM/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenTRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenTRM/subscriptions","organizations_url":"https://api.github.com/users/OpenTRM/orgs","repos_url":"https://api.github.com/users/OpenTRM/repos","events_url":"https://api.github.com/users/OpenTRM/events{/privacy}","received_events_url":"https://api.github.com/users/OpenTRM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenTRM/OpenNeurons","description":null,"fork":false,"url":"https://api.github.com/repos/OpenTRM/OpenNeurons","forks_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/forks","keys_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/teams","hooks_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/hooks","issue_events_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/issues/events{/number}","events_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/events","assignees_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/assignees{/user}","branches_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/branches{/branch}","tags_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/tags","blobs_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/languages","stargazers_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/stargazers","contributors_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/contributors","subscribers_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/subscribers","subscription_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/subscription","commits_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/contents/{+path}","compare_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/merges","archive_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/downloads","issues_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/issues{/number}","pulls_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/labels{/name}","releases_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/releases{/id}","deployments_url":"https://api.github.com/repos/OpenTRM/OpenNeurons/deployments","created_at":"2016-12-06T09:30:31Z","updated_at":"2017-01-19T16:10:21Z","pushed_at":"2017-02-07T11:03:03Z","git_url":"git://github.com/OpenTRM/OpenNeurons.git","ssh_url":"git@github.com:OpenTRM/OpenNeurons.git","clone_url":"https://github.com/OpenTRM/OpenNeurons.git","svn_url":"https://github.com/OpenTRM/OpenNeurons","homepage":null,"size":282,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/5"},"html":{"href":"https://github.com/OpenTRM/OpenNeurons/pull/5"},"issue":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/issues/5"},"comments":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/OpenTRM/OpenNeurons/statuses/29c0cb2bb1e6222c204238c2c7d12b0606e5d3d7"}}}}
{"actor":{"display_login":"Foka-jr"}}