{"action":"created","comment":{"url":"https://api.github.com/repos/ganga-devs/ganga/pulls/comments/79375301","id":79375301,"diff_hunk":"@@ -4,10 +4,49 @@\n import datetime\n import glob\n import pickle\n+from funcutils import wraps\n ## NB parseCommandLine first then import Dirac!!\n from DIRAC.Core.Base.Script import parseCommandLine\n parseCommandLine()\n from LHCbDIRAC.Interfaces.API.DiracLHCb import DiracLHCb\n from DIRAC.Interfaces.API.DiracAdmin import DiracAdmin\n dirac = DiracLHCb()\n \n+def diracCommand(f):","path":"python/GangaLHCb/Lib/Server/DiracLHCbDefinition.py","position":12,"original_position":12,"commit_id":"76341e9e5e9a5b9700c785407a6d011d3a9a4b8f","original_commit_id":"76341e9e5e9a5b9700c785407a6d011d3a9a4b8f","user":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"body":"Unless we move the definition into the Commands which I'm not sure are (or are needed to be) loaded when performing a BKQuery operation.","created_at":"2016-09-19T11:59:17Z","updated_at":"2016-09-19T11:59:17Z","html_url":"https://github.com/ganga-devs/ganga/pull/788#discussion_r79375301","pull_request_url":"https://api.github.com/repos/ganga-devs/ganga/pulls/788","_links":{"self":{"href":"https://api.github.com/repos/ganga-devs/ganga/pulls/comments/79375301"},"html":{"href":"https://github.com/ganga-devs/ganga/pull/788#discussion_r79375301"},"pull_request":{"href":"https://api.github.com/repos/ganga-devs/ganga/pulls/788"}}},"pull_request":{"url":"https://api.github.com/repos/ganga-devs/ganga/pulls/788","id":85220662,"html_url":"https://github.com/ganga-devs/ganga/pull/788","diff_url":"https://github.com/ganga-devs/ganga/pull/788.diff","patch_url":"https://github.com/ganga-devs/ganga/pull/788.patch","issue_url":"https://api.github.com/repos/ganga-devs/ganga/issues/788","number":788,"state":"open","locked":false,"title":"work to stabilize GangaDirac API","user":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"body":"This PR addresses several different things.\r\nFixes #786 \r\n\r\n 1. This class fixes a bug in the `Ganga/Utility/execute.py` a deepcopy is needed to avoid a random difficult to track down bug\r\n 2. I've added `GangDiracException` which is thrown from `GangaDirac/Lib/Utility/DiracUtilities.py`\r\n 3. I've added a wrapper within the DIRAC server code which ensures that a dictionary object is always returned through the streams to Ganga.\r\n 4. By default I've made sure that the ~~`DiracUtility`~~ `execute` function (`GangaDirac/Lib/Utilities/DiracUtilities.py`) now returns the `Value` or raises an appropriate `GangaDiracException` as this is the safest and imo best default implementation.\r\nWe can change this to return the dict by default and only inspect the dict on request but this is a point for discussion.\r\n 5. I've separated tests which require a DIRAC proxy from tests which don't require a DIRAC proxy.\r\nAll tests requiring something to be returned via the stdout require a proxy otherwise DIRAC pollutes the stdout. If the test wants to test the executable method only it should do so explicitly.\r\nThis is not exposed to users and users are required to have a DIRAC proxy to talk to DIRAC within Ganga.\r\n 6. Updated the tests to check for the dict always being returned from the `execute` method. This allows for better test failures.\r\n 7. Updated the appropriate code in `GangaLHCb`, `DiracBase` and `DiracFile` to work correctly with these changes.\r\n\r\nI'm not looking to merge this now but the tests should work.\r\nIf they don't I've made a mistake in rebasing this and will do so again later today.\r\n\r\nFeel free to take a look through the code and as always.\r\n\r\nEdit:\r\nAlso:\r\n 1. Migrated the execute tests to Core tests. Fixed some bugs exposed by using this over the Dirac wrapper to this.","created_at":"2016-09-14T12:44:33Z","updated_at":"2016-09-19T11:59:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eae05b5c376ebeb4d50874314efd94c9d37e639d","assignee":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"assignees":[{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ganga-devs/ganga/milestones/15","html_url":"https://github.com/ganga-devs/ganga/milestones/6.3.0","labels_url":"https://api.github.com/repos/ganga-devs/ganga/milestones/15/labels","id":1957667,"number":15,"title":"6.3.0","description":"","creator":{"login":"drmarkwslater","id":13677368,"avatar_url":"https://avatars.githubusercontent.com/u/13677368?v=3","gravatar_id":"","url":"https://api.github.com/users/drmarkwslater","html_url":"https://github.com/drmarkwslater","followers_url":"https://api.github.com/users/drmarkwslater/followers","following_url":"https://api.github.com/users/drmarkwslater/following{/other_user}","gists_url":"https://api.github.com/users/drmarkwslater/gists{/gist_id}","starred_url":"https://api.github.com/users/drmarkwslater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drmarkwslater/subscriptions","organizations_url":"https://api.github.com/users/drmarkwslater/orgs","repos_url":"https://api.github.com/users/drmarkwslater/repos","events_url":"https://api.github.com/users/drmarkwslater/events{/privacy}","received_events_url":"https://api.github.com/users/drmarkwslater/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":1,"state":"open","created_at":"2016-08-23T10:49:25Z","updated_at":"2016-09-16T19:36:54Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/ganga-devs/ganga/pulls/788/commits","review_comments_url":"https://api.github.com/repos/ganga-devs/ganga/pulls/788/comments","review_comment_url":"https://api.github.com/repos/ganga-devs/ganga/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ganga-devs/ganga/issues/788/comments","statuses_url":"https://api.github.com/repos/ganga-devs/ganga/statuses/76341e9e5e9a5b9700c785407a6d011d3a9a4b8f","head":{"label":"ganga-devs:DIRACstabilityWork","ref":"DIRACstabilityWork","sha":"76341e9e5e9a5b9700c785407a6d011d3a9a4b8f","user":{"login":"ganga-devs","id":13271048,"avatar_url":"https://avatars.githubusercontent.com/u/13271048?v=3","gravatar_id":"","url":"https://api.github.com/users/ganga-devs","html_url":"https://github.com/ganga-devs","followers_url":"https://api.github.com/users/ganga-devs/followers","following_url":"https://api.github.com/users/ganga-devs/following{/other_user}","gists_url":"https://api.github.com/users/ganga-devs/gists{/gist_id}","starred_url":"https://api.github.com/users/ganga-devs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganga-devs/subscriptions","organizations_url":"https://api.github.com/users/ganga-devs/orgs","repos_url":"https://api.github.com/users/ganga-devs/repos","events_url":"https://api.github.com/users/ganga-devs/events{/privacy}","received_events_url":"https://api.github.com/users/ganga-devs/received_events","type":"Organization","site_admin":false},"repo":{"id":43645564,"name":"ganga","full_name":"ganga-devs/ganga","owner":{"login":"ganga-devs","id":13271048,"avatar_url":"https://avatars.githubusercontent.com/u/13271048?v=3","gravatar_id":"","url":"https://api.github.com/users/ganga-devs","html_url":"https://github.com/ganga-devs","followers_url":"https://api.github.com/users/ganga-devs/followers","following_url":"https://api.github.com/users/ganga-devs/following{/other_user}","gists_url":"https://api.github.com/users/ganga-devs/gists{/gist_id}","starred_url":"https://api.github.com/users/ganga-devs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganga-devs/subscriptions","organizations_url":"https://api.github.com/users/ganga-devs/orgs","repos_url":"https://api.github.com/users/ganga-devs/repos","events_url":"https://api.github.com/users/ganga-devs/events{/privacy}","received_events_url":"https://api.github.com/users/ganga-devs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ganga-devs/ganga","description":"Ganga is an easy-to-use frontend for job definition and management","fork":false,"url":"https://api.github.com/repos/ganga-devs/ganga","forks_url":"https://api.github.com/repos/ganga-devs/ganga/forks","keys_url":"https://api.github.com/repos/ganga-devs/ganga/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ganga-devs/ganga/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ganga-devs/ganga/teams","hooks_url":"https://api.github.com/repos/ganga-devs/ganga/hooks","issue_events_url":"https://api.github.com/repos/ganga-devs/ganga/issues/events{/number}","events_url":"https://api.github.com/repos/ganga-devs/ganga/events","assignees_url":"https://api.github.com/repos/ganga-devs/ganga/assignees{/user}","branches_url":"https://api.github.com/repos/ganga-devs/ganga/branches{/branch}","tags_url":"https://api.github.com/repos/ganga-devs/ganga/tags","blobs_url":"https://api.github.com/repos/ganga-devs/ganga/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ganga-devs/ganga/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ganga-devs/ganga/git/refs{/sha}","trees_url":"https://api.github.com/repos/ganga-devs/ganga/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ganga-devs/ganga/statuses/{sha}","languages_url":"https://api.github.com/repos/ganga-devs/ganga/languages","stargazers_url":"https://api.github.com/repos/ganga-devs/ganga/stargazers","contributors_url":"https://api.github.com/repos/ganga-devs/ganga/contributors","subscribers_url":"https://api.github.com/repos/ganga-devs/ganga/subscribers","subscription_url":"https://api.github.com/repos/ganga-devs/ganga/subscription","commits_url":"https://api.github.com/repos/ganga-devs/ganga/commits{/sha}","git_commits_url":"https://api.github.com/repos/ganga-devs/ganga/git/commits{/sha}","comments_url":"https://api.github.com/repos/ganga-devs/ganga/comments{/number}","issue_comment_url":"https://api.github.com/repos/ganga-devs/ganga/issues/comments{/number}","contents_url":"https://api.github.com/repos/ganga-devs/ganga/contents/{+path}","compare_url":"https://api.github.com/repos/ganga-devs/ganga/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ganga-devs/ganga/merges","archive_url":"https://api.github.com/repos/ganga-devs/ganga/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ganga-devs/ganga/downloads","issues_url":"https://api.github.com/repos/ganga-devs/ganga/issues{/number}","pulls_url":"https://api.github.com/repos/ganga-devs/ganga/pulls{/number}","milestones_url":"https://api.github.com/repos/ganga-devs/ganga/milestones{/number}","notifications_url":"https://api.github.com/repos/ganga-devs/ganga/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ganga-devs/ganga/labels{/name}","releases_url":"https://api.github.com/repos/ganga-devs/ganga/releases{/id}","deployments_url":"https://api.github.com/repos/ganga-devs/ganga/deployments","created_at":"2015-10-04T17:39:11Z","updated_at":"2016-09-16T10:43:39Z","pushed_at":"2016-09-19T11:29:35Z","git_url":"git://github.com/ganga-devs/ganga.git","ssh_url":"git@github.com:ganga-devs/ganga.git","clone_url":"https://github.com/ganga-devs/ganga.git","svn_url":"https://github.com/ganga-devs/ganga","homepage":"https://cern.ch/ganga","size":30673,"stargazers_count":23,"watchers_count":23,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":167,"forks":18,"open_issues":167,"watchers":23,"default_branch":"develop"}},"base":{"label":"ganga-devs:6.3-features","ref":"6.3-features","sha":"30e862b3cc8ea501e48026b508463b075e607d81","user":{"login":"ganga-devs","id":13271048,"avatar_url":"https://avatars.githubusercontent.com/u/13271048?v=3","gravatar_id":"","url":"https://api.github.com/users/ganga-devs","html_url":"https://github.com/ganga-devs","followers_url":"https://api.github.com/users/ganga-devs/followers","following_url":"https://api.github.com/users/ganga-devs/following{/other_user}","gists_url":"https://api.github.com/users/ganga-devs/gists{/gist_id}","starred_url":"https://api.github.com/users/ganga-devs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganga-devs/subscriptions","organizations_url":"https://api.github.com/users/ganga-devs/orgs","repos_url":"https://api.github.com/users/ganga-devs/repos","events_url":"https://api.github.com/users/ganga-devs/events{/privacy}","received_events_url":"https://api.github.com/users/ganga-devs/received_events","type":"Organization","site_admin":false},"repo":{"id":43645564,"name":"ganga","full_name":"ganga-devs/ganga","owner":{"login":"ganga-devs","id":13271048,"avatar_url":"https://avatars.githubusercontent.com/u/13271048?v=3","gravatar_id":"","url":"https://api.github.com/users/ganga-devs","html_url":"https://github.com/ganga-devs","followers_url":"https://api.github.com/users/ganga-devs/followers","following_url":"https://api.github.com/users/ganga-devs/following{/other_user}","gists_url":"https://api.github.com/users/ganga-devs/gists{/gist_id}","starred_url":"https://api.github.com/users/ganga-devs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ganga-devs/subscriptions","organizations_url":"https://api.github.com/users/ganga-devs/orgs","repos_url":"https://api.github.com/users/ganga-devs/repos","events_url":"https://api.github.com/users/ganga-devs/events{/privacy}","received_events_url":"https://api.github.com/users/ganga-devs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ganga-devs/ganga","description":"Ganga is an easy-to-use frontend for job definition and management","fork":false,"url":"https://api.github.com/repos/ganga-devs/ganga","forks_url":"https://api.github.com/repos/ganga-devs/ganga/forks","keys_url":"https://api.github.com/repos/ganga-devs/ganga/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ganga-devs/ganga/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ganga-devs/ganga/teams","hooks_url":"https://api.github.com/repos/ganga-devs/ganga/hooks","issue_events_url":"https://api.github.com/repos/ganga-devs/ganga/issues/events{/number}","events_url":"https://api.github.com/repos/ganga-devs/ganga/events","assignees_url":"https://api.github.com/repos/ganga-devs/ganga/assignees{/user}","branches_url":"https://api.github.com/repos/ganga-devs/ganga/branches{/branch}","tags_url":"https://api.github.com/repos/ganga-devs/ganga/tags","blobs_url":"https://api.github.com/repos/ganga-devs/ganga/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ganga-devs/ganga/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ganga-devs/ganga/git/refs{/sha}","trees_url":"https://api.github.com/repos/ganga-devs/ganga/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ganga-devs/ganga/statuses/{sha}","languages_url":"https://api.github.com/repos/ganga-devs/ganga/languages","stargazers_url":"https://api.github.com/repos/ganga-devs/ganga/stargazers","contributors_url":"https://api.github.com/repos/ganga-devs/ganga/contributors","subscribers_url":"https://api.github.com/repos/ganga-devs/ganga/subscribers","subscription_url":"https://api.github.com/repos/ganga-devs/ganga/subscription","commits_url":"https://api.github.com/repos/ganga-devs/ganga/commits{/sha}","git_commits_url":"https://api.github.com/repos/ganga-devs/ganga/git/commits{/sha}","comments_url":"https://api.github.com/repos/ganga-devs/ganga/comments{/number}","issue_comment_url":"https://api.github.com/repos/ganga-devs/ganga/issues/comments{/number}","contents_url":"https://api.github.com/repos/ganga-devs/ganga/contents/{+path}","compare_url":"https://api.github.com/repos/ganga-devs/ganga/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ganga-devs/ganga/merges","archive_url":"https://api.github.com/repos/ganga-devs/ganga/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ganga-devs/ganga/downloads","issues_url":"https://api.github.com/repos/ganga-devs/ganga/issues{/number}","pulls_url":"https://api.github.com/repos/ganga-devs/ganga/pulls{/number}","milestones_url":"https://api.github.com/repos/ganga-devs/ganga/milestones{/number}","notifications_url":"https://api.github.com/repos/ganga-devs/ganga/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ganga-devs/ganga/labels{/name}","releases_url":"https://api.github.com/repos/ganga-devs/ganga/releases{/id}","deployments_url":"https://api.github.com/repos/ganga-devs/ganga/deployments","created_at":"2015-10-04T17:39:11Z","updated_at":"2016-09-16T10:43:39Z","pushed_at":"2016-09-19T11:29:35Z","git_url":"git://github.com/ganga-devs/ganga.git","ssh_url":"git@github.com:ganga-devs/ganga.git","clone_url":"https://github.com/ganga-devs/ganga.git","svn_url":"https://github.com/ganga-devs/ganga","homepage":"https://cern.ch/ganga","size":30673,"stargazers_count":23,"watchers_count":23,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":167,"forks":18,"open_issues":167,"watchers":23,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ganga-devs/ganga/pulls/788"},"html":{"href":"https://github.com/ganga-devs/ganga/pull/788"},"issue":{"href":"https://api.github.com/repos/ganga-devs/ganga/issues/788"},"comments":{"href":"https://api.github.com/repos/ganga-devs/ganga/issues/788/comments"},"review_comments":{"href":"https://api.github.com/repos/ganga-devs/ganga/pulls/788/comments"},"review_comment":{"href":"https://api.github.com/repos/ganga-devs/ganga/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ganga-devs/ganga/pulls/788/commits"},"statuses":{"href":"https://api.github.com/repos/ganga-devs/ganga/statuses/76341e9e5e9a5b9700c785407a6d011d3a9a4b8f"}}}}
{"actor":{"display_login":"rob-c"}}