{"action":"created","comment":{"url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/comments/58258590","id":58258590,"diff_hunk":"@@ -55,40 +54,36 @@ def __del__(self):\n \n     @classmethod\n     def getCredDict(cls):\n-        \"\"\" Gets credentials dictionary \"\"\"\n-        return json.loads(open(cls.getCredFilePath(),\"r\").read())\n-\n-    @classmethod\n-    def getCredFilePath(cls):\n-        \"\"\"  Returns full path to credentials file \"\"\"\n-        path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\n-        dirName, filename = os.path.split(path)\n-        return os.path.join(dirName, \"credentials/\", cls.credFileName)\n-\n-    @staticmethod\n-    def getLogFilePath():\n-        \"\"\"  Returns full path to credentials file \"\"\"\n-        path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\n-        dirName, filename = os.path.split(path)\n-        return os.path.join(dirName, BaseInterface.logFileName)\n+        \"\"\" Return db credentials. \"\"\"\n+        credDict = {\n+            'username': CONFIG_DB['username'],\n+            'password': CONFIG_DB['password'],\n+            'host': CONFIG_DB['host'],\n+            'port': CONFIG_DB['port'],\n+            'dbBaseName': CONFIG_DB['base_db_name']\n+        }\n+        return credDict\n \n     @staticmethod\n     def logDbError(exc):\n-        file = open(BaseInterface.getLogFilePath(),\"a\")\n-        file.write(str(exc) + \", \")\n-        file.write(str(sys.exc_info()[0:1]) + \"\\n\")\n-        traceback.print_tb(sys.exc_info()[2],file=file)\n+        logFile = os.path.join(","path":"dataactcore/models/baseInterface.py","position":84,"original_position":84,"commit_id":"24cf12609b84347c721d4b742754c4ab525009cd","original_commit_id":"c1fdbee014b3a65ed630ec0cd41a62397a1dda3c","user":{"login":"jworcestBAH","id":11858333,"avatar_url":"https://avatars.githubusercontent.com/u/11858333?v=3","gravatar_id":"","url":"https://api.github.com/users/jworcestBAH","html_url":"https://github.com/jworcestBAH","followers_url":"https://api.github.com/users/jworcestBAH/followers","following_url":"https://api.github.com/users/jworcestBAH/following{/other_user}","gists_url":"https://api.github.com/users/jworcestBAH/gists{/gist_id}","starred_url":"https://api.github.com/users/jworcestBAH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jworcestBAH/subscriptions","organizations_url":"https://api.github.com/users/jworcestBAH/orgs","repos_url":"https://api.github.com/users/jworcestBAH/repos","events_url":"https://api.github.com/users/jworcestBAH/events{/privacy}","received_events_url":"https://api.github.com/users/jworcestBAH/received_events","type":"User","site_admin":false},"body":"This will break if someone sets use_logstash to true and does not specify a local path here.  We should either have this use logstash, change the comments in the config.yml to make the local path required, or refactor the single usage of this function in dataactbroker/handlers/interfaceHolder.py line 34 and remove this function.","created_at":"2016-04-01T19:53:41Z","updated_at":"2016-04-01T19:53:41Z","html_url":"https://github.com/fedspendingtransparency/data-act-core/pull/14#discussion_r58258590","pull_request_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/comments/58258590"},"html":{"href":"https://github.com/fedspendingtransparency/data-act-core/pull/14#discussion_r58258590"},"pull_request":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/14","id":64700736,"html_url":"https://github.com/fedspendingtransparency/data-act-core/pull/14","diff_url":"https://github.com/fedspendingtransparency/data-act-core/pull/14.diff","patch_url":"https://github.com/fedspendingtransparency/data-act-core/pull/14.patch","issue_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues/14","number":14,"state":"open","locked":false,"title":"Replace various config files with a single config","user":{"login":"bsweger","id":540544,"avatar_url":"https://avatars.githubusercontent.com/u/540544?v=3","gravatar_id":"","url":"https://api.github.com/users/bsweger","html_url":"https://github.com/bsweger","followers_url":"https://api.github.com/users/bsweger/followers","following_url":"https://api.github.com/users/bsweger/following{/other_user}","gists_url":"https://api.github.com/users/bsweger/gists{/gist_id}","starred_url":"https://api.github.com/users/bsweger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsweger/subscriptions","organizations_url":"https://api.github.com/users/bsweger/orgs","repos_url":"https://api.github.com/users/bsweger/repos","events_url":"https://api.github.com/users/bsweger/events{/privacy}","received_events_url":"https://api.github.com/users/bsweger/received_events","type":"User","site_admin":false},"body":"This is the re-factor for [DB-296](https://federal-spending-transparency.atlassian.net/browse/DB-296).\r\n\r\n* Switch config file to YAML to be more easily editable\r\n* Provide sample config file with explanation of the settings\r\n* Remove app init scripts that prompt for config settings\r\n* Code now gets config settings via a dataactcore.config import\r\n* Interfaces now get db names from config\r\n* Basic error-handling for user-provide config settings\r\n\r\nThere will be a subsequent PR that includes the corresponding doc changes. ","created_at":"2016-03-30T21:31:29Z","updated_at":"2016-04-01T19:53:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1127022d26af87553da99d82cee1771039a48f60","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/14/commits","review_comments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/14/comments","review_comment_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues/14/comments","statuses_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/statuses/24cf12609b84347c721d4b742754c4ab525009cd","head":{"label":"fedspendingtransparency:db-247-config","ref":"db-247-config","sha":"24cf12609b84347c721d4b742754c4ab525009cd","user":{"login":"fedspendingtransparency","id":8397762,"avatar_url":"https://avatars.githubusercontent.com/u/8397762?v=3","gravatar_id":"","url":"https://api.github.com/users/fedspendingtransparency","html_url":"https://github.com/fedspendingtransparency","followers_url":"https://api.github.com/users/fedspendingtransparency/followers","following_url":"https://api.github.com/users/fedspendingtransparency/following{/other_user}","gists_url":"https://api.github.com/users/fedspendingtransparency/gists{/gist_id}","starred_url":"https://api.github.com/users/fedspendingtransparency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedspendingtransparency/subscriptions","organizations_url":"https://api.github.com/users/fedspendingtransparency/orgs","repos_url":"https://api.github.com/users/fedspendingtransparency/repos","events_url":"https://api.github.com/users/fedspendingtransparency/events{/privacy}","received_events_url":"https://api.github.com/users/fedspendingtransparency/received_events","type":"Organization","site_admin":false},"repo":{"id":47700007,"name":"data-act-core","full_name":"fedspendingtransparency/data-act-core","owner":{"login":"fedspendingtransparency","id":8397762,"avatar_url":"https://avatars.githubusercontent.com/u/8397762?v=3","gravatar_id":"","url":"https://api.github.com/users/fedspendingtransparency","html_url":"https://github.com/fedspendingtransparency","followers_url":"https://api.github.com/users/fedspendingtransparency/followers","following_url":"https://api.github.com/users/fedspendingtransparency/following{/other_user}","gists_url":"https://api.github.com/users/fedspendingtransparency/gists{/gist_id}","starred_url":"https://api.github.com/users/fedspendingtransparency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedspendingtransparency/subscriptions","organizations_url":"https://api.github.com/users/fedspendingtransparency/orgs","repos_url":"https://api.github.com/users/fedspendingtransparency/repos","events_url":"https://api.github.com/users/fedspendingtransparency/events{/privacy}","received_events_url":"https://api.github.com/users/fedspendingtransparency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedspendingtransparency/data-act-core","description":"","fork":false,"url":"https://api.github.com/repos/fedspendingtransparency/data-act-core","forks_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/forks","keys_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/teams","hooks_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/hooks","issue_events_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues/events{/number}","events_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/events","assignees_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/assignees{/user}","branches_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/branches{/branch}","tags_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/tags","blobs_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/statuses/{sha}","languages_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/languages","stargazers_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/stargazers","contributors_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/contributors","subscribers_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/subscribers","subscription_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/subscription","commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/contents/{+path}","compare_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/merges","archive_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/downloads","issues_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues{/number}","pulls_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls{/number}","milestones_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/milestones{/number}","notifications_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/labels{/name}","releases_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/releases{/id}","deployments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/deployments","created_at":"2015-12-09T15:30:31Z","updated_at":"2016-03-01T03:17:41Z","pushed_at":"2016-04-01T19:23:28Z","git_url":"git://github.com/fedspendingtransparency/data-act-core.git","ssh_url":"git@github.com:fedspendingtransparency/data-act-core.git","clone_url":"https://github.com/fedspendingtransparency/data-act-core.git","svn_url":"https://github.com/fedspendingtransparency/data-act-core","homepage":null,"size":204,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"fedspendingtransparency:development","ref":"development","sha":"7c4120da31ebbbfd0b3075e2cbbcc1f20ff1caf5","user":{"login":"fedspendingtransparency","id":8397762,"avatar_url":"https://avatars.githubusercontent.com/u/8397762?v=3","gravatar_id":"","url":"https://api.github.com/users/fedspendingtransparency","html_url":"https://github.com/fedspendingtransparency","followers_url":"https://api.github.com/users/fedspendingtransparency/followers","following_url":"https://api.github.com/users/fedspendingtransparency/following{/other_user}","gists_url":"https://api.github.com/users/fedspendingtransparency/gists{/gist_id}","starred_url":"https://api.github.com/users/fedspendingtransparency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedspendingtransparency/subscriptions","organizations_url":"https://api.github.com/users/fedspendingtransparency/orgs","repos_url":"https://api.github.com/users/fedspendingtransparency/repos","events_url":"https://api.github.com/users/fedspendingtransparency/events{/privacy}","received_events_url":"https://api.github.com/users/fedspendingtransparency/received_events","type":"Organization","site_admin":false},"repo":{"id":47700007,"name":"data-act-core","full_name":"fedspendingtransparency/data-act-core","owner":{"login":"fedspendingtransparency","id":8397762,"avatar_url":"https://avatars.githubusercontent.com/u/8397762?v=3","gravatar_id":"","url":"https://api.github.com/users/fedspendingtransparency","html_url":"https://github.com/fedspendingtransparency","followers_url":"https://api.github.com/users/fedspendingtransparency/followers","following_url":"https://api.github.com/users/fedspendingtransparency/following{/other_user}","gists_url":"https://api.github.com/users/fedspendingtransparency/gists{/gist_id}","starred_url":"https://api.github.com/users/fedspendingtransparency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedspendingtransparency/subscriptions","organizations_url":"https://api.github.com/users/fedspendingtransparency/orgs","repos_url":"https://api.github.com/users/fedspendingtransparency/repos","events_url":"https://api.github.com/users/fedspendingtransparency/events{/privacy}","received_events_url":"https://api.github.com/users/fedspendingtransparency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedspendingtransparency/data-act-core","description":"","fork":false,"url":"https://api.github.com/repos/fedspendingtransparency/data-act-core","forks_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/forks","keys_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/teams","hooks_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/hooks","issue_events_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues/events{/number}","events_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/events","assignees_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/assignees{/user}","branches_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/branches{/branch}","tags_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/tags","blobs_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/statuses/{sha}","languages_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/languages","stargazers_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/stargazers","contributors_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/contributors","subscribers_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/subscribers","subscription_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/subscription","commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/contents/{+path}","compare_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/merges","archive_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/downloads","issues_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues{/number}","pulls_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls{/number}","milestones_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/milestones{/number}","notifications_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/labels{/name}","releases_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/releases{/id}","deployments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-core/deployments","created_at":"2015-12-09T15:30:31Z","updated_at":"2016-03-01T03:17:41Z","pushed_at":"2016-04-01T19:23:28Z","git_url":"git://github.com/fedspendingtransparency/data-act-core.git","ssh_url":"git@github.com:fedspendingtransparency/data-act-core.git","clone_url":"https://github.com/fedspendingtransparency/data-act-core.git","svn_url":"https://github.com/fedspendingtransparency/data-act-core","homepage":null,"size":204,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/14"},"html":{"href":"https://github.com/fedspendingtransparency/data-act-core/pull/14"},"issue":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues/14"},"comments":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-core/statuses/24cf12609b84347c721d4b742754c4ab525009cd"}}}}