{"action":"created","comment":{"url":"https://api.github.com/repos/mdsol/rwslib/pulls/comments/98441614","pull_request_review_id":19081833,"id":98441614,"diff_hunk":"@@ -235,56 +309,345 @@ def build(self, builder):\n             raise ValueError(\"Location Reference not set.\")\n         self.location_ref.build(builder)\n \n+        if self.signature_ref is None:\n+            raise ValueError(\"Signature Reference not set.\")\n+        self.signature_ref.build(builder)\n+\n         if self.date_time_stamp is None:\n             raise ValueError(\"DateTime not set.\")\n-\n         self.date_time_stamp.build(builder)\n \n-        # Optional\n-        if self.reason_for_change is not None:\n-            self.reason_for_change.build(builder)\n-\n-        builder.end(\"AuditRecord\")\n+        builder.end(\"Signature\")\n \n     def __lshift__(self, other):\n-        if not isinstance(other, (UserRef, LocationRef, DateTimeStamp, ReasonForChange,)):\n-            raise ValueError(\"AuditRecord cannot accept a child element of type %s\" % other.__class__.__name__)\n+        if not isinstance(other, (UserRef, LocationRef, SignatureRef, DateTimeStamp,)):\n+            raise ValueError(\"Signature cannot accept a child element of type %s\" % other.__class__.__name__)\n \n         # Order is important, apparently\n         self.set_single_attribute(other, UserRef, 'user_ref')\n         self.set_single_attribute(other, LocationRef, 'location_ref')\n+        self.set_single_attribute(other, SignatureRef, 'signature_ref')\n         self.set_single_attribute(other, DateTimeStamp, 'date_time_stamp')\n-        self.set_single_attribute(other, ReasonForChange, 'reason_for_change')\n         return other\n \n \n-class TransactionalElement(ODMElement):\n-    \"\"\"Models an ODM Element that is allowed a transaction type. Different elements have different\n-       allowed transaction types\"\"\"\n-    ALLOWED_TRANSACTION_TYPES = []\n+class Annotation(TransactionalElement):\n+    \"\"\"\n+    A general note about clinical data.\n+    If an annotation has both a comment and flags, the flags should be related to the comment.\n \n-    def __init__(self, transaction_type):\n-        self._transaction_type = None\n-        self.transaction_type = transaction_type\n+    .. note:: Annotation is not supported by Medidata Rave\n+    \"\"\"\n+    ALLOWED_TRANSACTION_TYPES = [\"Insert\", \"Update\", \"Remove\", \"Upsert\", \"Context\"]\n+\n+    def __init__(self, id=None, seqnum=1,\n+                 flags=None, comment=None,\n+                 transaction_type=None):\n+        \"\"\"\n+        :param id: ID for this Annotation (required if contained within an Annotations element)\n+        :type id: str or None\n+        :param int seqnum: :attr:`SeqNum` for Annotation\n+        :param flags: one or more :class:`Flag` for the Annotation\n+        :type flags: Flag or list(Flag)\n+        :param comment: one or more :class:`Comment` for the Annotation\n+        :type comment: Comment\n+        :param transaction_type: :attr:`TransactionType` for Annotation (one of **Insert**, **Update**, *Remove*, **Upsert**, **Context**)\n+        \"\"\"\n+        super(Annotation, self).__init__(transaction_type=transaction_type)\n+        # initialise the flags collection\n+        self.flags = []\n+        if flags:\n+            if isinstance(flags, (list, tuple)):\n+                for flag in flags:\n+                    self << flag\n+            elif isinstance(flags, Flag):\n+                self << flags\n+            else:\n+                raise AttributeError(\"Flags attribute should be an iterable or Flag\")\n+        self._id = None\n+        if id is not None:\n+            self.id = id\n+        self._seqnum = None\n+        if seqnum is not None:\n+            # validate the input\n+            self.seqnum = seqnum","path":"rwslib/builders.py","position":328,"original_position":328,"commit_id":"3768ea67bbb0438077d504dbd97600be70cf1103","original_commit_id":"3768ea67bbb0438077d504dbd97600be70cf1103","user":{"login":"isparks","id":1135502,"avatar_url":"https://avatars.githubusercontent.com/u/1135502?v=3","gravatar_id":"","url":"https://api.github.com/users/isparks","html_url":"https://github.com/isparks","followers_url":"https://api.github.com/users/isparks/followers","following_url":"https://api.github.com/users/isparks/following{/other_user}","gists_url":"https://api.github.com/users/isparks/gists{/gist_id}","starred_url":"https://api.github.com/users/isparks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isparks/subscriptions","organizations_url":"https://api.github.com/users/isparks/orgs","repos_url":"https://api.github.com/users/isparks/repos","events_url":"https://api.github.com/users/isparks/events{/privacy}","received_events_url":"https://api.github.com/users/isparks/received_events","type":"User","site_admin":false},"body":"self._seqnum = seqnum?","created_at":"2017-01-30T13:38:42Z","updated_at":"2017-01-30T13:38:42Z","html_url":"https://github.com/mdsol/rwslib/pull/77#discussion_r98441614","pull_request_url":"https://api.github.com/repos/mdsol/rwslib/pulls/77","_links":{"self":{"href":"https://api.github.com/repos/mdsol/rwslib/pulls/comments/98441614"},"html":{"href":"https://github.com/mdsol/rwslib/pull/77#discussion_r98441614"},"pull_request":{"href":"https://api.github.com/repos/mdsol/rwslib/pulls/77"}}},"pull_request":{"url":"https://api.github.com/repos/mdsol/rwslib/pulls/77","id":102524442,"html_url":"https://github.com/mdsol/rwslib/pull/77","diff_url":"https://github.com/mdsol/rwslib/pull/77.diff","patch_url":"https://github.com/mdsol/rwslib/pull/77.patch","issue_url":"https://api.github.com/repos/mdsol/rwslib/issues/77","number":77,"state":"open","locked":false,"title":"Feature/signatures","user":{"login":"glow-mdsol","id":1116105,"avatar_url":"https://avatars.githubusercontent.com/u/1116105?v=3","gravatar_id":"","url":"https://api.github.com/users/glow-mdsol","html_url":"https://github.com/glow-mdsol","followers_url":"https://api.github.com/users/glow-mdsol/followers","following_url":"https://api.github.com/users/glow-mdsol/following{/other_user}","gists_url":"https://api.github.com/users/glow-mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/glow-mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glow-mdsol/subscriptions","organizations_url":"https://api.github.com/users/glow-mdsol/orgs","repos_url":"https://api.github.com/users/glow-mdsol/repos","events_url":"https://api.github.com/users/glow-mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/glow-mdsol/received_events","type":"User","site_admin":false},"body":"@isparks @rsayer-mdsol @anewbigging \r\n* @rsayer-mdsol amended release to add new elements \r\n* amended sphinx to find docstrings\r\n* added docstrings to builders\r\n* added LRP type from schema and used for Checks and Derivations\r\n* Added support for python 3-6","created_at":"2017-01-20T19:48:10Z","updated_at":"2017-01-30T13:38:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"62dd27f02c8c678b289144752ec1d16d3de7b01e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mdsol/rwslib/pulls/77/commits","review_comments_url":"https://api.github.com/repos/mdsol/rwslib/pulls/77/comments","review_comment_url":"https://api.github.com/repos/mdsol/rwslib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mdsol/rwslib/issues/77/comments","statuses_url":"https://api.github.com/repos/mdsol/rwslib/statuses/3768ea67bbb0438077d504dbd97600be70cf1103","head":{"label":"mdsol:feature/signatures","ref":"feature/signatures","sha":"3768ea67bbb0438077d504dbd97600be70cf1103","user":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"repo":{"id":10478242,"name":"rwslib","full_name":"mdsol/rwslib","owner":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdsol/rwslib","description":null,"fork":false,"url":"https://api.github.com/repos/mdsol/rwslib","forks_url":"https://api.github.com/repos/mdsol/rwslib/forks","keys_url":"https://api.github.com/repos/mdsol/rwslib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdsol/rwslib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdsol/rwslib/teams","hooks_url":"https://api.github.com/repos/mdsol/rwslib/hooks","issue_events_url":"https://api.github.com/repos/mdsol/rwslib/issues/events{/number}","events_url":"https://api.github.com/repos/mdsol/rwslib/events","assignees_url":"https://api.github.com/repos/mdsol/rwslib/assignees{/user}","branches_url":"https://api.github.com/repos/mdsol/rwslib/branches{/branch}","tags_url":"https://api.github.com/repos/mdsol/rwslib/tags","blobs_url":"https://api.github.com/repos/mdsol/rwslib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdsol/rwslib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdsol/rwslib/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdsol/rwslib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdsol/rwslib/statuses/{sha}","languages_url":"https://api.github.com/repos/mdsol/rwslib/languages","stargazers_url":"https://api.github.com/repos/mdsol/rwslib/stargazers","contributors_url":"https://api.github.com/repos/mdsol/rwslib/contributors","subscribers_url":"https://api.github.com/repos/mdsol/rwslib/subscribers","subscription_url":"https://api.github.com/repos/mdsol/rwslib/subscription","commits_url":"https://api.github.com/repos/mdsol/rwslib/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdsol/rwslib/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdsol/rwslib/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdsol/rwslib/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdsol/rwslib/contents/{+path}","compare_url":"https://api.github.com/repos/mdsol/rwslib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdsol/rwslib/merges","archive_url":"https://api.github.com/repos/mdsol/rwslib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdsol/rwslib/downloads","issues_url":"https://api.github.com/repos/mdsol/rwslib/issues{/number}","pulls_url":"https://api.github.com/repos/mdsol/rwslib/pulls{/number}","milestones_url":"https://api.github.com/repos/mdsol/rwslib/milestones{/number}","notifications_url":"https://api.github.com/repos/mdsol/rwslib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdsol/rwslib/labels{/name}","releases_url":"https://api.github.com/repos/mdsol/rwslib/releases{/id}","deployments_url":"https://api.github.com/repos/mdsol/rwslib/deployments","created_at":"2013-06-04T12:41:09Z","updated_at":"2017-01-17T17:15:24Z","pushed_at":"2017-01-20T19:48:11Z","git_url":"git://github.com/mdsol/rwslib.git","ssh_url":"git@github.com:mdsol/rwslib.git","clone_url":"https://github.com/mdsol/rwslib.git","svn_url":"https://github.com/mdsol/rwslib","homepage":null,"size":793,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":6,"default_branch":"develop"}},"base":{"label":"mdsol:develop","ref":"develop","sha":"280246899e59afc3b8cee3fd5693784ca78ca08e","user":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"repo":{"id":10478242,"name":"rwslib","full_name":"mdsol/rwslib","owner":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdsol/rwslib","description":null,"fork":false,"url":"https://api.github.com/repos/mdsol/rwslib","forks_url":"https://api.github.com/repos/mdsol/rwslib/forks","keys_url":"https://api.github.com/repos/mdsol/rwslib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdsol/rwslib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdsol/rwslib/teams","hooks_url":"https://api.github.com/repos/mdsol/rwslib/hooks","issue_events_url":"https://api.github.com/repos/mdsol/rwslib/issues/events{/number}","events_url":"https://api.github.com/repos/mdsol/rwslib/events","assignees_url":"https://api.github.com/repos/mdsol/rwslib/assignees{/user}","branches_url":"https://api.github.com/repos/mdsol/rwslib/branches{/branch}","tags_url":"https://api.github.com/repos/mdsol/rwslib/tags","blobs_url":"https://api.github.com/repos/mdsol/rwslib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdsol/rwslib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdsol/rwslib/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdsol/rwslib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdsol/rwslib/statuses/{sha}","languages_url":"https://api.github.com/repos/mdsol/rwslib/languages","stargazers_url":"https://api.github.com/repos/mdsol/rwslib/stargazers","contributors_url":"https://api.github.com/repos/mdsol/rwslib/contributors","subscribers_url":"https://api.github.com/repos/mdsol/rwslib/subscribers","subscription_url":"https://api.github.com/repos/mdsol/rwslib/subscription","commits_url":"https://api.github.com/repos/mdsol/rwslib/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdsol/rwslib/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdsol/rwslib/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdsol/rwslib/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdsol/rwslib/contents/{+path}","compare_url":"https://api.github.com/repos/mdsol/rwslib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdsol/rwslib/merges","archive_url":"https://api.github.com/repos/mdsol/rwslib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdsol/rwslib/downloads","issues_url":"https://api.github.com/repos/mdsol/rwslib/issues{/number}","pulls_url":"https://api.github.com/repos/mdsol/rwslib/pulls{/number}","milestones_url":"https://api.github.com/repos/mdsol/rwslib/milestones{/number}","notifications_url":"https://api.github.com/repos/mdsol/rwslib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdsol/rwslib/labels{/name}","releases_url":"https://api.github.com/repos/mdsol/rwslib/releases{/id}","deployments_url":"https://api.github.com/repos/mdsol/rwslib/deployments","created_at":"2013-06-04T12:41:09Z","updated_at":"2017-01-17T17:15:24Z","pushed_at":"2017-01-20T19:48:11Z","git_url":"git://github.com/mdsol/rwslib.git","ssh_url":"git@github.com:mdsol/rwslib.git","clone_url":"https://github.com/mdsol/rwslib.git","svn_url":"https://github.com/mdsol/rwslib","homepage":null,"size":793,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":6,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mdsol/rwslib/pulls/77"},"html":{"href":"https://github.com/mdsol/rwslib/pull/77"},"issue":{"href":"https://api.github.com/repos/mdsol/rwslib/issues/77"},"comments":{"href":"https://api.github.com/repos/mdsol/rwslib/issues/77/comments"},"review_comments":{"href":"https://api.github.com/repos/mdsol/rwslib/pulls/77/comments"},"review_comment":{"href":"https://api.github.com/repos/mdsol/rwslib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mdsol/rwslib/pulls/77/commits"},"statuses":{"href":"https://api.github.com/repos/mdsol/rwslib/statuses/3768ea67bbb0438077d504dbd97600be70cf1103"}}}}
{"actor":{"display_login":"isparks"}}