{"action":"created","comment":{"url":"https://api.github.com/repos/sot/mica/pulls/comments/103816338","pull_request_review_id":24618386,"id":103816338,"diff_hunk":"@@ -20,60 +22,197 @@\n \n DEFAULT_CONFIG = dict(dbi='sqlite',\n                       server=os.path.join(MICA_ARCHIVE, 'starcheck', 'starcheck.db3'),\n-                      mp_top_level='/data/mpcrit1/mplogs')\n+                      mp_top_level='/data/mpcrit1/mplogs',\n+                      timelines_db=dict(dbi='sqlite',\n+                                        server=os.path.join(os.environ['SKA'], 'data', 'cmd_states', 'cmd_states.db3')))\n FILES = dict(data_root=os.path.join(MICA_ARCHIVE, 'starcheck'),\n              touch_file=os.path.join(MICA_ARCHIVE, 'starcheck', \"starcheck_parser.touch\"),\n              sql_def='starcheck.sql')\n \n # this doesn't belong in starcheck\n-def get_timeline_at_date(date):\n-    aca_db = Ska.DBI.DBI(dbi='sybase', server='sybase', user='aca_read')\n-    return aca_db.fetchone(\n+def get_timeline_at_date(date, timelines_db=None):\n+    date = DateTime(date).date\n+    if timelines_db is None:\n+        timelines_db = Ska.DBI.DBI(**DEFAULT_CONFIG['timelines_db'])\n+    return timelines_db.fetchone(\n         \"select * from timeline_loads where datestop >= '%s' \"\n         \" and datestart <= '%s' and scs <= 130 order by datestart desc\"\n         % (date, date))\n \n-def get_mp_dir(obsid, config=None):\n+\n+def get_flickpix_mons(start=None, config=None):","path":"mica/starcheck/starcheck.py","position":36,"original_position":36,"commit_id":"5fb95af9d378f7df5fd6f0497ab6868ed30563cc","original_commit_id":"5fb95af9d378f7df5fd6f0497ab6868ed30563cc","user":{"login":"taldcroft","id":348089,"avatar_url":"https://avatars2.githubusercontent.com/u/348089?v=3","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"body":"This function will ultimately be a dependency of the flickering pixel project and will be used to update the list of already-run monitor windows.  It doesn't have to be made GRETA-ready for this PR but eventually yes.","created_at":"2017-03-01T23:25:28Z","updated_at":"2017-03-01T23:25:28Z","html_url":"https://github.com/sot/mica/pull/98#discussion_r103816338","pull_request_url":"https://api.github.com/repos/sot/mica/pulls/98","_links":{"self":{"href":"https://api.github.com/repos/sot/mica/pulls/comments/103816338"},"html":{"href":"https://github.com/sot/mica/pull/98#discussion_r103816338"},"pull_request":{"href":"https://api.github.com/repos/sot/mica/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/sot/mica/pulls/98","id":105644498,"html_url":"https://github.com/sot/mica/pull/98","diff_url":"https://github.com/sot/mica/pull/98.diff","patch_url":"https://github.com/sot/mica/pull/98.patch","issue_url":"https://api.github.com/repos/sot/mica/issues/98","number":98,"state":"open","locked":false,"title":"Improve catalog queries and fetches","user":{"login":"jeanconn","id":791508,"avatar_url":"https://avatars2.githubusercontent.com/u/791508?v=3","gravatar_id":"","url":"https://api.github.com/users/jeanconn","html_url":"https://github.com/jeanconn","followers_url":"https://api.github.com/users/jeanconn/followers","following_url":"https://api.github.com/users/jeanconn/following{/other_user}","gists_url":"https://api.github.com/users/jeanconn/gists{/gist_id}","starred_url":"https://api.github.com/users/jeanconn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeanconn/subscriptions","organizations_url":"https://api.github.com/users/jeanconn/orgs","repos_url":"https://api.github.com/users/jeanconn/repos","events_url":"https://api.github.com/users/jeanconn/events{/privacy}","received_events_url":"https://api.github.com/users/jeanconn/received_events","type":"User","site_admin":false},"body":"Improve reliability of catalog fetches by obsid.  Add methods for catalog fetches by date and a convenience to get information on likely flickering pixel monitor windows.","created_at":"2017-02-10T15:05:29Z","updated_at":"2017-03-01T23:25:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"999321f55536f4318e6c30a002c013ff59cdcffe","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sot/mica/pulls/98/commits","review_comments_url":"https://api.github.com/repos/sot/mica/pulls/98/comments","review_comment_url":"https://api.github.com/repos/sot/mica/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sot/mica/issues/98/comments","statuses_url":"https://api.github.com/repos/sot/mica/statuses/5fb95af9d378f7df5fd6f0497ab6868ed30563cc","head":{"label":"sot:improve_cat_fetch","ref":"improve_cat_fetch","sha":"5fb95af9d378f7df5fd6f0497ab6868ed30563cc","user":{"login":"sot","id":781587,"avatar_url":"https://avatars1.githubusercontent.com/u/781587?v=3","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"repo":{"id":3139571,"name":"mica","full_name":"sot/mica","owner":{"login":"sot","id":781587,"avatar_url":"https://avatars1.githubusercontent.com/u/781587?v=3","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sot/mica","description":"Microscope on Chandra aspect","fork":false,"url":"https://api.github.com/repos/sot/mica","forks_url":"https://api.github.com/repos/sot/mica/forks","keys_url":"https://api.github.com/repos/sot/mica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sot/mica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sot/mica/teams","hooks_url":"https://api.github.com/repos/sot/mica/hooks","issue_events_url":"https://api.github.com/repos/sot/mica/issues/events{/number}","events_url":"https://api.github.com/repos/sot/mica/events","assignees_url":"https://api.github.com/repos/sot/mica/assignees{/user}","branches_url":"https://api.github.com/repos/sot/mica/branches{/branch}","tags_url":"https://api.github.com/repos/sot/mica/tags","blobs_url":"https://api.github.com/repos/sot/mica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sot/mica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sot/mica/git/refs{/sha}","trees_url":"https://api.github.com/repos/sot/mica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sot/mica/statuses/{sha}","languages_url":"https://api.github.com/repos/sot/mica/languages","stargazers_url":"https://api.github.com/repos/sot/mica/stargazers","contributors_url":"https://api.github.com/repos/sot/mica/contributors","subscribers_url":"https://api.github.com/repos/sot/mica/subscribers","subscription_url":"https://api.github.com/repos/sot/mica/subscription","commits_url":"https://api.github.com/repos/sot/mica/commits{/sha}","git_commits_url":"https://api.github.com/repos/sot/mica/git/commits{/sha}","comments_url":"https://api.github.com/repos/sot/mica/comments{/number}","issue_comment_url":"https://api.github.com/repos/sot/mica/issues/comments{/number}","contents_url":"https://api.github.com/repos/sot/mica/contents/{+path}","compare_url":"https://api.github.com/repos/sot/mica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sot/mica/merges","archive_url":"https://api.github.com/repos/sot/mica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sot/mica/downloads","issues_url":"https://api.github.com/repos/sot/mica/issues{/number}","pulls_url":"https://api.github.com/repos/sot/mica/pulls{/number}","milestones_url":"https://api.github.com/repos/sot/mica/milestones{/number}","notifications_url":"https://api.github.com/repos/sot/mica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sot/mica/labels{/name}","releases_url":"https://api.github.com/repos/sot/mica/releases{/id}","deployments_url":"https://api.github.com/repos/sot/mica/deployments","created_at":"2012-01-09T19:58:08Z","updated_at":"2016-08-29T16:31:47Z","pushed_at":"2017-02-27T17:25:16Z","git_url":"git://github.com/sot/mica.git","ssh_url":"git@github.com:sot/mica.git","clone_url":"https://github.com/sot/mica.git","svn_url":"https://github.com/sot/mica","homepage":"http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/mica/","size":765,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":34,"forks":0,"open_issues":34,"watchers":3,"default_branch":"master"}},"base":{"label":"sot:master","ref":"master","sha":"477067c87aeaa81929f72da12b0ece3b9bdb0f75","user":{"login":"sot","id":781587,"avatar_url":"https://avatars1.githubusercontent.com/u/781587?v=3","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"repo":{"id":3139571,"name":"mica","full_name":"sot/mica","owner":{"login":"sot","id":781587,"avatar_url":"https://avatars1.githubusercontent.com/u/781587?v=3","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sot/mica","description":"Microscope on Chandra aspect","fork":false,"url":"https://api.github.com/repos/sot/mica","forks_url":"https://api.github.com/repos/sot/mica/forks","keys_url":"https://api.github.com/repos/sot/mica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sot/mica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sot/mica/teams","hooks_url":"https://api.github.com/repos/sot/mica/hooks","issue_events_url":"https://api.github.com/repos/sot/mica/issues/events{/number}","events_url":"https://api.github.com/repos/sot/mica/events","assignees_url":"https://api.github.com/repos/sot/mica/assignees{/user}","branches_url":"https://api.github.com/repos/sot/mica/branches{/branch}","tags_url":"https://api.github.com/repos/sot/mica/tags","blobs_url":"https://api.github.com/repos/sot/mica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sot/mica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sot/mica/git/refs{/sha}","trees_url":"https://api.github.com/repos/sot/mica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sot/mica/statuses/{sha}","languages_url":"https://api.github.com/repos/sot/mica/languages","stargazers_url":"https://api.github.com/repos/sot/mica/stargazers","contributors_url":"https://api.github.com/repos/sot/mica/contributors","subscribers_url":"https://api.github.com/repos/sot/mica/subscribers","subscription_url":"https://api.github.com/repos/sot/mica/subscription","commits_url":"https://api.github.com/repos/sot/mica/commits{/sha}","git_commits_url":"https://api.github.com/repos/sot/mica/git/commits{/sha}","comments_url":"https://api.github.com/repos/sot/mica/comments{/number}","issue_comment_url":"https://api.github.com/repos/sot/mica/issues/comments{/number}","contents_url":"https://api.github.com/repos/sot/mica/contents/{+path}","compare_url":"https://api.github.com/repos/sot/mica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sot/mica/merges","archive_url":"https://api.github.com/repos/sot/mica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sot/mica/downloads","issues_url":"https://api.github.com/repos/sot/mica/issues{/number}","pulls_url":"https://api.github.com/repos/sot/mica/pulls{/number}","milestones_url":"https://api.github.com/repos/sot/mica/milestones{/number}","notifications_url":"https://api.github.com/repos/sot/mica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sot/mica/labels{/name}","releases_url":"https://api.github.com/repos/sot/mica/releases{/id}","deployments_url":"https://api.github.com/repos/sot/mica/deployments","created_at":"2012-01-09T19:58:08Z","updated_at":"2016-08-29T16:31:47Z","pushed_at":"2017-02-27T17:25:16Z","git_url":"git://github.com/sot/mica.git","ssh_url":"git@github.com:sot/mica.git","clone_url":"https://github.com/sot/mica.git","svn_url":"https://github.com/sot/mica","homepage":"http://cxc.cfa.harvard.edu/mta/ASPECT/tool_doc/mica/","size":765,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":34,"forks":0,"open_issues":34,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sot/mica/pulls/98"},"html":{"href":"https://github.com/sot/mica/pull/98"},"issue":{"href":"https://api.github.com/repos/sot/mica/issues/98"},"comments":{"href":"https://api.github.com/repos/sot/mica/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/sot/mica/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/sot/mica/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sot/mica/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/sot/mica/statuses/5fb95af9d378f7df5fd6f0497ab6868ed30563cc"}}}}
{"actor":{"display_login":"taldcroft"}}