View Issue Details

IDProjectCategoryView StatusLast Update
0003423Slicer4Core: Scripting (Wrapping, Python)public2014-03-06 05:28
Reporternicole Assigned Topieper  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformlinuxOSOS Version
Product VersionSlicer 4.3.0 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.3.1 
Summary0003423: ModuleWizard not replacing all strings when creating a self test
Description

Trying to create a self test using the SelfTestModule instructions on the wiki, I have to do a manual rename and text replace in the subdir as the templated files aren't copied/renamed/searched and replaced properly.

Steps To Reproduce

Starting from here:
http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/SelfTestModule#Use_the_ModuleWizard
I ran the ModuleWizard line as given:
./Utilities/Scripts/ModuleWizard.py --template ./Extensions/Testing/ScriptedLoadableExtensionTemplate --target ../NeurosurgeryTutorial NeurosurgeryTutorial

and got this directory listing:

ls NeurosurgeryTutorial/
total 40
8 CMakeLists.txt 24 NeurosurgeryTutorial.png 8 ScriptedLoadableModuleTemplate/

ls NeurosurgeryTutorial/ScriptedLoadableModuleTemplate/
total 32
8 CMakeLists.txt 0 Resources/ 16 ScriptedLoadableModuleTemplate.py 8 Testing/

Instead of the expected NeurosurgeryTutorial subdirectories and file names.

Additional Information

Digging into the wizard file, it looks like the mismatch between replacement key ScriptedLoadableExtensionTemplate and the subdirectory and files that use ScriptedLoadableModuleTemplate is causing the string replace to fail.

TagsNo tags attached.

Activities

pieper

pieper

2013-09-26 15:20

administrator   ~0010094

The updated instructions are here [1]. I believe the solution is that you need to point the module wizard into the module subdirectory of the extension template. If that works can you update the self-test wiki page?

[1] http://www.na-mic.org/Wiki/index.php/2013_Project_Week_Breakout_Session:Slicer4Python#Creating_a_scripted_module_from_templates_with_ModuleWizard

nicole

nicole

2013-09-27 14:09

administrator   ~0010102

Adding the subdirectory to the extension template worked, and I updated the SelfTestModule wiki page with that change (nightly[1] and 4.3[2]).

[1]http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Tutorials/SelfTestModule#Use_the_ModuleWizard
[2] http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/Developers/Tutorials/SelfTestModule#Use_the_ModuleWizard

jcfr

jcfr

2014-03-06 05:24

administrator   ~0011209

Closing resolved issues that have not been updated in more than 3 months

Issue History

Date Modified Username Field Change
2013-09-25 09:36 nicole New Issue
2013-09-25 09:36 nicole Status new => assigned
2013-09-25 09:36 nicole Assigned To => pieper
2013-09-26 15:20 pieper Note Added: 0010094
2013-09-27 14:09 nicole Note Added: 0010102
2013-09-27 14:09 nicole Status assigned => resolved
2013-09-27 14:09 nicole Fixed in Version => Slicer 4.3.1
2013-09-27 14:09 nicole Resolution open => fixed
2014-03-06 05:24 jcfr Note Added: 0011209
2014-03-06 05:28 jcfr Status resolved => closed