{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/webcommon/pulls/comments/29966227","id":29966227,"diff_hunk":"@@ -0,0 +1,55 @@\n+# LSST Data Management System\n+# Copyright 2015 AURA/LSST.\n+#\n+# This product includes software developed by the\n+# LSST Project (http://www.lsst.org/).\n+#\n+# This program is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation, either version 3 of the License, or\n+# (at your option) any later version.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the LSST License Statement and\n+# the GNU General Public License along with this program.  If not,\n+# see <http://www.lsstcorp.org/LegalNotices/>.\n+\n+\"\"\"\n+Implementation of several Range specifications for REST APIs.\n+@author  Brian Van Klaveren, SLAC\n+\"\"\"\n+\n+\n+class Range(object):\n+    def __init__(self, type):\n+        self.type = type\n+\n+class StartStopSlice(Range):\n+    def __init__(self, start, stop, length=None):\n+        super(StartStopSlice, self).__init__(\"start_stop\")\n+        self.start = start\n+        self.stop = stop\n+        if length:\n+            self.length = length\n+\n+class OffsetMaxSlice(Range):\n+    def __init__(self, offset, max, length=None):\n+        super(StartStopSlice, self).__init__(\"offset_max\")","path":"python/lsst/webcommon/range.py","position":41,"original_position":41,"commit_id":"c91320cdf86802238f60027066b2bc2caecd1d7c","original_commit_id":"c91320cdf86802238f60027066b2bc2caecd1d7c","user":{"login":"andy-slac","id":4266950,"avatar_url":"https://avatars.githubusercontent.com/u/4266950?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-slac","html_url":"https://github.com/andy-slac","followers_url":"https://api.github.com/users/andy-slac/followers","following_url":"https://api.github.com/users/andy-slac/following{/other_user}","gists_url":"https://api.github.com/users/andy-slac/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-slac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-slac/subscriptions","organizations_url":"https://api.github.com/users/andy-slac/orgs","repos_url":"https://api.github.com/users/andy-slac/repos","events_url":"https://api.github.com/users/andy-slac/events{/privacy}","received_events_url":"https://api.github.com/users/andy-slac/received_events","type":"User","site_admin":false},"body":"must be `super(OffsetMaxSlice, self)` -- this is one reason why I do not like `super`","created_at":"2015-05-08T18:49:05Z","updated_at":"2015-05-08T18:49:05Z","html_url":"https://github.com/lsst/webcommon/pull/1#discussion_r29966227","pull_request_url":"https://api.github.com/repos/lsst/webcommon/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/lsst/webcommon/pulls/comments/29966227"},"html":{"href":"https://github.com/lsst/webcommon/pull/1#discussion_r29966227"},"pull_request":{"href":"https://api.github.com/repos/lsst/webcommon/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/webcommon/pulls/1","id":35032723,"html_url":"https://github.com/lsst/webcommon/pull/1","diff_url":"https://github.com/lsst/webcommon/pull/1.diff","patch_url":"https://github.com/lsst/webcommon/pull/1.patch","issue_url":"https://api.github.com/repos/lsst/webcommon/issues/1","number":1,"state":"open","locked":false,"title":"Import webcommons into repository (DM-2171)","user":{"login":"andy-slac","id":4266950,"avatar_url":"https://avatars.githubusercontent.com/u/4266950?v=3","gravatar_id":"","url":"https://api.github.com/users/andy-slac","html_url":"https://github.com/andy-slac","followers_url":"https://api.github.com/users/andy-slac/followers","following_url":"https://api.github.com/users/andy-slac/following{/other_user}","gists_url":"https://api.github.com/users/andy-slac/gists{/gist_id}","starred_url":"https://api.github.com/users/andy-slac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andy-slac/subscriptions","organizations_url":"https://api.github.com/users/andy-slac/orgs","repos_url":"https://api.github.com/users/andy-slac/repos","events_url":"https://api.github.com/users/andy-slac/events{/privacy}","received_events_url":"https://api.github.com/users/andy-slac/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-08T18:12:31Z","updated_at":"2015-05-08T18:49:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0100568867d6491678027070d9b544fd080d6b5c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lsst/webcommon/pulls/1/commits","review_comments_url":"https://api.github.com/repos/lsst/webcommon/pulls/1/comments","review_comment_url":"https://api.github.com/repos/lsst/webcommon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/webcommon/issues/1/comments","statuses_url":"https://api.github.com/repos/lsst/webcommon/statuses/c91320cdf86802238f60027066b2bc2caecd1d7c","head":{"label":"lsst:tickets/DM-2171","ref":"tickets/DM-2171","sha":"c91320cdf86802238f60027066b2bc2caecd1d7c","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":33565946,"name":"webcommon","full_name":"lsst/webcommon","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/webcommon","description":"Common libraries for supporting LSST web services","fork":false,"url":"https://api.github.com/repos/lsst/webcommon","forks_url":"https://api.github.com/repos/lsst/webcommon/forks","keys_url":"https://api.github.com/repos/lsst/webcommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/webcommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/webcommon/teams","hooks_url":"https://api.github.com/repos/lsst/webcommon/hooks","issue_events_url":"https://api.github.com/repos/lsst/webcommon/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/webcommon/events","assignees_url":"https://api.github.com/repos/lsst/webcommon/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/webcommon/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/webcommon/tags","blobs_url":"https://api.github.com/repos/lsst/webcommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/webcommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/webcommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/webcommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/webcommon/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/webcommon/languages","stargazers_url":"https://api.github.com/repos/lsst/webcommon/stargazers","contributors_url":"https://api.github.com/repos/lsst/webcommon/contributors","subscribers_url":"https://api.github.com/repos/lsst/webcommon/subscribers","subscription_url":"https://api.github.com/repos/lsst/webcommon/subscription","commits_url":"https://api.github.com/repos/lsst/webcommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/webcommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/webcommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/webcommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/webcommon/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/webcommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/webcommon/merges","archive_url":"https://api.github.com/repos/lsst/webcommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/webcommon/downloads","issues_url":"https://api.github.com/repos/lsst/webcommon/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/webcommon/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/webcommon/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/webcommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/webcommon/labels{/name}","releases_url":"https://api.github.com/repos/lsst/webcommon/releases{/id}","created_at":"2015-04-07T20:16:18Z","updated_at":"2015-04-07T20:16:18Z","pushed_at":"2015-05-08T18:12:31Z","git_url":"git://github.com/lsst/webcommon.git","ssh_url":"git@github.com:lsst/webcommon.git","clone_url":"https://github.com/lsst/webcommon.git","svn_url":"https://github.com/lsst/webcommon","homepage":null,"size":192,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lsst:master","ref":"master","sha":"9545defc74d3b4d2acabe0a3f65297f01df15a2b","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":33565946,"name":"webcommon","full_name":"lsst/webcommon","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/webcommon","description":"Common libraries for supporting LSST web services","fork":false,"url":"https://api.github.com/repos/lsst/webcommon","forks_url":"https://api.github.com/repos/lsst/webcommon/forks","keys_url":"https://api.github.com/repos/lsst/webcommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/webcommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/webcommon/teams","hooks_url":"https://api.github.com/repos/lsst/webcommon/hooks","issue_events_url":"https://api.github.com/repos/lsst/webcommon/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/webcommon/events","assignees_url":"https://api.github.com/repos/lsst/webcommon/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/webcommon/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/webcommon/tags","blobs_url":"https://api.github.com/repos/lsst/webcommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/webcommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/webcommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/webcommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/webcommon/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/webcommon/languages","stargazers_url":"https://api.github.com/repos/lsst/webcommon/stargazers","contributors_url":"https://api.github.com/repos/lsst/webcommon/contributors","subscribers_url":"https://api.github.com/repos/lsst/webcommon/subscribers","subscription_url":"https://api.github.com/repos/lsst/webcommon/subscription","commits_url":"https://api.github.com/repos/lsst/webcommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/webcommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/webcommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/webcommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/webcommon/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/webcommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/webcommon/merges","archive_url":"https://api.github.com/repos/lsst/webcommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/webcommon/downloads","issues_url":"https://api.github.com/repos/lsst/webcommon/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/webcommon/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/webcommon/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/webcommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/webcommon/labels{/name}","releases_url":"https://api.github.com/repos/lsst/webcommon/releases{/id}","created_at":"2015-04-07T20:16:18Z","updated_at":"2015-04-07T20:16:18Z","pushed_at":"2015-05-08T18:12:31Z","git_url":"git://github.com/lsst/webcommon.git","ssh_url":"git@github.com:lsst/webcommon.git","clone_url":"https://github.com/lsst/webcommon.git","svn_url":"https://github.com/lsst/webcommon","homepage":null,"size":192,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/webcommon/pulls/1"},"html":{"href":"https://github.com/lsst/webcommon/pull/1"},"issue":{"href":"https://api.github.com/repos/lsst/webcommon/issues/1"},"comments":{"href":"https://api.github.com/repos/lsst/webcommon/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/webcommon/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/webcommon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/webcommon/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/webcommon/statuses/c91320cdf86802238f60027066b2bc2caecd1d7c"}}}}