{"action":"created","comment":{"url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/comments/45714167","id":45714167,"diff_hunk":"@@ -39,13 +42,19 @@ class JobStatus(ChoicesEnum):\n \n \n class ConversionProgress(ChoicesEnum, MostSignificantEnumMixin):\n-    # Attention: We rely on the definition order for _precedence_list() below.\n-    ERROR = 'error'\n-    NEW = 'new'\n-    RECEIVED = 'received'\n-    STARTED = 'started'\n-    SUCCESSFUL = 'successful'\n-\n-    @staticmethod\n-    def _precedence_list():\n-        return list(ConversionProgress)\n+    ERROR = 'error', -1\n+    NEW = 'new', 0\n+    RECEIVED = 'received', 1\n+    STARTED = 'started', 2\n+    SUCCESSFUL = 'successful', 3\n+\n+    def __init__(self, unique_name, precedence):\n+        self.technical_representation = unique_name\n+        self.human_readable_name = unique_name\n+        self._precedence = precedence\n+\n+        # Allow lookup by unique_name:\n+        type(self)._value2member_map_[unique_name] = self","path":"conversion_service/shared/__init__.py","position":59,"original_position":59,"commit_id":"fc2e2a213eed20644f8c500d0d5009dc2cd74e0c","original_commit_id":"fc2e2a213eed20644f8c500d0d5009dc2cd74e0c","user":{"login":"hixi","id":97119,"avatar_url":"https://avatars.githubusercontent.com/u/97119?v=3","gravatar_id":"","url":"https://api.github.com/users/hixi","html_url":"https://github.com/hixi","followers_url":"https://api.github.com/users/hixi/followers","following_url":"https://api.github.com/users/hixi/following{/other_user}","gists_url":"https://api.github.com/users/hixi/gists{/gist_id}","starred_url":"https://api.github.com/users/hixi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hixi/subscriptions","organizations_url":"https://api.github.com/users/hixi/orgs","repos_url":"https://api.github.com/users/hixi/repos","events_url":"https://api.github.com/users/hixi/events{/privacy}","received_events_url":"https://api.github.com/users/hixi/received_events","type":"User","site_admin":false},"body":"Yes, sticking to augmenting `_value2member_map_` is better, IMHO.","created_at":"2015-11-24T09:47:22Z","updated_at":"2015-11-24T09:47:22Z","html_url":"https://github.com/geometalab/osmaxx-postgis-conversion/pull/50#discussion_r45714167","pull_request_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/comments/45714167"},"html":{"href":"https://github.com/geometalab/osmaxx-postgis-conversion/pull/50#discussion_r45714167"},"pull_request":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/50","id":51524079,"html_url":"https://github.com/geometalab/osmaxx-postgis-conversion/pull/50","diff_url":"https://github.com/geometalab/osmaxx-postgis-conversion/pull/50.diff","patch_url":"https://github.com/geometalab/osmaxx-postgis-conversion/pull/50.patch","issue_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues/50","number":50,"state":"closed","locked":false,"title":"use explicit precedence values again","user":{"login":"das-g","id":97746,"avatar_url":"https://avatars.githubusercontent.com/u/97746?v=3","gravatar_id":"","url":"https://api.github.com/users/das-g","html_url":"https://github.com/das-g","followers_url":"https://api.github.com/users/das-g/followers","following_url":"https://api.github.com/users/das-g/following{/other_user}","gists_url":"https://api.github.com/users/das-g/gists{/gist_id}","starred_url":"https://api.github.com/users/das-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/das-g/subscriptions","organizations_url":"https://api.github.com/users/das-g/orgs","repos_url":"https://api.github.com/users/das-g/repos","events_url":"https://api.github.com/users/das-g/events{/privacy}","received_events_url":"https://api.github.com/users/das-g/received_events","type":"User","site_admin":false},"body":"also, distinguish between choice representation (on db and in html forms) and human readable choice name\r\n\r\nreviewed by:\r\n- [x] @hixi \r\n- [ ] @wasabideveloper ","created_at":"2015-11-23T13:42:11Z","updated_at":"2015-11-24T09:47:22Z","closed_at":"2015-11-24T09:14:39Z","merged_at":"2015-11-24T09:14:39Z","merge_commit_sha":"6b0c55ce4e05059439c45c522b633b4b9eab7843","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/50/commits","review_comments_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/50/comments","review_comment_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues/50/comments","statuses_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/statuses/fc2e2a213eed20644f8c500d0d5009dc2cd74e0c","head":{"label":"geometalab:feature/cleaner_choices_enums","ref":"feature/cleaner_choices_enums","sha":"fc2e2a213eed20644f8c500d0d5009dc2cd74e0c","user":{"login":"geometalab","id":8266374,"avatar_url":"https://avatars.githubusercontent.com/u/8266374?v=3","gravatar_id":"","url":"https://api.github.com/users/geometalab","html_url":"https://github.com/geometalab","followers_url":"https://api.github.com/users/geometalab/followers","following_url":"https://api.github.com/users/geometalab/following{/other_user}","gists_url":"https://api.github.com/users/geometalab/gists{/gist_id}","starred_url":"https://api.github.com/users/geometalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geometalab/subscriptions","organizations_url":"https://api.github.com/users/geometalab/orgs","repos_url":"https://api.github.com/users/geometalab/repos","events_url":"https://api.github.com/users/geometalab/events{/privacy}","received_events_url":"https://api.github.com/users/geometalab/received_events","type":"Organization","site_admin":false},"repo":{"id":36354077,"name":"osmaxx-postgis-conversion","full_name":"geometalab/osmaxx-postgis-conversion","owner":{"login":"geometalab","id":8266374,"avatar_url":"https://avatars.githubusercontent.com/u/8266374?v=3","gravatar_id":"","url":"https://api.github.com/users/geometalab","html_url":"https://github.com/geometalab","followers_url":"https://api.github.com/users/geometalab/followers","following_url":"https://api.github.com/users/geometalab/following{/other_user}","gists_url":"https://api.github.com/users/geometalab/gists{/gist_id}","starred_url":"https://api.github.com/users/geometalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geometalab/subscriptions","organizations_url":"https://api.github.com/users/geometalab/orgs","repos_url":"https://api.github.com/users/geometalab/repos","events_url":"https://api.github.com/users/geometalab/events{/privacy}","received_events_url":"https://api.github.com/users/geometalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geometalab/osmaxx-postgis-conversion","description":"Downloads OSM data, imports it into PostgreSQL, transforms it, exports it into various formats","fork":false,"url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion","forks_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/forks","keys_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/teams","hooks_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/hooks","issue_events_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues/events{/number}","events_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/events","assignees_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/assignees{/user}","branches_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/branches{/branch}","tags_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/tags","blobs_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/refs{/sha}","trees_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/statuses/{sha}","languages_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/languages","stargazers_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/stargazers","contributors_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/contributors","subscribers_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/subscribers","subscription_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/subscription","commits_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/commits{/sha}","git_commits_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/commits{/sha}","comments_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/comments{/number}","issue_comment_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues/comments{/number}","contents_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/contents/{+path}","compare_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/merges","archive_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/downloads","issues_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues{/number}","pulls_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls{/number}","milestones_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/milestones{/number}","notifications_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/labels{/name}","releases_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/releases{/id}","created_at":"2015-05-27T08:35:02Z","updated_at":"2015-11-13T18:23:20Z","pushed_at":"2015-11-24T09:32:29Z","git_url":"git://github.com/geometalab/osmaxx-postgis-conversion.git","ssh_url":"git@github.com:geometalab/osmaxx-postgis-conversion.git","clone_url":"https://github.com/geometalab/osmaxx-postgis-conversion.git","svn_url":"https://github.com/geometalab/osmaxx-postgis-conversion","homepage":null,"size":1704,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"develop"}},"base":{"label":"geometalab:develop","ref":"develop","sha":"aa4f7f1738beadad7cb5bbb272f1c4b248c6ce98","user":{"login":"geometalab","id":8266374,"avatar_url":"https://avatars.githubusercontent.com/u/8266374?v=3","gravatar_id":"","url":"https://api.github.com/users/geometalab","html_url":"https://github.com/geometalab","followers_url":"https://api.github.com/users/geometalab/followers","following_url":"https://api.github.com/users/geometalab/following{/other_user}","gists_url":"https://api.github.com/users/geometalab/gists{/gist_id}","starred_url":"https://api.github.com/users/geometalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geometalab/subscriptions","organizations_url":"https://api.github.com/users/geometalab/orgs","repos_url":"https://api.github.com/users/geometalab/repos","events_url":"https://api.github.com/users/geometalab/events{/privacy}","received_events_url":"https://api.github.com/users/geometalab/received_events","type":"Organization","site_admin":false},"repo":{"id":36354077,"name":"osmaxx-postgis-conversion","full_name":"geometalab/osmaxx-postgis-conversion","owner":{"login":"geometalab","id":8266374,"avatar_url":"https://avatars.githubusercontent.com/u/8266374?v=3","gravatar_id":"","url":"https://api.github.com/users/geometalab","html_url":"https://github.com/geometalab","followers_url":"https://api.github.com/users/geometalab/followers","following_url":"https://api.github.com/users/geometalab/following{/other_user}","gists_url":"https://api.github.com/users/geometalab/gists{/gist_id}","starred_url":"https://api.github.com/users/geometalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geometalab/subscriptions","organizations_url":"https://api.github.com/users/geometalab/orgs","repos_url":"https://api.github.com/users/geometalab/repos","events_url":"https://api.github.com/users/geometalab/events{/privacy}","received_events_url":"https://api.github.com/users/geometalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geometalab/osmaxx-postgis-conversion","description":"Downloads OSM data, imports it into PostgreSQL, transforms it, exports it into various formats","fork":false,"url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion","forks_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/forks","keys_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/teams","hooks_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/hooks","issue_events_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues/events{/number}","events_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/events","assignees_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/assignees{/user}","branches_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/branches{/branch}","tags_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/tags","blobs_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/refs{/sha}","trees_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/statuses/{sha}","languages_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/languages","stargazers_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/stargazers","contributors_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/contributors","subscribers_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/subscribers","subscription_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/subscription","commits_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/commits{/sha}","git_commits_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/git/commits{/sha}","comments_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/comments{/number}","issue_comment_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues/comments{/number}","contents_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/contents/{+path}","compare_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/merges","archive_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/downloads","issues_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues{/number}","pulls_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls{/number}","milestones_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/milestones{/number}","notifications_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/labels{/name}","releases_url":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/releases{/id}","created_at":"2015-05-27T08:35:02Z","updated_at":"2015-11-13T18:23:20Z","pushed_at":"2015-11-24T09:32:29Z","git_url":"git://github.com/geometalab/osmaxx-postgis-conversion.git","ssh_url":"git@github.com:geometalab/osmaxx-postgis-conversion.git","clone_url":"https://github.com/geometalab/osmaxx-postgis-conversion.git","svn_url":"https://github.com/geometalab/osmaxx-postgis-conversion","homepage":null,"size":1704,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/50"},"html":{"href":"https://github.com/geometalab/osmaxx-postgis-conversion/pull/50"},"issue":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues/50"},"comments":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/geometalab/osmaxx-postgis-conversion/statuses/fc2e2a213eed20644f8c500d0d5009dc2cd74e0c"}}}}