{"action":"created","comment":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments/47111217","id":47111217,"diff_hunk":"@@ -0,0 +1,876 @@\n+__author__ = 'Alva'\n+\n+# This model supports user labeling of resources in various ways.\n+# For a User u, this instantiates a subobject u.ulabels (like u.uaccess)\n+# that contains all the labeling functions.\n+#\n+# Functions include:\n+# - u.ulabels.label_resource(r, label)\n+#   instantiates a label for a resource. Resources can have multiple labels.\n+# - u.ulabels.unlabel_resource(r, label)\n+#   removes a label; there can be many labels.\n+# - u.ulabels.clear_resource_labels(r)\n+#   removes all labels for a resource\n+# - u.ulabels.favorite_resource(r)\n+#   favorites a resource\n+# - u.ulabels.unfavorite_resource(r)\n+#   removes a favorite\n+# - u.ulabels.file_resource(r, folder_name)\n+#   adds a folder name for a resource\n+# - u.ulabels.unfile_resource(r)\n+#   remove folder name\n+#\n+# and the reporting functions\n+# - u.ulabels.labeled_resources\n+#   A queryset of resources that are labeled.\n+# - u.ulabels.filed_resources (trivial, not yet implemented, available tomorrow)\n+#   A queryset of resources that are filed in folders\n+# - u.ulabels.favorite_resources (trivial, not yet implemented, available tomorrow)\n+#   A queryset of resources that have been favorited\n+# - u.ulabels.get_resources_with_label(label)\n+#   Get a queryset of resources possessing a specific label.\n+# - u.ulabels.get_resources_in_folder(folder)\n+#   Get a queryset of resources in a specific folder.\n+\n+# For a BaseResource r, this also adds a subobject rlabels that reports on labels for resources\n+# -\tr.rlabels.get_folder(u)\n+# - r.rlabels.get_labels(u)\n+# - r.rlabels.is_favorite(u) (trivial, not yet implemented, tomorrow)\n+\n+from django.contrib.auth.models import User\n+from django.db import models\n+#from django.db.models import Q\n+# from django.conf import settings\n+#from pprint import pprint\n+import re\n+\n+from hs_core.models import BaseResource\n+\n+# from hs_core.models import BaseResource\n+# for debugging, create a stub BaseResource class\n+# fields will be induced into this class via Many-Many relations\n+# class BaseResource(models.Model):\n+#     title = models.TextField(default='nothing')\n+#     pass\n+\n+######################################\n+######################################\n+# Labeling and annotation subsystem\n+######################################\n+######################################\n+\n+# A \"label\" is something that is assigned by a person other than the original creator.\n+# It is not part of metadata. Labels include\n+# 1) making something a favorite.\n+# 2) assigning a folder\n+# 3) assigning a keyword\n+\n+######################################\n+# Exceptions specific to access control:\n+# b) Usage Exception: bad parameters\n+######################################\n+class HSLException(Exception):\n+    \"\"\"\n+    Generic Base Exception class for HSLLabel class.\n+\n+    *This exception is a generic base class and is never directly raised.*\n+    See subclass HSLUsageException for details.\n+    \"\"\"\n+    pass\n+\n+class HSLUsageException(HSLException):\n+    \"\"\"\n+    Exception class for parameter usage problems.\n+\n+    This exception is raised when a routine is called with invalid parameters.\n+    This includes references to non-existent resources, groups, and users.\n+\n+    This is typically a programming error and should be entered into\n+    issue tracker and resolved.\n+\n+    *Catching this exception is not recommended.*\n+    \"\"\"\n+    def __str__(self):\n+        return repr(\"HS Usage Exception: \" + self.message)\n+\n+    pass\n+\n+\n+####################################\n+####################################\n+# The labeling system allows\n+# a) labeling of resources.\n+# b) assigning folders to resources.\n+# c) marking public resources to be \"of interest\"\n+####################################\n+####################################\n+\n+\n+####################################\n+# privileges are numeric codes 1-4\n+####################################\n+class LabelCodes(object):\n+    \"\"\"\n+    Label codes describe the kinds of labels that a user can create for a thing:\n+\n+        * 1 or LabelCodes.LABEL:\n+            a regular label for the object.\n+\n+        * 2 or LabelCodes.FOLDER:\n+            a folder for the object.\n+\n+        * 3 or LabelCodes.FAVORITE:\n+            marks the object as a favorite.\n+\n+        * 4 or LabelCodes.MINE:\n+            marks the object to be included in my resources\n+\n+        * 5 or LabelCodes.SAVEDLABEL:\n+            creates a label that can be used later for labeling a resource\n+\n+    \"\"\"\n+    LABEL = 1\n+    FOLDER = 2\n+    FAVORITE = 3\n+    MINE = 4\n+    SAVEDLABEL = 5\n+    LABEL_CHOICES = (\n+        (LABEL, 'Label'),\n+        (FOLDER, 'Folder'),\n+        (FAVORITE, 'Favorite'),\n+        (MINE, 'Mine'),\n+        (SAVEDLABEL, 'Saved Label')\n+    )\n+\n+####################################\n+# user access to resources\n+####################################\n+\n+\n+class UserResourceLabels(models.Model):\n+    \"\"\" Labels of a user for a resource\n+\n+    This model stores labels of an individual user, like an access\n+    control list; There are several kinds of labels documented in LabelCodes.\n+    These are similar in implementation but differ in semantics.\n+    \"\"\"\n+\n+    kind = models.IntegerField(choices=LabelCodes.LABEL_CHOICES,\n+                               editable=False,\n+                               default=LabelCodes.LABEL)\n+    # provenance of label start\n+    start = models.DateTimeField(editable=False, auto_now=True)\n+\n+    # if end is non-null, then the label is no longer valid. Not absolutely sure we need this.\n+    # end  = models.DateTimeField(editable=False, null=True, auto_now=False)\n+\n+    # Utilize an underlying class of User to hold labels for resources.\n+    # This creates an implicit query User.ulabels that represents all labels\n+    # for a user.\n+    ulabels = models.ForeignKey('UserLabels', null=False, editable=False,\n+                                related_name='ul2url',         # unused but must be defined and unique\n+                                help_text='user assigning a label')\n+    # There is a basic design question as to whether the target of a label should be a\n+    # Resource proper, or an annotation class that contains mainly methods for the resource.\n+    # Should this be 'BaseResource' or 'ResourceLabels'?\n+    rlabels = models.ForeignKey('ResourceLabels', null=True, editable=False,\n+                                related_name=\"rl2url\",     # unused but must be defined and unique\n+                                help_text='resource to which a label applies')\n+    label = models.TextField()\n+\n+\n+class UserLabels(models.Model):\n+    \"\"\"\n+    Projection class puts methods and content inside basic User object\n+    so that one can access things easily from that context.\n+    This model is injected into the BaseResource as the related name \"ulabels\".\n+    Thus for an User u, u.ulabels is this model.\n+    \"\"\"\n+\n+    user = models.OneToOneField(User,\n+                                editable=False,\n+                                null=True,\n+                                related_name='ulabels',  # induced field in User class.\n+                                related_query_name='ulabels')\n+\n+    ##########################################\n+    ##########################################\n+    # PUBLIC FUNCTIONS: resources\n+    ##########################################\n+    ##########################################\n+\n+    ##########################################\n+    # get various aspects of labeling\n+    ##########################################\n+\n+    @property\n+    def labeled_resources(self):\n+        \"\"\"\n+        Get a list of resources labeled by a user.\n+\n+        This list eliminates duplicates.\n+\n+        :return: List of resource objects labeled by user.\n+        \"\"\"\n+        return BaseResource.objects.filter(rlabels__rl2url__ulabels=self,\n+                                           rlabels__rl2url__kind=LabelCodes.LABEL).distinct()\n+\n+    @property\n+    def filed_resources(self):\n+        \"\"\"\n+        Get a list of resources filed by a user.\n+\n+        This list eliminates duplicates.\n+\n+        :return: List of resource objects assigned to folders by a user.\n+        \"\"\"\n+        return BaseResource.objects.filter(rlabels__rl2url__ulabels=self,\n+                                           rlabels__rl2url__kind=LabelCodes.FOLDER).distinct()\n+\n+    @property\n+    def favorited_resources(self):\n+        \"\"\"\n+        Get a list of resources favorited by a user.\n+\n+        This list eliminates duplicates.\n+\n+        :return: List of resource objects marked as favorite by a user.\n+        \"\"\"\n+        return BaseResource.objects.filter(rlabels__rl2url__ulabels=self,\n+                                           rlabels__rl2url__kind=LabelCodes.FAVORITE).distinct()\n+\n+    @property\n+    def my_resources(self):\n+        \"\"\"\n+        Get a list of resources marked as mine (add to my resources) by a user.\n+\n+        This list eliminates duplicates.\n+\n+        :return: List of resource objects marked as mine by a user.\n+        \"\"\"\n+        return BaseResource.objects.filter(rlabels__rl2url__ulabels=self,\n+                                           rlabels__rl2url__kind=LabelCodes.MINE).distinct()\n+\n+    # TODO: use access control to include accessible resources in this list.\n+    @property\n+    def resources_of_interest(self):\n+        \"\"\"\n+        Get a list of resources the user has marked in any way.\n+\n+        :return: List of resource objects that a user has marked.\n+        \"\"\"\n+        return BaseResource.objects.filter(rlabels__rl2url__ulabels=self).distinct()\n+\n+    def get_resources_with_label(self, this_label):\n+        \"\"\"\n+        Get a list of resources with a specific label\n+        \"\"\"\n+        if not isinstance(this_label, basestring):\n+            raise HSLUsageException(\"Label is not text\")","path":"hs_labels/models.py","position":269,"original_position":269,"commit_id":"3c0029d2b3d76991a8a18c4677c0d09c05bc4885","original_commit_id":"3c0029d2b3d76991a8a18c4677c0d09c05bc4885","user":{"login":"alvacouch","id":3342292,"avatar_url":"https://avatars.githubusercontent.com/u/3342292?v=3","gravatar_id":"","url":"https://api.github.com/users/alvacouch","html_url":"https://github.com/alvacouch","followers_url":"https://api.github.com/users/alvacouch/followers","following_url":"https://api.github.com/users/alvacouch/following{/other_user}","gists_url":"https://api.github.com/users/alvacouch/gists{/gist_id}","starred_url":"https://api.github.com/users/alvacouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvacouch/subscriptions","organizations_url":"https://api.github.com/users/alvacouch/orgs","repos_url":"https://api.github.com/users/alvacouch/repos","events_url":"https://api.github.com/users/alvacouch/events{/privacy}","received_events_url":"https://api.github.com/users/alvacouch/received_events","type":"User","site_admin":false},"body":"I did type checking because my own people here need it to ease debugging. It is a common error and anti-bugging of common patterns is a standard practice. In a dynamically typed language, it is essential, especially when the people using the tool might make unintentional errors. \r\n\r\nCall me old school, but time to market still means something to me. Anti-bugging is a very standard practice. It is used in both access control and labeling to make sure that programming errors are caught very quickly. \r\n\r\nIn other words, I think I have strong justification -- based upon the programmers available to me -- to use the anti-bugging pattern. \r\n","created_at":"2015-12-09T16:12:02Z","updated_at":"2015-12-09T16:12:02Z","html_url":"https://github.com/hydroshare/hydroshare/pull/782#discussion_r47111217","pull_request_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/782","_links":{"self":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments/47111217"},"html":{"href":"https://github.com/hydroshare/hydroshare/pull/782#discussion_r47111217"},"pull_request":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/782"}}},"pull_request":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/782","id":53071454,"html_url":"https://github.com/hydroshare/hydroshare/pull/782","diff_url":"https://github.com/hydroshare/hydroshare/pull/782.diff","patch_url":"https://github.com/hydroshare/hydroshare/pull/782.patch","issue_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/782","number":782,"state":"open","locked":false,"title":"774 hs_labels","user":{"login":"pkdash","id":2523434,"avatar_url":"https://avatars.githubusercontent.com/u/2523434?v=3","gravatar_id":"","url":"https://api.github.com/users/pkdash","html_url":"https://github.com/pkdash","followers_url":"https://api.github.com/users/pkdash/followers","following_url":"https://api.github.com/users/pkdash/following{/other_user}","gists_url":"https://api.github.com/users/pkdash/gists{/gist_id}","starred_url":"https://api.github.com/users/pkdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkdash/subscriptions","organizations_url":"https://api.github.com/users/pkdash/orgs","repos_url":"https://api.github.com/users/pkdash/repos","events_url":"https://api.github.com/users/pkdash/events{/privacy}","received_events_url":"https://api.github.com/users/pkdash/received_events","type":"User","site_admin":false},"body":"This new app allows user to assign labels (favorite, mine, label, folder etc) to resources. It is needed for some functionality of the new my resources page that @mauriel133 is working on for AGU release.","created_at":"2015-12-09T03:10:40Z","updated_at":"2015-12-09T16:12:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"caa9d68408351dcebeeac085f88c2531e45084a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/782/commits","review_comments_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/782/comments","review_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/782/comments","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/3c0029d2b3d76991a8a18c4677c0d09c05bc4885","head":{"label":"hydroshare:774-hs-labels","ref":"774-hs-labels","sha":"3c0029d2b3d76991a8a18c4677c0d09c05bc4885","user":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"repo":{"id":24703136,"name":"hydroshare","full_name":"hydroshare/hydroshare","owner":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydroshare/hydroshare","description":"HydroShare is a collaborative website being developed for better access to data and models in the hydrologic sciences. ","fork":false,"url":"https://api.github.com/repos/hydroshare/hydroshare","forks_url":"https://api.github.com/repos/hydroshare/hydroshare/forks","keys_url":"https://api.github.com/repos/hydroshare/hydroshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydroshare/hydroshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydroshare/hydroshare/teams","hooks_url":"https://api.github.com/repos/hydroshare/hydroshare/hooks","issue_events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/events{/number}","events_url":"https://api.github.com/repos/hydroshare/hydroshare/events","assignees_url":"https://api.github.com/repos/hydroshare/hydroshare/assignees{/user}","branches_url":"https://api.github.com/repos/hydroshare/hydroshare/branches{/branch}","tags_url":"https://api.github.com/repos/hydroshare/hydroshare/tags","blobs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydroshare/hydroshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydroshare/hydroshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/{sha}","languages_url":"https://api.github.com/repos/hydroshare/hydroshare/languages","stargazers_url":"https://api.github.com/repos/hydroshare/hydroshare/stargazers","contributors_url":"https://api.github.com/repos/hydroshare/hydroshare/contributors","subscribers_url":"https://api.github.com/repos/hydroshare/hydroshare/subscribers","subscription_url":"https://api.github.com/repos/hydroshare/hydroshare/subscription","commits_url":"https://api.github.com/repos/hydroshare/hydroshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydroshare/hydroshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydroshare/hydroshare/contents/{+path}","compare_url":"https://api.github.com/repos/hydroshare/hydroshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydroshare/hydroshare/merges","archive_url":"https://api.github.com/repos/hydroshare/hydroshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydroshare/hydroshare/downloads","issues_url":"https://api.github.com/repos/hydroshare/hydroshare/issues{/number}","pulls_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls{/number}","milestones_url":"https://api.github.com/repos/hydroshare/hydroshare/milestones{/number}","notifications_url":"https://api.github.com/repos/hydroshare/hydroshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/labels{/name}","releases_url":"https://api.github.com/repos/hydroshare/hydroshare/releases{/id}","created_at":"2014-10-02T02:19:41Z","updated_at":"2015-10-16T12:02:24Z","pushed_at":"2015-12-09T06:59:14Z","git_url":"git://github.com/hydroshare/hydroshare.git","ssh_url":"git@github.com:hydroshare/hydroshare.git","clone_url":"https://github.com/hydroshare/hydroshare.git","svn_url":"https://github.com/hydroshare/hydroshare","homepage":"https://www.hydroshare.org","size":57508,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":190,"forks":2,"open_issues":190,"watchers":12,"default_branch":"develop"}},"base":{"label":"hydroshare:develop","ref":"develop","sha":"2f9352b7d0cc11ec04e59463476bb62902e637e0","user":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"repo":{"id":24703136,"name":"hydroshare","full_name":"hydroshare/hydroshare","owner":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydroshare/hydroshare","description":"HydroShare is a collaborative website being developed for better access to data and models in the hydrologic sciences. ","fork":false,"url":"https://api.github.com/repos/hydroshare/hydroshare","forks_url":"https://api.github.com/repos/hydroshare/hydroshare/forks","keys_url":"https://api.github.com/repos/hydroshare/hydroshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydroshare/hydroshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydroshare/hydroshare/teams","hooks_url":"https://api.github.com/repos/hydroshare/hydroshare/hooks","issue_events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/events{/number}","events_url":"https://api.github.com/repos/hydroshare/hydroshare/events","assignees_url":"https://api.github.com/repos/hydroshare/hydroshare/assignees{/user}","branches_url":"https://api.github.com/repos/hydroshare/hydroshare/branches{/branch}","tags_url":"https://api.github.com/repos/hydroshare/hydroshare/tags","blobs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydroshare/hydroshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydroshare/hydroshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/{sha}","languages_url":"https://api.github.com/repos/hydroshare/hydroshare/languages","stargazers_url":"https://api.github.com/repos/hydroshare/hydroshare/stargazers","contributors_url":"https://api.github.com/repos/hydroshare/hydroshare/contributors","subscribers_url":"https://api.github.com/repos/hydroshare/hydroshare/subscribers","subscription_url":"https://api.github.com/repos/hydroshare/hydroshare/subscription","commits_url":"https://api.github.com/repos/hydroshare/hydroshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydroshare/hydroshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydroshare/hydroshare/contents/{+path}","compare_url":"https://api.github.com/repos/hydroshare/hydroshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydroshare/hydroshare/merges","archive_url":"https://api.github.com/repos/hydroshare/hydroshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydroshare/hydroshare/downloads","issues_url":"https://api.github.com/repos/hydroshare/hydroshare/issues{/number}","pulls_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls{/number}","milestones_url":"https://api.github.com/repos/hydroshare/hydroshare/milestones{/number}","notifications_url":"https://api.github.com/repos/hydroshare/hydroshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/labels{/name}","releases_url":"https://api.github.com/repos/hydroshare/hydroshare/releases{/id}","created_at":"2014-10-02T02:19:41Z","updated_at":"2015-10-16T12:02:24Z","pushed_at":"2015-12-09T06:59:14Z","git_url":"git://github.com/hydroshare/hydroshare.git","ssh_url":"git@github.com:hydroshare/hydroshare.git","clone_url":"https://github.com/hydroshare/hydroshare.git","svn_url":"https://github.com/hydroshare/hydroshare","homepage":"https://www.hydroshare.org","size":57508,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":190,"forks":2,"open_issues":190,"watchers":12,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/782"},"html":{"href":"https://github.com/hydroshare/hydroshare/pull/782"},"issue":{"href":"https://api.github.com/repos/hydroshare/hydroshare/issues/782"},"comments":{"href":"https://api.github.com/repos/hydroshare/hydroshare/issues/782/comments"},"review_comments":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/782/comments"},"review_comment":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/782/commits"},"statuses":{"href":"https://api.github.com/repos/hydroshare/hydroshare/statuses/3c0029d2b3d76991a8a18c4677c0d09c05bc4885"}}}}