{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/194333828","pull_request_review_id":127483260,"id":194333828,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDMzMzgyOA==","diff_hunk":"@@ -27,39 +28,41 @@ def __init__(self, name, is_start=False, is_dead=False, is_accept=False, subst=N\n             self.state_type = \"dead\"\n \n     def add_transition(self, letter, state):\n-        \"\"\"\n-        This method is to add a transition from the current state to a new state.\n+        '''\n+        Add a transition from the current state to a new state.\n \n-        Arguments:\n-            letter: The alphabet element the current state reads to make the state transition.\n-            state: This will be an instance of the State object which represents a new state after in the transition after the alphabet is read.\n-        \"\"\"\n+        Keyword Arguments:\n+            letter -- The alphabet element the current state reads to make the state transition.\n+            state -- This will be an instance of the State object which represents a new state after in the transition after the alphabet is read.\n+\n+        '''\n         self.transitions[letter] = state\n \n class StateMachine(object):\n-    \"\"\"\n-    The state machine class which manages the states and their transisitons of the automata.\n+    '''\n+    Represents the attributes and methods of a finite state machine.","path":"sympy/combinatorics/rewritingsystem_fsm.py","position":null,"original_position":43,"commit_id":"bfbb65042f29c746bdf5fde47cbd9b428d3b2b9a","original_commit_id":"bfbb65042f29c746bdf5fde47cbd9b428d3b2b9a","user":{"login":"valglad","id":20492235,"node_id":"MDQ6VXNlcjIwNDkyMjM1","avatar_url":"https://avatars0.githubusercontent.com/u/20492235?v=4","gravatar_id":"","url":"https://api.github.com/users/valglad","html_url":"https://github.com/valglad","followers_url":"https://api.github.com/users/valglad/followers","following_url":"https://api.github.com/users/valglad/following{/other_user}","gists_url":"https://api.github.com/users/valglad/gists{/gist_id}","starred_url":"https://api.github.com/users/valglad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valglad/subscriptions","organizations_url":"https://api.github.com/users/valglad/orgs","repos_url":"https://api.github.com/users/valglad/repos","events_url":"https://api.github.com/users/valglad/events{/privacy}","received_events_url":"https://api.github.com/users/valglad/received_events","type":"User","site_admin":false},"body":"I think I actually preferred the previous version here because docstrings for classes in SymPy are often nouns. You could also say something like `A representation/implementation of a finite state macine that manages ...`. Well done with the other docstrings though, they look quite good.","created_at":"2018-06-11T08:58:36Z","updated_at":"2018-06-11T08:58:37Z","html_url":"https://github.com/sympy/sympy/pull/14735#discussion_r194333828","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/14735","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/194333828"},"html":{"href":"https://github.com/sympy/sympy/pull/14735#discussion_r194333828"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/14735"}}},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/14735","id":189867348,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5ODY3MzQ4","html_url":"https://github.com/sympy/sympy/pull/14735","diff_url":"https://github.com/sympy/sympy/pull/14735.diff","patch_url":"https://github.com/sympy/sympy/pull/14735.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/14735","number":14735,"state":"open","locked":false,"title":"Add automaton for word reduction in rewriting systems","user":{"login":"RavicharanN","id":22046387,"node_id":"MDQ6VXNlcjIyMDQ2Mzg3","avatar_url":"https://avatars1.githubusercontent.com/u/22046387?v=4","gravatar_id":"","url":"https://api.github.com/users/RavicharanN","html_url":"https://github.com/RavicharanN","followers_url":"https://api.github.com/users/RavicharanN/followers","following_url":"https://api.github.com/users/RavicharanN/following{/other_user}","gists_url":"https://api.github.com/users/RavicharanN/gists{/gist_id}","starred_url":"https://api.github.com/users/RavicharanN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RavicharanN/subscriptions","organizations_url":"https://api.github.com/users/RavicharanN/orgs","repos_url":"https://api.github.com/users/RavicharanN/repos","events_url":"https://api.github.com/users/RavicharanN/events{/privacy}","received_events_url":"https://api.github.com/users/RavicharanN/received_events","type":"User","site_admin":false},"body":"<!-- Your title above should be a short description of what\r\nwas changed. Do not include the issue number in the title. -->\r\nImplement an automaton for word reduction.\r\n#### References to other Issues or PRs\r\n<!-- If this pull request fixes an issue, write \"Fixes #NNNN\" in that exact\r\nformat, e.g. \"Fixes #1234\". See\r\nhttps://github.com/blog/1506-closing-issues-via-pull-requests .-->\r\n\r\n\r\n#### Brief description of what is fixed or changed\r\nA custom class for a `StateMachine` and the `State` of the finite state machine have been added in a new file `rewriting_fsm`.\r\nTwo new methods, `construct_automaton` and `reduce_using_automaton` have been added to the `RewritingSystem` class. \r\n\r\n#### Other comments\r\nCurrently, the word is reduced using automaton as:\r\n```\r\n>>> from sympy.combinatorics.fp_groups import FpGroup\r\n>>> from sympy.combinatorics.free_groups import free_group\r\n>>> F, a, b = free_group(\"a, b\")\r\n>>> G = FpGroup(F, [a*b*a**-1*b**-1])\r\n>>> a, b = G.generators\r\n>>> R = G._rewriting_system\r\n>>> R.reduce_using_automaton(b**2*a*b**3)\r\na*b**5\r\n```\r\n #### To-do: \r\n* Add references and improve the documentation.\r\n* Add tests for the implementation of StateMachine.\r\n\r\n\r\n","created_at":"2018-05-23T06:21:41Z","updated_at":"2018-06-11T08:58:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"758d3886113f900470d9673796c6364a44bc2cd6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":222449974,"node_id":"MDU6TGFiZWwyMjI0NDk5NzQ=","url":"https://api.github.com/repos/sympy/sympy/labels/PR:%20author's%20turn","name":"PR: author's turn","color":"ffff80","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/14735/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/14735/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/14735/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/bfbb65042f29c746bdf5fde47cbd9b428d3b2b9a","head":{"label":"RavicharanN:automata","ref":"automata","sha":"bfbb65042f29c746bdf5fde47cbd9b428d3b2b9a","user":{"login":"RavicharanN","id":22046387,"node_id":"MDQ6VXNlcjIyMDQ2Mzg3","avatar_url":"https://avatars1.githubusercontent.com/u/22046387?v=4","gravatar_id":"","url":"https://api.github.com/users/RavicharanN","html_url":"https://github.com/RavicharanN","followers_url":"https://api.github.com/users/RavicharanN/followers","following_url":"https://api.github.com/users/RavicharanN/following{/other_user}","gists_url":"https://api.github.com/users/RavicharanN/gists{/gist_id}","starred_url":"https://api.github.com/users/RavicharanN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RavicharanN/subscriptions","organizations_url":"https://api.github.com/users/RavicharanN/orgs","repos_url":"https://api.github.com/users/RavicharanN/repos","events_url":"https://api.github.com/users/RavicharanN/events{/privacy}","received_events_url":"https://api.github.com/users/RavicharanN/received_events","type":"User","site_admin":false},"repo":{"id":118352566,"node_id":"MDEwOlJlcG9zaXRvcnkxMTgzNTI1NjY=","name":"sympy","full_name":"RavicharanN/sympy","owner":{"login":"RavicharanN","id":22046387,"node_id":"MDQ6VXNlcjIyMDQ2Mzg3","avatar_url":"https://avatars1.githubusercontent.com/u/22046387?v=4","gravatar_id":"","url":"https://api.github.com/users/RavicharanN","html_url":"https://github.com/RavicharanN","followers_url":"https://api.github.com/users/RavicharanN/followers","following_url":"https://api.github.com/users/RavicharanN/following{/other_user}","gists_url":"https://api.github.com/users/RavicharanN/gists{/gist_id}","starred_url":"https://api.github.com/users/RavicharanN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RavicharanN/subscriptions","organizations_url":"https://api.github.com/users/RavicharanN/orgs","repos_url":"https://api.github.com/users/RavicharanN/repos","events_url":"https://api.github.com/users/RavicharanN/events{/privacy}","received_events_url":"https://api.github.com/users/RavicharanN/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RavicharanN/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/RavicharanN/sympy","forks_url":"https://api.github.com/repos/RavicharanN/sympy/forks","keys_url":"https://api.github.com/repos/RavicharanN/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RavicharanN/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RavicharanN/sympy/teams","hooks_url":"https://api.github.com/repos/RavicharanN/sympy/hooks","issue_events_url":"https://api.github.com/repos/RavicharanN/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/RavicharanN/sympy/events","assignees_url":"https://api.github.com/repos/RavicharanN/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/RavicharanN/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/RavicharanN/sympy/tags","blobs_url":"https://api.github.com/repos/RavicharanN/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RavicharanN/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RavicharanN/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/RavicharanN/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RavicharanN/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/RavicharanN/sympy/languages","stargazers_url":"https://api.github.com/repos/RavicharanN/sympy/stargazers","contributors_url":"https://api.github.com/repos/RavicharanN/sympy/contributors","subscribers_url":"https://api.github.com/repos/RavicharanN/sympy/subscribers","subscription_url":"https://api.github.com/repos/RavicharanN/sympy/subscription","commits_url":"https://api.github.com/repos/RavicharanN/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/RavicharanN/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/RavicharanN/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/RavicharanN/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/RavicharanN/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/RavicharanN/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RavicharanN/sympy/merges","archive_url":"https://api.github.com/repos/RavicharanN/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RavicharanN/sympy/downloads","issues_url":"https://api.github.com/repos/RavicharanN/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/RavicharanN/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/RavicharanN/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/RavicharanN/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RavicharanN/sympy/labels{/name}","releases_url":"https://api.github.com/repos/RavicharanN/sympy/releases{/id}","deployments_url":"https://api.github.com/repos/RavicharanN/sympy/deployments","created_at":"2018-01-21T16:33:46Z","updated_at":"2018-06-04T17:54:00Z","pushed_at":"2018-06-10T18:36:43Z","git_url":"git://github.com/RavicharanN/sympy.git","ssh_url":"git@github.com:RavicharanN/sympy.git","clone_url":"https://github.com/RavicharanN/sympy.git","svn_url":"https://github.com/RavicharanN/sympy","homepage":"http://sympy.org/","size":90917,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sympy:master","ref":"master","sha":"5a72d3b887831600ed67dcb5daf44e43c742cce7","user":{"login":"sympy","id":260832,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDgzMg==","avatar_url":"https://avatars1.githubusercontent.com/u/260832?v=4","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"repo":{"id":640534,"node_id":"MDEwOlJlcG9zaXRvcnk2NDA1MzQ=","name":"sympy","full_name":"sympy/sympy","owner":{"login":"sympy","id":260832,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDgzMg==","avatar_url":"https://avatars1.githubusercontent.com/u/260832?v=4","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sympy/sympy","description":"A computer algebra system written in pure Python","fork":false,"url":"https://api.github.com/repos/sympy/sympy","forks_url":"https://api.github.com/repos/sympy/sympy/forks","keys_url":"https://api.github.com/repos/sympy/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sympy/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sympy/sympy/teams","hooks_url":"https://api.github.com/repos/sympy/sympy/hooks","issue_events_url":"https://api.github.com/repos/sympy/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/sympy/sympy/events","assignees_url":"https://api.github.com/repos/sympy/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/sympy/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/sympy/sympy/tags","blobs_url":"https://api.github.com/repos/sympy/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sympy/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sympy/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sympy/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/sympy/sympy/languages","stargazers_url":"https://api.github.com/repos/sympy/sympy/stargazers","contributors_url":"https://api.github.com/repos/sympy/sympy/contributors","subscribers_url":"https://api.github.com/repos/sympy/sympy/subscribers","subscription_url":"https://api.github.com/repos/sympy/sympy/subscription","commits_url":"https://api.github.com/repos/sympy/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sympy/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sympy/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sympy/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sympy/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/sympy/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sympy/sympy/merges","archive_url":"https://api.github.com/repos/sympy/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sympy/sympy/downloads","issues_url":"https://api.github.com/repos/sympy/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/sympy/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/sympy/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/sympy/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sympy/sympy/labels{/name}","releases_url":"https://api.github.com/repos/sympy/sympy/releases{/id}","deployments_url":"https://api.github.com/repos/sympy/sympy/deployments","created_at":"2010-04-30T20:37:14Z","updated_at":"2018-06-11T02:26:48Z","pushed_at":"2018-06-10T23:47:31Z","git_url":"git://github.com/sympy/sympy.git","ssh_url":"git@github.com:sympy/sympy.git","clone_url":"https://github.com/sympy/sympy.git","svn_url":"https://github.com/sympy/sympy","homepage":"http://sympy.org/","size":90902,"stargazers_count":4890,"watchers_count":4890,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2288,"mirror_url":null,"archived":false,"open_issues_count":3341,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2288,"open_issues":3341,"watchers":4890,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/14735"},"html":{"href":"https://github.com/sympy/sympy/pull/14735"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/14735"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/14735/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/14735/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/14735/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/bfbb65042f29c746bdf5fde47cbd9b428d3b2b9a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"valglad"}}