{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/comments/47540685","id":47540685,"diff_hunk":"@@ -388,3 +388,73 @@ def transform_discussions_contributed(self, _obj, value):\n \n     def transform_videos_viewed(self, _obj, value):\n         return self.default_if_none(value, 0)\n+\n+\n+class DateRangeSerializer(serializers.Serializer):\n+    start = serializers.DateTimeField(source='start_date', format=settings.DATE_FORMAT)\n+    end = serializers.DateTimeField(source='end_date', format=settings.DATE_FORMAT)\n+\n+\n+class EnagementRangeMetricSerializer(serializers.Serializer):\n+    \"\"\"\n+    Serializes ModuleEngagementMetricRanges (low_range and high_range) into\n+    the below_average, average, above_average ranges represented as arrays.\n+    \"\"\"\n+    below_average = serializers.SerializerMethodField('get_below_average_range')\n+    average = serializers.SerializerMethodField('get_average_range')\n+    above_average = serializers.SerializerMethodField('get_above_average_range')\n+\n+    def get_average_range(self, obj):\n+        metric_range = [\n+            obj['low_range'].high_value if obj['low_range'] else None,","path":"analytics_data_api/v0/serializers.py","position":22,"original_position":22,"commit_id":"de180d93021a578711d0fe93901815eb35d8a677","original_commit_id":"de180d93021a578711d0fe93901815eb35d8a677","user":{"login":"dan-f","id":2146312,"avatar_url":"https://avatars.githubusercontent.com/u/2146312?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-f","html_url":"https://github.com/dan-f","followers_url":"https://api.github.com/users/dan-f/followers","following_url":"https://api.github.com/users/dan-f/following{/other_user}","gists_url":"https://api.github.com/users/dan-f/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-f/subscriptions","organizations_url":"https://api.github.com/users/dan-f/orgs","repos_url":"https://api.github.com/users/dan-f/repos","events_url":"https://api.github.com/users/dan-f/events{/privacy}","received_events_url":"https://api.github.com/users/dan-f/received_events","type":"User","site_admin":false},"body":"Can we always assume that the object has both `low_value` and `high_value` attributes? what about the case of an unbounded (i.e. infinite) value?","created_at":"2015-12-14T19:00:02Z","updated_at":"2015-12-14T19:00:02Z","html_url":"https://github.com/edx/edx-analytics-data-api/pull/94#discussion_r47540685","pull_request_url":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/comments/47540685"},"html":{"href":"https://github.com/edx/edx-analytics-data-api/pull/94#discussion_r47540685"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/94","id":53428905,"html_url":"https://github.com/edx/edx-analytics-data-api/pull/94","diff_url":"https://github.com/edx/edx-analytics-data-api/pull/94.diff","patch_url":"https://github.com/edx/edx-analytics-data-api/pull/94.patch","issue_url":"https://api.github.com/repos/edx/edx-analytics-data-api/issues/94","number":94,"state":"open","locked":false,"title":"Added learner course metadata","user":{"login":"dsjen","id":5265058,"avatar_url":"https://avatars.githubusercontent.com/u/5265058?v=3","gravatar_id":"","url":"https://api.github.com/users/dsjen","html_url":"https://github.com/dsjen","followers_url":"https://api.github.com/users/dsjen/followers","following_url":"https://api.github.com/users/dsjen/following{/other_user}","gists_url":"https://api.github.com/users/dsjen/gists{/gist_id}","starred_url":"https://api.github.com/users/dsjen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsjen/subscriptions","organizations_url":"https://api.github.com/users/dsjen/orgs","repos_url":"https://api.github.com/users/dsjen/repos","events_url":"https://api.github.com/users/dsjen/events{/privacy}","received_events_url":"https://api.github.com/users/dsjen/received_events","type":"User","site_admin":false},"body":"@dan-f -- here's a PR for our work on the learner course metadata endpoint.  There is a pylint error that I'm looking into fixes.  I'll update when that is fixed.","created_at":"2015-12-11T18:46:21Z","updated_at":"2015-12-14T19:00:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36692a2df6997440cf862d8f601b2f4652f27e8b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/94/commits","review_comments_url":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/94/comments","review_comment_url":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-analytics-data-api/issues/94/comments","statuses_url":"https://api.github.com/repos/edx/edx-analytics-data-api/statuses/de180d93021a578711d0fe93901815eb35d8a677","head":{"label":"edx:dsjen/learner-course-metadata","ref":"dsjen/learner-course-metadata","sha":"de180d93021a578711d0fe93901815eb35d8a677","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":20415476,"name":"edx-analytics-data-api","full_name":"edx/edx-analytics-data-api","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-analytics-data-api","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-analytics-data-api","forks_url":"https://api.github.com/repos/edx/edx-analytics-data-api/forks","keys_url":"https://api.github.com/repos/edx/edx-analytics-data-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-analytics-data-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-analytics-data-api/teams","hooks_url":"https://api.github.com/repos/edx/edx-analytics-data-api/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-analytics-data-api/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-analytics-data-api/events","assignees_url":"https://api.github.com/repos/edx/edx-analytics-data-api/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-analytics-data-api/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-analytics-data-api/tags","blobs_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-analytics-data-api/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-analytics-data-api/languages","stargazers_url":"https://api.github.com/repos/edx/edx-analytics-data-api/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-analytics-data-api/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-analytics-data-api/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-analytics-data-api/subscription","commits_url":"https://api.github.com/repos/edx/edx-analytics-data-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-analytics-data-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-analytics-data-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-analytics-data-api/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-analytics-data-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-analytics-data-api/merges","archive_url":"https://api.github.com/repos/edx/edx-analytics-data-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-analytics-data-api/downloads","issues_url":"https://api.github.com/repos/edx/edx-analytics-data-api/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-analytics-data-api/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-analytics-data-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-analytics-data-api/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-analytics-data-api/releases{/id}","created_at":"2014-06-02T18:55:15Z","updated_at":"2015-10-13T15:21:25Z","pushed_at":"2015-12-11T20:01:27Z","git_url":"git://github.com/edx/edx-analytics-data-api.git","ssh_url":"git@github.com:edx/edx-analytics-data-api.git","clone_url":"https://github.com/edx/edx-analytics-data-api.git","svn_url":"https://github.com/edx/edx-analytics-data-api","homepage":null,"size":1370,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":3,"forks":25,"open_issues":3,"watchers":5,"default_branch":"master"}},"base":{"label":"edx:learner-analytics","ref":"learner-analytics","sha":"973419c34f1a2de10be417ca95eebb9e96911c15","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":20415476,"name":"edx-analytics-data-api","full_name":"edx/edx-analytics-data-api","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-analytics-data-api","description":"","fork":false,"url":"https://api.github.com/repos/edx/edx-analytics-data-api","forks_url":"https://api.github.com/repos/edx/edx-analytics-data-api/forks","keys_url":"https://api.github.com/repos/edx/edx-analytics-data-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-analytics-data-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-analytics-data-api/teams","hooks_url":"https://api.github.com/repos/edx/edx-analytics-data-api/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-analytics-data-api/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-analytics-data-api/events","assignees_url":"https://api.github.com/repos/edx/edx-analytics-data-api/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-analytics-data-api/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-analytics-data-api/tags","blobs_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-analytics-data-api/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-analytics-data-api/languages","stargazers_url":"https://api.github.com/repos/edx/edx-analytics-data-api/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-analytics-data-api/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-analytics-data-api/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-analytics-data-api/subscription","commits_url":"https://api.github.com/repos/edx/edx-analytics-data-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-analytics-data-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-analytics-data-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-analytics-data-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-analytics-data-api/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-analytics-data-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-analytics-data-api/merges","archive_url":"https://api.github.com/repos/edx/edx-analytics-data-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-analytics-data-api/downloads","issues_url":"https://api.github.com/repos/edx/edx-analytics-data-api/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-analytics-data-api/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-analytics-data-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-analytics-data-api/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-analytics-data-api/releases{/id}","created_at":"2014-06-02T18:55:15Z","updated_at":"2015-10-13T15:21:25Z","pushed_at":"2015-12-11T20:01:27Z","git_url":"git://github.com/edx/edx-analytics-data-api.git","ssh_url":"git@github.com:edx/edx-analytics-data-api.git","clone_url":"https://github.com/edx/edx-analytics-data-api.git","svn_url":"https://github.com/edx/edx-analytics-data-api","homepage":null,"size":1370,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":3,"forks":25,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/94"},"html":{"href":"https://github.com/edx/edx-analytics-data-api/pull/94"},"issue":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/issues/94"},"comments":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-analytics-data-api/statuses/de180d93021a578711d0fe93901815eb35d8a677"}}}}