{"action":"created","comment":{"url":"https://api.github.com/repos/numenta/numenta-apps/pulls/comments/37698017","id":37698017,"diff_hunk":"@@ -0,0 +1,201 @@\n+#!/usr/bin/env python\n+# ----------------------------------------------------------------------\n+# Numenta Platform for Intelligent Computing (NuPIC)\n+# Copyright (C) 2015, Numenta, Inc.  Unless you have purchased from\n+# Numenta, Inc. a separate commercial license for this software code, the\n+# following terms and conditions apply:\n+#\n+# This program is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU Affero Public License version 3 as\n+# published by the Free Software Foundation.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n+# See the GNU Affero Public License for more details.\n+#\n+# You should have received a copy of the GNU Affero Public License\n+# along with this program.  If not, see http://www.gnu.org/licenses.\n+#\n+# http://numenta.org/licenses/\n+# ----------------------------------------------------------------------\n+\n+\"\"\"Intergration test of the unicorn_backend.model_runner module\"\"\"\n+\n+import json\n+import logging\n+import subprocess\n+import sys\n+import time\n+import types\n+import unittest\n+import uuid\n+\n+\n+from nta.utils.logging_support_raw import LoggingSupport\n+from nta.utils import test_utils\n+\n+\n+\n+_LOGGER = logging.getLogger(\"unicorn_model_runner_test\")\n+\n+\n+\n+def setUpModule():\n+  LoggingSupport.initTestApp()\n+\n+\n+\n+class ModelRunnerTestCase(unittest.TestCase):\n+\n+\n+  @staticmethod\n+  def _startModelRunnerSubprocess(modelId, stats):\n+    \"\"\"Start the unicorn model_runner subprocess\n+\n+    :param str modelId: model identifier\n+    :param dict stats: Metric data stats per stats_schema.json in the\n+      unicorn_backend package\n+    :returns: the started subprocess.Popen object wrapped in\n+      ManagedSubprocessTerminator\n+    :rtype: nta.utils.test_utils.ManagedSubprocessTerminator\n+    \"\"\"\n+    process = subprocess.Popen(\n+      args=[sys.executable,\n+            \"-m\", \"unicorn_backend.model_runner\",\n+            \"--model=\" + modelId,","path":"unicorn/tests/py/integration/model_runner_test.py","position":66,"original_position":66,"commit_id":"a4dd91f498938e1e3f91ffad650914d858664a5e","original_commit_id":"a4dd91f498938e1e3f91ffad650914d858664a5e","user":{"login":"shantanoo","id":853,"avatar_url":"https://avatars.githubusercontent.com/u/853?v=3","gravatar_id":"","url":"https://api.github.com/users/shantanoo","html_url":"https://github.com/shantanoo","followers_url":"https://api.github.com/users/shantanoo/followers","following_url":"https://api.github.com/users/shantanoo/following{/other_user}","gists_url":"https://api.github.com/users/shantanoo/gists{/gist_id}","starred_url":"https://api.github.com/users/shantanoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shantanoo/subscriptions","organizations_url":"https://api.github.com/users/shantanoo/orgs","repos_url":"https://api.github.com/users/shantanoo/repos","events_url":"https://api.github.com/users/shantanoo/events{/privacy}","received_events_url":"https://api.github.com/users/shantanoo/received_events","type":"User","site_admin":false},"body":"Instead of using `+`, using `%s` is preferred. Similar to on next line.","created_at":"2015-08-22T18:00:24Z","updated_at":"2015-08-22T18:00:24Z","html_url":"https://github.com/numenta/numenta-apps/pull/230#discussion_r37698017","pull_request_url":"https://api.github.com/repos/numenta/numenta-apps/pulls/230","_links":{"self":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/comments/37698017"},"html":{"href":"https://github.com/numenta/numenta-apps/pull/230#discussion_r37698017"},"pull_request":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/230"}}},"pull_request":{"url":"https://api.github.com/repos/numenta/numenta-apps/pulls/230","id":43008858,"html_url":"https://github.com/numenta/numenta-apps/pull/230","diff_url":"https://github.com/numenta/numenta-apps/pull/230.diff","patch_url":"https://github.com/numenta/numenta-apps/pull/230.patch","issue_url":"https://api.github.com/repos/numenta/numenta-apps/issues/230","number":230,"state":"closed","locked":false,"title":"ENG-25 Implement dummy anomaly likelihood output from backend model runner","user":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars.githubusercontent.com/u/1441066?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"body":"ENG-25 Implement dummy anomaly likelihood output from unicorn_backend.model_runner\r\nENG-25 Implemented basic integration tests for unicorn_backend.model_runner","created_at":"2015-08-21T06:50:24Z","updated_at":"2015-08-22T18:00:24Z","closed_at":"2015-08-21T22:40:29Z","merged_at":"2015-08-21T22:40:29Z","merge_commit_sha":"a2d0c990f6867f816ea8f473183b1b19420870a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/numenta/numenta-apps/pulls/230/commits","review_comments_url":"https://api.github.com/repos/numenta/numenta-apps/pulls/230/comments","review_comment_url":"https://api.github.com/repos/numenta/numenta-apps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numenta/numenta-apps/issues/230/comments","statuses_url":"https://api.github.com/repos/numenta/numenta-apps/statuses/a4dd91f498938e1e3f91ffad650914d858664a5e","head":{"label":"vitaly-krugl:eng25-dummy-anomaly-likelihood","ref":"eng25-dummy-anomaly-likelihood","sha":"a4dd91f498938e1e3f91ffad650914d858664a5e","user":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars.githubusercontent.com/u/1441066?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"repo":{"id":36960229,"name":"numenta-apps","full_name":"vitaly-krugl/numenta-apps","owner":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars.githubusercontent.com/u/1441066?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vitaly-krugl/numenta-apps","description":"HTM based applications and support libraries. Includes Grok for IT Analytics and Grok for Stocks.","fork":true,"url":"https://api.github.com/repos/vitaly-krugl/numenta-apps","forks_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/forks","keys_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/teams","hooks_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/hooks","issue_events_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/issues/events{/number}","events_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/events","assignees_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/assignees{/user}","branches_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/branches{/branch}","tags_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/tags","blobs_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/languages","stargazers_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/stargazers","contributors_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/contributors","subscribers_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/subscribers","subscription_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/subscription","commits_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/contents/{+path}","compare_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/merges","archive_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/downloads","issues_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/issues{/number}","pulls_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/labels{/name}","releases_url":"https://api.github.com/repos/vitaly-krugl/numenta-apps/releases{/id}","created_at":"2015-06-05T23:27:51Z","updated_at":"2015-06-05T23:27:56Z","pushed_at":"2015-08-21T23:03:54Z","git_url":"git://github.com/vitaly-krugl/numenta-apps.git","ssh_url":"git@github.com:vitaly-krugl/numenta-apps.git","clone_url":"https://github.com/vitaly-krugl/numenta-apps.git","svn_url":"https://github.com/vitaly-krugl/numenta-apps","homepage":"http://numenta.com","size":44505,"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":"numenta:master","ref":"master","sha":"1cdfb7f0734984267908f87540a87b51639c7096","user":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"repo":{"id":36754402,"name":"numenta-apps","full_name":"numenta/numenta-apps","owner":{"login":"numenta","id":1039191,"avatar_url":"https://avatars.githubusercontent.com/u/1039191?v=3","gravatar_id":"","url":"https://api.github.com/users/numenta","html_url":"https://github.com/numenta","followers_url":"https://api.github.com/users/numenta/followers","following_url":"https://api.github.com/users/numenta/following{/other_user}","gists_url":"https://api.github.com/users/numenta/gists{/gist_id}","starred_url":"https://api.github.com/users/numenta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numenta/subscriptions","organizations_url":"https://api.github.com/users/numenta/orgs","repos_url":"https://api.github.com/users/numenta/repos","events_url":"https://api.github.com/users/numenta/events{/privacy}","received_events_url":"https://api.github.com/users/numenta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/numenta/numenta-apps","description":"HTM based applications and support libraries. Includes Grok for IT Analytics and Grok for Stocks (code name \"Taurus\").","fork":false,"url":"https://api.github.com/repos/numenta/numenta-apps","forks_url":"https://api.github.com/repos/numenta/numenta-apps/forks","keys_url":"https://api.github.com/repos/numenta/numenta-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numenta/numenta-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numenta/numenta-apps/teams","hooks_url":"https://api.github.com/repos/numenta/numenta-apps/hooks","issue_events_url":"https://api.github.com/repos/numenta/numenta-apps/issues/events{/number}","events_url":"https://api.github.com/repos/numenta/numenta-apps/events","assignees_url":"https://api.github.com/repos/numenta/numenta-apps/assignees{/user}","branches_url":"https://api.github.com/repos/numenta/numenta-apps/branches{/branch}","tags_url":"https://api.github.com/repos/numenta/numenta-apps/tags","blobs_url":"https://api.github.com/repos/numenta/numenta-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numenta/numenta-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numenta/numenta-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/numenta/numenta-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numenta/numenta-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/numenta/numenta-apps/languages","stargazers_url":"https://api.github.com/repos/numenta/numenta-apps/stargazers","contributors_url":"https://api.github.com/repos/numenta/numenta-apps/contributors","subscribers_url":"https://api.github.com/repos/numenta/numenta-apps/subscribers","subscription_url":"https://api.github.com/repos/numenta/numenta-apps/subscription","commits_url":"https://api.github.com/repos/numenta/numenta-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/numenta/numenta-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/numenta/numenta-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/numenta/numenta-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/numenta/numenta-apps/contents/{+path}","compare_url":"https://api.github.com/repos/numenta/numenta-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numenta/numenta-apps/merges","archive_url":"https://api.github.com/repos/numenta/numenta-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numenta/numenta-apps/downloads","issues_url":"https://api.github.com/repos/numenta/numenta-apps/issues{/number}","pulls_url":"https://api.github.com/repos/numenta/numenta-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/numenta/numenta-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/numenta/numenta-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numenta/numenta-apps/labels{/name}","releases_url":"https://api.github.com/repos/numenta/numenta-apps/releases{/id}","created_at":"2015-06-02T18:49:30Z","updated_at":"2015-08-22T08:10:28Z","pushed_at":"2015-08-22T16:35:38Z","git_url":"git://github.com/numenta/numenta-apps.git","ssh_url":"git@github.com:numenta/numenta-apps.git","clone_url":"https://github.com/numenta/numenta-apps.git","svn_url":"https://github.com/numenta/numenta-apps","homepage":"http://numenta.com","size":46199,"stargazers_count":51,"watchers_count":51,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":7,"forks":35,"open_issues":7,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/230"},"html":{"href":"https://github.com/numenta/numenta-apps/pull/230"},"issue":{"href":"https://api.github.com/repos/numenta/numenta-apps/issues/230"},"comments":{"href":"https://api.github.com/repos/numenta/numenta-apps/issues/230/comments"},"review_comments":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/230/comments"},"review_comment":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numenta/numenta-apps/pulls/230/commits"},"statuses":{"href":"https://api.github.com/repos/numenta/numenta-apps/statuses/a4dd91f498938e1e3f91ffad650914d858664a5e"}}}}