{"action":"created","comment":{"url":"https://api.github.com/repos/hpcugent/vsc-base/pulls/comments/59691599","id":59691599,"diff_hunk":"@@ -101,6 +174,13 @@\n \n DEFAULT_UDP_PORT = 5005\n \n+# poor man's enum","path":"lib/vsc/utils/fancylogger.py","position":84,"original_position":84,"commit_id":"9a3f71624225603e0ca2fc10f167eadc5a0cc7e6","original_commit_id":"a13df176a9c103c9a08b301cb50770514198503c","user":{"login":"riccardomurri","id":447228,"avatar_url":"https://avatars.githubusercontent.com/u/447228?v=3","gravatar_id":"","url":"https://api.github.com/users/riccardomurri","html_url":"https://github.com/riccardomurri","followers_url":"https://api.github.com/users/riccardomurri/followers","following_url":"https://api.github.com/users/riccardomurri/following{/other_user}","gists_url":"https://api.github.com/users/riccardomurri/gists{/gist_id}","starred_url":"https://api.github.com/users/riccardomurri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riccardomurri/subscriptions","organizations_url":"https://api.github.com/users/riccardomurri/orgs","repos_url":"https://api.github.com/users/riccardomurri/repos","events_url":"https://api.github.com/users/riccardomurri/events{/privacy}","received_events_url":"https://api.github.com/users/riccardomurri/received_events","type":"User","site_admin":false},"body":"> how is the code below an enum instead of a namedtuple?\r\n\r\nhttp://stackoverflow.com/a/1695250/459543\r\n\r\nthe (semantic) difference being that a namedtuple has independent fields which can be separately assigned, whereas an enum is just a bunch of constants","created_at":"2016-04-14T10:04:04Z","updated_at":"2016-04-14T10:04:04Z","html_url":"https://github.com/hpcugent/vsc-base/pull/225#discussion_r59691599","pull_request_url":"https://api.github.com/repos/hpcugent/vsc-base/pulls/225","_links":{"self":{"href":"https://api.github.com/repos/hpcugent/vsc-base/pulls/comments/59691599"},"html":{"href":"https://github.com/hpcugent/vsc-base/pull/225#discussion_r59691599"},"pull_request":{"href":"https://api.github.com/repos/hpcugent/vsc-base/pulls/225"}}},"pull_request":{"url":"https://api.github.com/repos/hpcugent/vsc-base/pulls/225","id":64164277,"html_url":"https://github.com/hpcugent/vsc-base/pull/225","diff_url":"https://github.com/hpcugent/vsc-base/pull/225.diff","patch_url":"https://github.com/hpcugent/vsc-base/pull/225.patch","issue_url":"https://api.github.com/repos/hpcugent/vsc-base/issues/225","number":225,"state":"open","locked":false,"title":"Add support for colorization of log messages sent to the screen.","user":{"login":"riccardomurri","id":447228,"avatar_url":"https://avatars.githubusercontent.com/u/447228?v=3","gravatar_id":"","url":"https://api.github.com/users/riccardomurri","html_url":"https://github.com/riccardomurri","followers_url":"https://api.github.com/users/riccardomurri/followers","following_url":"https://api.github.com/users/riccardomurri/following{/other_user}","gists_url":"https://api.github.com/users/riccardomurri/gists{/gist_id}","starred_url":"https://api.github.com/users/riccardomurri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riccardomurri/subscriptions","organizations_url":"https://api.github.com/users/riccardomurri/orgs","repos_url":"https://api.github.com/users/riccardomurri/repos","events_url":"https://api.github.com/users/riccardomurri/events{/privacy}","received_events_url":"https://api.github.com/users/riccardomurri/received_events","type":"User","site_admin":false},"body":"The support depends on the external modules `coloredlogs` and\r\n`humanfriendly`; if they are not available, logs will not be colorized\r\nno matter what.\r\n\r\nAn additional option to `fancylogger.logToScreen()` allows turning log\r\ncolorization depending on terminal capabilities, or on/off unconditionally.\r\n\r\n**Note that this makes EasyBuild logs colored by default!**","created_at":"2016-03-25T13:56:38Z","updated_at":"2016-04-14T10:04:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4130159e3e3270bfb844f2073037760a7c20bf77","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcugent/vsc-base/pulls/225/commits","review_comments_url":"https://api.github.com/repos/hpcugent/vsc-base/pulls/225/comments","review_comment_url":"https://api.github.com/repos/hpcugent/vsc-base/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hpcugent/vsc-base/issues/225/comments","statuses_url":"https://api.github.com/repos/hpcugent/vsc-base/statuses/9a3f71624225603e0ca2fc10f167eadc5a0cc7e6","head":{"label":"riccardomurri:coloredlogs","ref":"coloredlogs","sha":"9a3f71624225603e0ca2fc10f167eadc5a0cc7e6","user":{"login":"riccardomurri","id":447228,"avatar_url":"https://avatars.githubusercontent.com/u/447228?v=3","gravatar_id":"","url":"https://api.github.com/users/riccardomurri","html_url":"https://github.com/riccardomurri","followers_url":"https://api.github.com/users/riccardomurri/followers","following_url":"https://api.github.com/users/riccardomurri/following{/other_user}","gists_url":"https://api.github.com/users/riccardomurri/gists{/gist_id}","starred_url":"https://api.github.com/users/riccardomurri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riccardomurri/subscriptions","organizations_url":"https://api.github.com/users/riccardomurri/orgs","repos_url":"https://api.github.com/users/riccardomurri/repos","events_url":"https://api.github.com/users/riccardomurri/events{/privacy}","received_events_url":"https://api.github.com/users/riccardomurri/received_events","type":"User","site_admin":false},"repo":{"id":54719926,"name":"vsc-base","full_name":"riccardomurri/vsc-base","owner":{"login":"riccardomurri","id":447228,"avatar_url":"https://avatars.githubusercontent.com/u/447228?v=3","gravatar_id":"","url":"https://api.github.com/users/riccardomurri","html_url":"https://github.com/riccardomurri","followers_url":"https://api.github.com/users/riccardomurri/followers","following_url":"https://api.github.com/users/riccardomurri/following{/other_user}","gists_url":"https://api.github.com/users/riccardomurri/gists{/gist_id}","starred_url":"https://api.github.com/users/riccardomurri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riccardomurri/subscriptions","organizations_url":"https://api.github.com/users/riccardomurri/orgs","repos_url":"https://api.github.com/users/riccardomurri/repos","events_url":"https://api.github.com/users/riccardomurri/events{/privacy}","received_events_url":"https://api.github.com/users/riccardomurri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/riccardomurri/vsc-base","description":"Basic Python libraries used by UGent's HPC group","fork":true,"url":"https://api.github.com/repos/riccardomurri/vsc-base","forks_url":"https://api.github.com/repos/riccardomurri/vsc-base/forks","keys_url":"https://api.github.com/repos/riccardomurri/vsc-base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riccardomurri/vsc-base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riccardomurri/vsc-base/teams","hooks_url":"https://api.github.com/repos/riccardomurri/vsc-base/hooks","issue_events_url":"https://api.github.com/repos/riccardomurri/vsc-base/issues/events{/number}","events_url":"https://api.github.com/repos/riccardomurri/vsc-base/events","assignees_url":"https://api.github.com/repos/riccardomurri/vsc-base/assignees{/user}","branches_url":"https://api.github.com/repos/riccardomurri/vsc-base/branches{/branch}","tags_url":"https://api.github.com/repos/riccardomurri/vsc-base/tags","blobs_url":"https://api.github.com/repos/riccardomurri/vsc-base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riccardomurri/vsc-base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riccardomurri/vsc-base/git/refs{/sha}","trees_url":"https://api.github.com/repos/riccardomurri/vsc-base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riccardomurri/vsc-base/statuses/{sha}","languages_url":"https://api.github.com/repos/riccardomurri/vsc-base/languages","stargazers_url":"https://api.github.com/repos/riccardomurri/vsc-base/stargazers","contributors_url":"https://api.github.com/repos/riccardomurri/vsc-base/contributors","subscribers_url":"https://api.github.com/repos/riccardomurri/vsc-base/subscribers","subscription_url":"https://api.github.com/repos/riccardomurri/vsc-base/subscription","commits_url":"https://api.github.com/repos/riccardomurri/vsc-base/commits{/sha}","git_commits_url":"https://api.github.com/repos/riccardomurri/vsc-base/git/commits{/sha}","comments_url":"https://api.github.com/repos/riccardomurri/vsc-base/comments{/number}","issue_comment_url":"https://api.github.com/repos/riccardomurri/vsc-base/issues/comments{/number}","contents_url":"https://api.github.com/repos/riccardomurri/vsc-base/contents/{+path}","compare_url":"https://api.github.com/repos/riccardomurri/vsc-base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riccardomurri/vsc-base/merges","archive_url":"https://api.github.com/repos/riccardomurri/vsc-base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riccardomurri/vsc-base/downloads","issues_url":"https://api.github.com/repos/riccardomurri/vsc-base/issues{/number}","pulls_url":"https://api.github.com/repos/riccardomurri/vsc-base/pulls{/number}","milestones_url":"https://api.github.com/repos/riccardomurri/vsc-base/milestones{/number}","notifications_url":"https://api.github.com/repos/riccardomurri/vsc-base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riccardomurri/vsc-base/labels{/name}","releases_url":"https://api.github.com/repos/riccardomurri/vsc-base/releases{/id}","deployments_url":"https://api.github.com/repos/riccardomurri/vsc-base/deployments","created_at":"2016-03-25T13:22:19Z","updated_at":"2016-03-25T13:22:20Z","pushed_at":"2016-04-14T09:23:48Z","git_url":"git://github.com/riccardomurri/vsc-base.git","ssh_url":"git@github.com:riccardomurri/vsc-base.git","clone_url":"https://github.com/riccardomurri/vsc-base.git","svn_url":"https://github.com/riccardomurri/vsc-base","homepage":null,"size":1240,"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":"hpcugent:master","ref":"master","sha":"0cc76b2d5412fd5eecffeda17b6c966e0be34f74","user":{"login":"hpcugent","id":1515263,"avatar_url":"https://avatars.githubusercontent.com/u/1515263?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcugent","html_url":"https://github.com/hpcugent","followers_url":"https://api.github.com/users/hpcugent/followers","following_url":"https://api.github.com/users/hpcugent/following{/other_user}","gists_url":"https://api.github.com/users/hpcugent/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcugent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcugent/subscriptions","organizations_url":"https://api.github.com/users/hpcugent/orgs","repos_url":"https://api.github.com/users/hpcugent/repos","events_url":"https://api.github.com/users/hpcugent/events{/privacy}","received_events_url":"https://api.github.com/users/hpcugent/received_events","type":"Organization","site_admin":false},"repo":{"id":7765704,"name":"vsc-base","full_name":"hpcugent/vsc-base","owner":{"login":"hpcugent","id":1515263,"avatar_url":"https://avatars.githubusercontent.com/u/1515263?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcugent","html_url":"https://github.com/hpcugent","followers_url":"https://api.github.com/users/hpcugent/followers","following_url":"https://api.github.com/users/hpcugent/following{/other_user}","gists_url":"https://api.github.com/users/hpcugent/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcugent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcugent/subscriptions","organizations_url":"https://api.github.com/users/hpcugent/orgs","repos_url":"https://api.github.com/users/hpcugent/repos","events_url":"https://api.github.com/users/hpcugent/events{/privacy}","received_events_url":"https://api.github.com/users/hpcugent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcugent/vsc-base","description":"Basic Python libraries used by UGent's HPC group","fork":false,"url":"https://api.github.com/repos/hpcugent/vsc-base","forks_url":"https://api.github.com/repos/hpcugent/vsc-base/forks","keys_url":"https://api.github.com/repos/hpcugent/vsc-base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcugent/vsc-base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcugent/vsc-base/teams","hooks_url":"https://api.github.com/repos/hpcugent/vsc-base/hooks","issue_events_url":"https://api.github.com/repos/hpcugent/vsc-base/issues/events{/number}","events_url":"https://api.github.com/repos/hpcugent/vsc-base/events","assignees_url":"https://api.github.com/repos/hpcugent/vsc-base/assignees{/user}","branches_url":"https://api.github.com/repos/hpcugent/vsc-base/branches{/branch}","tags_url":"https://api.github.com/repos/hpcugent/vsc-base/tags","blobs_url":"https://api.github.com/repos/hpcugent/vsc-base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcugent/vsc-base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcugent/vsc-base/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcugent/vsc-base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcugent/vsc-base/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcugent/vsc-base/languages","stargazers_url":"https://api.github.com/repos/hpcugent/vsc-base/stargazers","contributors_url":"https://api.github.com/repos/hpcugent/vsc-base/contributors","subscribers_url":"https://api.github.com/repos/hpcugent/vsc-base/subscribers","subscription_url":"https://api.github.com/repos/hpcugent/vsc-base/subscription","commits_url":"https://api.github.com/repos/hpcugent/vsc-base/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcugent/vsc-base/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcugent/vsc-base/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcugent/vsc-base/issues/comments{/number}","contents_url":"https://api.github.com/repos/hpcugent/vsc-base/contents/{+path}","compare_url":"https://api.github.com/repos/hpcugent/vsc-base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcugent/vsc-base/merges","archive_url":"https://api.github.com/repos/hpcugent/vsc-base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcugent/vsc-base/downloads","issues_url":"https://api.github.com/repos/hpcugent/vsc-base/issues{/number}","pulls_url":"https://api.github.com/repos/hpcugent/vsc-base/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcugent/vsc-base/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcugent/vsc-base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcugent/vsc-base/labels{/name}","releases_url":"https://api.github.com/repos/hpcugent/vsc-base/releases{/id}","deployments_url":"https://api.github.com/repos/hpcugent/vsc-base/deployments","created_at":"2013-01-23T01:51:31Z","updated_at":"2016-02-10T11:05:56Z","pushed_at":"2016-04-14T09:23:48Z","git_url":"git://github.com/hpcugent/vsc-base.git","ssh_url":"git@github.com:hpcugent/vsc-base.git","clone_url":"https://github.com/hpcugent/vsc-base.git","svn_url":"https://github.com/hpcugent/vsc-base","homepage":null,"size":1313,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":31,"forks":35,"open_issues":31,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcugent/vsc-base/pulls/225"},"html":{"href":"https://github.com/hpcugent/vsc-base/pull/225"},"issue":{"href":"https://api.github.com/repos/hpcugent/vsc-base/issues/225"},"comments":{"href":"https://api.github.com/repos/hpcugent/vsc-base/issues/225/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcugent/vsc-base/pulls/225/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcugent/vsc-base/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hpcugent/vsc-base/pulls/225/commits"},"statuses":{"href":"https://api.github.com/repos/hpcugent/vsc-base/statuses/9a3f71624225603e0ca2fc10f167eadc5a0cc7e6"}}}}