{"action":"created","issue":{"url":"https://api.github.com/repos/gramps-project/gramps/issues/237","repository_url":"https://api.github.com/repos/gramps-project/gramps","labels_url":"https://api.github.com/repos/gramps-project/gramps/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/gramps-project/gramps/issues/237/comments","events_url":"https://api.github.com/repos/gramps-project/gramps/issues/237/events","html_url":"https://github.com/gramps-project/gramps/pull/237","id":177226287,"number":237,"title":"Update Check & Repair tool & Test Case Generator tool to fix bad alternative Place names","user":{"login":"prculley","id":18122203,"avatar_url":"https://avatars.githubusercontent.com/u/18122203?v=3","gravatar_id":"","url":"https://api.github.com/users/prculley","html_url":"https://github.com/prculley","followers_url":"https://api.github.com/users/prculley/followers","following_url":"https://api.github.com/users/prculley/following{/other_user}","gists_url":"https://api.github.com/users/prculley/gists{/gist_id}","starred_url":"https://api.github.com/users/prculley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prculley/subscriptions","organizations_url":"https://api.github.com/users/prculley/orgs","repos_url":"https://api.github.com/users/prculley/repos","events_url":"https://api.github.com/users/prculley/events{/privacy}","received_events_url":"https://api.github.com/users/prculley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gramps-project/gramps/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2016-09-15T16:37:53Z","updated_at":"2016-09-27T22:16:58Z","closed_at":"2016-09-27T22:16:51Z","pull_request":{"url":"https://api.github.com/repos/gramps-project/gramps/pulls/237","html_url":"https://github.com/gramps-project/gramps/pull/237","diff_url":"https://github.com/gramps-project/gramps/pull/237.diff","patch_url":"https://github.com/gramps-project/gramps/pull/237.patch"},"body":"The Check & Repair (C&R) tool has been enhanced to fix Place alternate names entries that are blank, or duplicates of each other or primary name.\r\n\r\nIn order to test the modified C&R, the Test Case Generator (TCG) has been enhanced to create bugs in alt place names like those fixed in C&R above.  I used this to manually create a db and then watch C&R correct the created bugs.\r\n\r\nI also used an old version of Gramps (4.2.2) to generate a db with these bugs based on an import of a Gedcom file that exercised the place code (and found the bugs to begin with).  And used C&R to fix them while under observation.\r\n\r\nTCG contains some quite useful code already in that it creates bugs that C&R can fix.  In order to use TCG as a test tool, however, it needs to be repeatable.  TCG uses a lot of random number generation to create test cases, names etc.  So I modified TCG to use a private copy of the random number generator, and to expose that random generator where a unit test code can find it to arrange a seed.  Under normal conditions, TCG is not seeded, so remains as random as usual.\r\n\r\nI also did a very little pylint cleanup on lines I was already modifying, so the diff shows more in-a-line changes than the search & replace for random/randint/choice accounts for.\r\n\r\nI also created a unittest module 'test_tools.py' which currently uses TCG to create a database that C&R can repair.  This module loads a small '.gramps' file to start things off, then seeds TCG's random generator for repeat-ability, and uses TCG to create the db.  Finally I use Gramps again to run C&R.  At each step, expected results are captured and compared.\r\n\r\nP.S. I expect that this PR will conflict with an earlier TCG PR (236); I will rebase and correct after that one is accepted."},"comment":{"url":"https://api.github.com/repos/gramps-project/gramps/issues/comments/250015630","html_url":"https://github.com/gramps-project/gramps/pull/237#issuecomment-250015630","issue_url":"https://api.github.com/repos/gramps-project/gramps/issues/237","id":250015630,"user":{"login":"sam-m888","id":8924713,"avatar_url":"https://avatars.githubusercontent.com/u/8924713?v=3","gravatar_id":"","url":"https://api.github.com/users/sam-m888","html_url":"https://github.com/sam-m888","followers_url":"https://api.github.com/users/sam-m888/followers","following_url":"https://api.github.com/users/sam-m888/following{/other_user}","gists_url":"https://api.github.com/users/sam-m888/gists{/gist_id}","starred_url":"https://api.github.com/users/sam-m888/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam-m888/subscriptions","organizations_url":"https://api.github.com/users/sam-m888/orgs","repos_url":"https://api.github.com/users/sam-m888/repos","events_url":"https://api.github.com/users/sam-m888/events{/privacy}","received_events_url":"https://api.github.com/users/sam-m888/received_events","type":"User","site_admin":false},"created_at":"2016-09-27T22:16:58Z","updated_at":"2016-09-27T22:16:58Z","body":"Thank you"}}
{"actor":{"display_login":"sam-m888"}}