{"action":"created","comment":{"url":"https://api.github.com/repos/mantidproject/mantid/pulls/comments/60796843","id":60796843,"diff_hunk":"@@ -0,0 +1,411 @@\n+# pylint: disable=too-many-branches,too-many-statements, superfluous-parens\n+\n+from mantid.simpleapi import *\n+\n+\n+def get_calibration_dir(cycle, tt_mode, pearl_file_dir):\n+    if (cycle == \"15_4\"):","path":"scripts/PearlPowderISIS/pearl_calib_factory.py","position":7,"original_position":7,"commit_id":"8905facb2f3aa6af427df2523000afcdd1e5750f","original_commit_id":"8905facb2f3aa6af427df2523000afcdd1e5750f","user":{"login":"quantumsteve","id":5920552,"avatar_url":"https://avatars.githubusercontent.com/u/5920552?v=3","gravatar_id":"","url":"https://api.github.com/users/quantumsteve","html_url":"https://github.com/quantumsteve","followers_url":"https://api.github.com/users/quantumsteve/followers","following_url":"https://api.github.com/users/quantumsteve/following{/other_user}","gists_url":"https://api.github.com/users/quantumsteve/gists{/gist_id}","starred_url":"https://api.github.com/users/quantumsteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quantumsteve/subscriptions","organizations_url":"https://api.github.com/users/quantumsteve/orgs","repos_url":"https://api.github.com/users/quantumsteve/repos","events_url":"https://api.github.com/users/quantumsteve/events{/privacy}","received_events_url":"https://api.github.com/users/quantumsteve/received_events","type":"User","site_admin":false},"body":"Why are you suppressing too-many-branches? the function `get_calibration_dir` has a really high cyclomatic complexity and should be replaced with associative containers.","created_at":"2016-04-22T20:15:45Z","updated_at":"2016-04-22T20:15:45Z","html_url":"https://github.com/mantidproject/mantid/pull/15946#discussion_r60796843","pull_request_url":"https://api.github.com/repos/mantidproject/mantid/pulls/15946","_links":{"self":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/comments/60796843"},"html":{"href":"https://github.com/mantidproject/mantid/pull/15946#discussion_r60796843"},"pull_request":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/15946"}}},"pull_request":{"url":"https://api.github.com/repos/mantidproject/mantid/pulls/15946","id":67164420,"html_url":"https://github.com/mantidproject/mantid/pull/15946","diff_url":"https://github.com/mantidproject/mantid/pull/15946.diff","patch_url":"https://github.com/mantidproject/mantid/pull/15946.patch","issue_url":"https://api.github.com/repos/mantidproject/mantid/issues/15946","number":15946,"state":"open","locked":false,"title":"Intregration of the Pearl powder diffraction script","user":{"login":"shahrozahmed1","id":13132173,"avatar_url":"https://avatars.githubusercontent.com/u/13132173?v=3","gravatar_id":"","url":"https://api.github.com/users/shahrozahmed1","html_url":"https://github.com/shahrozahmed1","followers_url":"https://api.github.com/users/shahrozahmed1/followers","following_url":"https://api.github.com/users/shahrozahmed1/following{/other_user}","gists_url":"https://api.github.com/users/shahrozahmed1/gists{/gist_id}","starred_url":"https://api.github.com/users/shahrozahmed1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shahrozahmed1/subscriptions","organizations_url":"https://api.github.com/users/shahrozahmed1/orgs","repos_url":"https://api.github.com/users/shahrozahmed1/repos","events_url":"https://api.github.com/users/shahrozahmed1/events{/privacy}","received_events_url":"https://api.github.com/users/shahrozahmed1/received_events","type":"User","site_admin":false},"body":"**Description of work**\r\nThis particular script has being utilised by the `Pearl` instrument scientists at ISIS for quite few years now. The script is still in initial stages but it is now made compatible with Mantid; the routines have been differentiated from the list of directories of `calibration` and `raw` files. The script can be further simplified but an initial script and `system test` before making any further changes would be more sensible.\r\n\r\nThis script can be found within `Script/PearlPowderISIS` and the aziz script has been renamed from `PowderISIS` to `CryPowderISIS` to avoid any confusion.\r\n\r\n@FedeMPouzols I think you also have permission to access `\\\\britannic\\Pearl\\Mantid`, this will enable you see the structure of folder used by the Pearl scientists while using this script. In order to run/test this script you can either `map a network drive` linking `P:\\`to `\\\\britannic\\Pearl\\` and `X:` to `\\\\isis\\inst$\\NDXPEARL\\Instrument` or use the folder and files from `\\\\olympic\\Babylon5\\Public\\Shahroz\\PEARL`\r\n\r\n**To test:**\r\n\r\nIf you manage to `map a network drive` like explained above then:\r\n*It will fail in the end because you cannot write on the drive but that's normal, as we don't have permission to write on the pearl network drive.*\r\n```\r\nimport pearl_routines\r\n\r\npearl_routines.PEARL_startup(\"Mantid_Developer\",\"15_4\")\r\n\r\npearl_routines.PEARL_setattenfile(new_atten=\"P:\\Mantid\\\\Attentuation\\\\PRL112_DC25_10MM_FF.OUT\")\r\n\r\npearl_routines.PEARL_focus(\"92476_92479\",\"raw\",fmode=\"trans\",ttmode=\"TT70\",atten=True,van_norm=True,debug=False)\r\n```\r\n\r\nUnless you can run the file by using the following script:\r\nIf it doesn't work I think you may need to copy and paste those files on to your local machine and reset the directories in the script, because Mantid seems to complaining about reading from network file for me. \r\n\r\n```\r\nimport pearl_routines\r\n\r\npearl_routines.PEARL_startup(\"Mantid_developer\",\"15_4\")\r\n\r\n# set the directory of files according to their location\r\ncurrentDir = pearl_routines.pearl_set_currentdatadir(\"\\\\olympic\\\\Babylon5\\\\Public\\\\Shahroz\\\\PEARL\\\\RawFiles\\\\\")\r\npearl_routines.PEARL_setdatadir(currentDir)\r\npearl_routines.pearl_initial_dir(\"\\\\olympic\\\\Babylon5\\\\Public\\\\Shahroz\\\\PEARL\\\\\")\r\npearl_routines.PEARL_setattenfile(new_atten=\"\\\\olympic\\\\Babylon5\\\\Public\\\\Shahroz\\\\PEARL\\\\Attentuation\\PRL112_DC25_10MM_FF.OUT\")\r\npearl_routines.pearl_set_userdataoutput_dir(\"\\\\olympic\\\\Babylon5\\\\Public\\\\Shahroz\\\\PEARL\\\\DataOut\\\\\")\r\n\r\npearl_routines.PEARL_focus(\"92476_92479\",\"raw\",fmode=\"trans\",ttmode=\"TT70\",atten=True,van_norm=True,debug=True)\r\n\r\n```\r\n\r\nCheck all `ISISPowderDiffraction...` system test pass.\r\nYou can even try the script provided by scientists if you have `map to a network drive` set up\r\n\r\n<!-- Instructions for testing. -->\r\n\r\nFixes #15572.\r\n[RELEASE NOTES](https://github.com/mantidproject/mantid/blob/15572_intregration_of_pearl_powder_diffraction_routines/docs/source/release/v3.7.0/diffraction.rst)\r\n\r\n<!-- RELEASE NOTES\r\nEither edit the file in docs/source/release/... and it will be in your pull request or state\r\n*Does not need to be in the release notes.*\r\n-->\r\n\r\n---\r\n\r\n#### Reviewer ####\r\n\r\nPlease comment on the following ([full description](http://www.mantidproject.org/Individual_Ticket_Testing)):\r\n\r\n##### Code Review #####\r\n\r\n- [x] Is the code of an acceptable quality?\r\n- [ ] Does the code conform to the coding standards? Is it well structured with small focussed classes/methods/functions?\r\n- [ ] Are there unit/system tests in place? Are the unit tests small and test the a class in isolation?\r\n- [ ] If there are changes in the release notes then do they describe the changes appropriately?\r\n\r\n##### Functional Tests #####\r\n\r\n- [x] Do changes function as described? Add comments below that describe the tests performed?\r\n- [x] How do the changes handle unexpected situations, e.g. bad input?\r\n- [ ] Has the relevant documentation been added/updated?\r\n- [ ] Is user-facing documentation written in a user-friendly manner?\r\n- [ ] Has developer documentation been updated if required?\r\n\r\n- Does everything look good? Comment with the ship it emoji but don't merge. A member of `@mantidproject/gatekeepers` will take care of it.","created_at":"2016-04-20T10:39:14Z","updated_at":"2016-04-22T20:15:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec3deb79e29947f16e79365afcc6b89df7cbbb4d","assignee":{"login":"FedeMPouzols","id":5257172,"avatar_url":"https://avatars.githubusercontent.com/u/5257172?v=3","gravatar_id":"","url":"https://api.github.com/users/FedeMPouzols","html_url":"https://github.com/FedeMPouzols","followers_url":"https://api.github.com/users/FedeMPouzols/followers","following_url":"https://api.github.com/users/FedeMPouzols/following{/other_user}","gists_url":"https://api.github.com/users/FedeMPouzols/gists{/gist_id}","starred_url":"https://api.github.com/users/FedeMPouzols/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FedeMPouzols/subscriptions","organizations_url":"https://api.github.com/users/FedeMPouzols/orgs","repos_url":"https://api.github.com/users/FedeMPouzols/repos","events_url":"https://api.github.com/users/FedeMPouzols/events{/privacy}","received_events_url":"https://api.github.com/users/FedeMPouzols/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mantidproject/mantid/milestones/5","html_url":"https://github.com/mantidproject/mantid/milestones/Release%203.7","labels_url":"https://api.github.com/repos/mantidproject/mantid/milestones/5/labels","id":1106939,"number":5,"title":"Release 3.7","description":"","creator":{"login":"peterfpeterson","id":404003,"avatar_url":"https://avatars.githubusercontent.com/u/404003?v=3","gravatar_id":"","url":"https://api.github.com/users/peterfpeterson","html_url":"https://github.com/peterfpeterson","followers_url":"https://api.github.com/users/peterfpeterson/followers","following_url":"https://api.github.com/users/peterfpeterson/following{/other_user}","gists_url":"https://api.github.com/users/peterfpeterson/gists{/gist_id}","starred_url":"https://api.github.com/users/peterfpeterson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterfpeterson/subscriptions","organizations_url":"https://api.github.com/users/peterfpeterson/orgs","repos_url":"https://api.github.com/users/peterfpeterson/repos","events_url":"https://api.github.com/users/peterfpeterson/events{/privacy}","received_events_url":"https://api.github.com/users/peterfpeterson/received_events","type":"User","site_admin":false},"open_issues":577,"closed_issues":622,"state":"open","created_at":"2015-05-12T15:38:13Z","updated_at":"2016-04-22T19:31:24Z","due_on":"2016-06-05T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mantidproject/mantid/pulls/15946/commits","review_comments_url":"https://api.github.com/repos/mantidproject/mantid/pulls/15946/comments","review_comment_url":"https://api.github.com/repos/mantidproject/mantid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mantidproject/mantid/issues/15946/comments","statuses_url":"https://api.github.com/repos/mantidproject/mantid/statuses/8905facb2f3aa6af427df2523000afcdd1e5750f","head":{"label":"mantidproject:15572_intregration_of_pearl_powder_diffraction_routines","ref":"15572_intregration_of_pearl_powder_diffraction_routines","sha":"8905facb2f3aa6af427df2523000afcdd1e5750f","user":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"repo":{"id":2594116,"name":"mantid","full_name":"mantidproject/mantid","owner":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mantidproject/mantid","description":"Main repository for Mantid code","fork":false,"url":"https://api.github.com/repos/mantidproject/mantid","forks_url":"https://api.github.com/repos/mantidproject/mantid/forks","keys_url":"https://api.github.com/repos/mantidproject/mantid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mantidproject/mantid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mantidproject/mantid/teams","hooks_url":"https://api.github.com/repos/mantidproject/mantid/hooks","issue_events_url":"https://api.github.com/repos/mantidproject/mantid/issues/events{/number}","events_url":"https://api.github.com/repos/mantidproject/mantid/events","assignees_url":"https://api.github.com/repos/mantidproject/mantid/assignees{/user}","branches_url":"https://api.github.com/repos/mantidproject/mantid/branches{/branch}","tags_url":"https://api.github.com/repos/mantidproject/mantid/tags","blobs_url":"https://api.github.com/repos/mantidproject/mantid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mantidproject/mantid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mantidproject/mantid/git/refs{/sha}","trees_url":"https://api.github.com/repos/mantidproject/mantid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mantidproject/mantid/statuses/{sha}","languages_url":"https://api.github.com/repos/mantidproject/mantid/languages","stargazers_url":"https://api.github.com/repos/mantidproject/mantid/stargazers","contributors_url":"https://api.github.com/repos/mantidproject/mantid/contributors","subscribers_url":"https://api.github.com/repos/mantidproject/mantid/subscribers","subscription_url":"https://api.github.com/repos/mantidproject/mantid/subscription","commits_url":"https://api.github.com/repos/mantidproject/mantid/commits{/sha}","git_commits_url":"https://api.github.com/repos/mantidproject/mantid/git/commits{/sha}","comments_url":"https://api.github.com/repos/mantidproject/mantid/comments{/number}","issue_comment_url":"https://api.github.com/repos/mantidproject/mantid/issues/comments{/number}","contents_url":"https://api.github.com/repos/mantidproject/mantid/contents/{+path}","compare_url":"https://api.github.com/repos/mantidproject/mantid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mantidproject/mantid/merges","archive_url":"https://api.github.com/repos/mantidproject/mantid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mantidproject/mantid/downloads","issues_url":"https://api.github.com/repos/mantidproject/mantid/issues{/number}","pulls_url":"https://api.github.com/repos/mantidproject/mantid/pulls{/number}","milestones_url":"https://api.github.com/repos/mantidproject/mantid/milestones{/number}","notifications_url":"https://api.github.com/repos/mantidproject/mantid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mantidproject/mantid/labels{/name}","releases_url":"https://api.github.com/repos/mantidproject/mantid/releases{/id}","deployments_url":"https://api.github.com/repos/mantidproject/mantid/deployments","created_at":"2011-10-17T19:07:38Z","updated_at":"2016-04-13T03:21:14Z","pushed_at":"2016-04-22T19:31:25Z","git_url":"git://github.com/mantidproject/mantid.git","ssh_url":"git@github.com:mantidproject/mantid.git","clone_url":"https://github.com/mantidproject/mantid.git","svn_url":"https://github.com/mantidproject/mantid","homepage":"www.mantidproject.org","size":406399,"stargazers_count":41,"watchers_count":41,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":1513,"forks":29,"open_issues":1513,"watchers":41,"default_branch":"master"}},"base":{"label":"mantidproject:master","ref":"master","sha":"037d1c965e3885bf2bf0a78833ffa5f0ce490424","user":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"repo":{"id":2594116,"name":"mantid","full_name":"mantidproject/mantid","owner":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mantidproject/mantid","description":"Main repository for Mantid code","fork":false,"url":"https://api.github.com/repos/mantidproject/mantid","forks_url":"https://api.github.com/repos/mantidproject/mantid/forks","keys_url":"https://api.github.com/repos/mantidproject/mantid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mantidproject/mantid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mantidproject/mantid/teams","hooks_url":"https://api.github.com/repos/mantidproject/mantid/hooks","issue_events_url":"https://api.github.com/repos/mantidproject/mantid/issues/events{/number}","events_url":"https://api.github.com/repos/mantidproject/mantid/events","assignees_url":"https://api.github.com/repos/mantidproject/mantid/assignees{/user}","branches_url":"https://api.github.com/repos/mantidproject/mantid/branches{/branch}","tags_url":"https://api.github.com/repos/mantidproject/mantid/tags","blobs_url":"https://api.github.com/repos/mantidproject/mantid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mantidproject/mantid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mantidproject/mantid/git/refs{/sha}","trees_url":"https://api.github.com/repos/mantidproject/mantid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mantidproject/mantid/statuses/{sha}","languages_url":"https://api.github.com/repos/mantidproject/mantid/languages","stargazers_url":"https://api.github.com/repos/mantidproject/mantid/stargazers","contributors_url":"https://api.github.com/repos/mantidproject/mantid/contributors","subscribers_url":"https://api.github.com/repos/mantidproject/mantid/subscribers","subscription_url":"https://api.github.com/repos/mantidproject/mantid/subscription","commits_url":"https://api.github.com/repos/mantidproject/mantid/commits{/sha}","git_commits_url":"https://api.github.com/repos/mantidproject/mantid/git/commits{/sha}","comments_url":"https://api.github.com/repos/mantidproject/mantid/comments{/number}","issue_comment_url":"https://api.github.com/repos/mantidproject/mantid/issues/comments{/number}","contents_url":"https://api.github.com/repos/mantidproject/mantid/contents/{+path}","compare_url":"https://api.github.com/repos/mantidproject/mantid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mantidproject/mantid/merges","archive_url":"https://api.github.com/repos/mantidproject/mantid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mantidproject/mantid/downloads","issues_url":"https://api.github.com/repos/mantidproject/mantid/issues{/number}","pulls_url":"https://api.github.com/repos/mantidproject/mantid/pulls{/number}","milestones_url":"https://api.github.com/repos/mantidproject/mantid/milestones{/number}","notifications_url":"https://api.github.com/repos/mantidproject/mantid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mantidproject/mantid/labels{/name}","releases_url":"https://api.github.com/repos/mantidproject/mantid/releases{/id}","deployments_url":"https://api.github.com/repos/mantidproject/mantid/deployments","created_at":"2011-10-17T19:07:38Z","updated_at":"2016-04-13T03:21:14Z","pushed_at":"2016-04-22T19:31:25Z","git_url":"git://github.com/mantidproject/mantid.git","ssh_url":"git@github.com:mantidproject/mantid.git","clone_url":"https://github.com/mantidproject/mantid.git","svn_url":"https://github.com/mantidproject/mantid","homepage":"www.mantidproject.org","size":406399,"stargazers_count":41,"watchers_count":41,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":1513,"forks":29,"open_issues":1513,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/15946"},"html":{"href":"https://github.com/mantidproject/mantid/pull/15946"},"issue":{"href":"https://api.github.com/repos/mantidproject/mantid/issues/15946"},"comments":{"href":"https://api.github.com/repos/mantidproject/mantid/issues/15946/comments"},"review_comments":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/15946/comments"},"review_comment":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/15946/commits"},"statuses":{"href":"https://api.github.com/repos/mantidproject/mantid/statuses/8905facb2f3aa6af427df2523000afcdd1e5750f"}}}}