{"action":"created","issue":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/259","labels_url":"https://api.github.com/repos/Slicer/Slicer/issues/259/labels{/name}","comments_url":"https://api.github.com/repos/Slicer/Slicer/issues/259/comments","events_url":"https://api.github.com/repos/Slicer/Slicer/issues/259/events","html_url":"https://github.com/Slicer/Slicer/pull/259","id":66244129,"number":259,"title":"3549 import scripted module as python module","user":{"login":"jcfr","id":219043,"avatar_url":"https://avatars.githubusercontent.com/u/219043?v=3","gravatar_id":"","url":"https://api.github.com/users/jcfr","html_url":"https://github.com/jcfr","followers_url":"https://api.github.com/users/jcfr/followers","following_url":"https://api.github.com/users/jcfr/following{/other_user}","gists_url":"https://api.github.com/users/jcfr/gists{/gist_id}","starred_url":"https://api.github.com/users/jcfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcfr/subscriptions","organizations_url":"https://api.github.com/users/jcfr/orgs","repos_url":"https://api.github.com/users/jcfr/repos","events_url":"https://api.github.com/users/jcfr/events{/privacy}","received_events_url":"https://api.github.com/users/jcfr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-03T23:06:48Z","updated_at":"2015-04-03T23:21:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Slicer/Slicer/pulls/259","html_url":"https://github.com/Slicer/Slicer/pull/259","diff_url":"https://github.com/Slicer/Slicer/pull/259.diff","patch_url":"https://github.com/Slicer/Slicer/pull/259.patch"},"body":" ENH: Fixes #3549. Import scripted module as python module\r\n\r\nThis will allow each scripted module to defined top-level variables that\r\nwill not clobber each other\r\n\r\nSee associated commits for more details.\r\n\r\nPing @pieper @fedorov @lassoan @blowekamp @cpinter @mehrtash @naucoin\r\n\r\nAssociated mantis issue is [#3549](http://www.na-mic.org/Bug/view.php?id=3549)\r\n\r\nAll test passes.\r\n\r\nBuilding on this, this could potentially allow scripted module to alternatively be implemented as regular python module with a `__init__.py` ( See issue [#1365](http://www.na-mic.org/Bug/view.php?id=1365)). It means scripted module could also be organized [1] like this:\r\n```\r\n/path/to/Editor\r\n/path/to/Editor/__init__.py\r\n/path/to/Editor/Editor.py\r\n/path/to/Editor/Effects/WandEffect.py\r\n[...]\r\n```\r\n\r\n[1] This is just an example. some more discussion would need to happen to agree on a layout."},"comment":{"url":"https://api.github.com/repos/Slicer/Slicer/issues/comments/89449562","html_url":"https://github.com/Slicer/Slicer/pull/259#issuecomment-89449562","issue_url":"https://api.github.com/repos/Slicer/Slicer/issues/259","id":89449562,"user":{"login":"pieper","id":126077,"avatar_url":"https://avatars.githubusercontent.com/u/126077?v=3","gravatar_id":"","url":"https://api.github.com/users/pieper","html_url":"https://github.com/pieper","followers_url":"https://api.github.com/users/pieper/followers","following_url":"https://api.github.com/users/pieper/following{/other_user}","gists_url":"https://api.github.com/users/pieper/gists{/gist_id}","starred_url":"https://api.github.com/users/pieper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieper/subscriptions","organizations_url":"https://api.github.com/users/pieper/orgs","repos_url":"https://api.github.com/users/pieper/repos","events_url":"https://api.github.com/users/pieper/events{/privacy}","received_events_url":"https://api.github.com/users/pieper/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T23:21:03Z","updated_at":"2015-04-03T23:21:03Z","body":"Sounds like a great improvement!  +1\n\nOn Fri, Apr 3, 2015 at 7:06 PM, Jean-Christophe Fillion-Robin <\nnotifications@github.com> wrote:\n\n> ENH: Fixes #3549. Import scripted module as python module\n>\n> This will allow each scripted module to defined top-level variables that\n> will not clobber each other\n>\n> See associated commits for more details.\n>\n> Ping @pieper <https://github.com/pieper> @fedorov\n> <https://github.com/fedorov> @lassoan <https://github.com/lassoan>\n> @blowekamp <https://github.com/blowekamp> @cpinter\n> <https://github.com/cpinter> @mehrtash <https://github.com/mehrtash>\n> @naucoin <https://github.com/naucoin>\n>\n> Associated mantis issue is #3549\n> <http://www.na-mic.org/Bug/view.php?id=3549>\n>\n> Building on this, this could potentially allow scripted module to\n> alternatively be implemented as regular python module with a __init__.py\n> ( See issue #1365 <http://www.na-mic.org/Bug/view.php?id=1365>). It means\n> scripted module could also be organized [1] like this:\n>\n> /path/to/Editor\n> /path/to/Editor/__init__.py\n> /path/to/Editor/Editor.py\n> /path/to/Editor/Effects/WandEffect.py\n> [...]\n>\n> [1] This is just an example. some more discussion would need to happen to\n> agree on a layout.\n> ------------------------------\n> You can view, comment on, or merge this pull request online at:\n>\n>   https://github.com/Slicer/Slicer/pull/259\n> Commit Summary\n>\n>    - ENH: Add test illustrating issue #3549 related to scripted module\n>    import\n>    - ENH: Fixes #3549. Import scripted module as python module\n>\n> File Changes\n>\n>    - *M* Applications/SlicerApp/Testing/Python/CMakeLists.txt\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-0> (9)\n>    - *A*\n>    Applications/SlicerApp/Testing/Python/ScriptedModuleDiscoveryTest.py\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-1> (59)\n>    - *A*\n>    Applications/SlicerApp/Testing/Python/ScriptedModuleDiscoveryTest/ModuleA.py\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-2> (24)\n>    - *A*\n>    Applications/SlicerApp/Testing/Python/ScriptedModuleDiscoveryTest/ModuleB.py\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-3> (24)\n>    - *A*\n>    Applications/SlicerApp/Testing/Python/ScriptedModuleDiscoveryTest/ModuleC_WithoutWidget.py\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-4> (20)\n>    - *A*\n>    Applications/SlicerApp/Testing/Python/ScriptedModuleDiscoveryTest/ModuleD_WithFileDialog_WithoutWidget.py\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-5> (38)\n>    - *A*\n>    Applications/SlicerApp/Testing/Python/ScriptedModuleDiscoveryTest/ModuleE_WithFileWriter_WithoutWidget.py\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-6> (20)\n>    - *M* Base/QTCore/qSlicerScriptedFileWriter.cxx\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-7> (28)\n>    - *M* Base/QTCore/qSlicerScriptedUtils.cxx\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-8> (41)\n>    - *M* Base/QTCore/qSlicerScriptedUtils_p.h\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-9> (2)\n>    - *M* Base/QTGUI/qSlicerScriptedFileDialog.cxx\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-10> (26)\n>    - *M* Base/QTGUI/qSlicerScriptedLoadableModule.cxx\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-11> (24)\n>    - *M* Base/QTGUI/qSlicerScriptedLoadableModuleWidget.cxx\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-12> (38)\n>    - *M* Modules/Scripted/DICOMPlugins/DICOMScalarVolumePlugin.py\n>    <https://github.com/Slicer/Slicer/pull/259/files#diff-13> (7)\n>\n> Patch Links:\n>\n>    - https://github.com/Slicer/Slicer/pull/259.patch\n>    - https://github.com/Slicer/Slicer/pull/259.diff\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/Slicer/Slicer/pull/259>.\n>\n> The information in this e-mail is intended only for the person to whom it\n> is\n> addressed. If you believe this e-mail was sent to you in error and the\n> e-mail\n> contains patient information, please contact the Partners Compliance\n> HelpLine at\n> http://www.partners.org/complianceline . If the e-mail was sent to you in\n> error\n> but does not contain patient information, please contact the sender and\n> properly\n> dispose of the e-mail.\n>\n"}}