View Issue Details

IDProjectCategoryView StatusLast Update
0002981Slicer4Core: Extensionspublic2013-06-10 15:32
Reporterjcfr Assigned Topieper  
PriorityhighSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.3.0Fixed in VersionSlicer 4.3.0 
Summary0002981: Fix ModuleWizard to account for re-organized structure
Description

Following commit r21745 [1], r21746 [2], r21747 [3] and r21750 [4], extension templates have been re-organized to match the following convention:

/ExtensionName/ ------ ModuleName1
------ ModuleName2

The ModuleWizard doesn't account for that re-organized stucture, both documentation and script should updated accordingly. In a nutshell, the module wizzard could be changed to allow choosing:

  • Which extension should be used as template + new name
  • Which module within the extension should be considered
  • Which name should be associated with the selected modules.

[1] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21745
[2] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21746
[3] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21747
[4] http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=21750

TagsNo tags attached.

Relationships

related to 0003269 closedmatthew-woehlke Simplify process for contributing scripted modules to the extensions catalog 
related to 0003566 closedmatthew-woehlke Wizard: Simplify creation of extensions and modules 

Activities

pieper

pieper

2013-02-25 09:44

administrator   ~0008042

Yes, I noticed this the other day when I tried to use the ModuleWizard - would have been better to do everything at once in a branch before changing the trunk :-p

jcfr

jcfr

2013-02-25 09:57

administrator   ~0008044

Sure. I could easily revert the changes. So that you/we have more time to improve the ModuleWizard.

That said, instruction could easily be updated to specify:

1) Create an extension folder having one file:

/path/to/NewExtension/CMakeLists.txt

with the following content:

cmake_minimum_required(VERSION 2.8.9)

#-----------------------------------------------------------------------------
if(NOT Slicer_SOURCE_DIR)
set(EXTENSION_NAME LoadableExtensionTemplate)
set(EXTENSION_HOMEPAGE "http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/LoadableExtensionTemplate")
set(EXTENSION_CATEGORY "Examples")
set(EXTENSION_CONTRIBUTORS "Jean-Christophe Fillion-Robin (Kitware)")
set(EXTENSION_DESCRIPTION "This is an example of extension bundling a loadable module")
set(EXTENSION_ICONURL "http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Extensions/Testing/LoadableExtensionTemplate/LoadableExtensionTemplate.png?revision=21746&view=co")
set(EXTENSION_SCREENSHOTURLS "http://wiki.slicer.org/slicerWiki/images/4/42/Slicer-r19441-LoadableExtensionTemplate-screenshot.png")
endif()

#-----------------------------------------------------------------------------
if(NOT Slicer_SOURCE_DIR)
find_package(Slicer REQUIRED)
include(${Slicer_USE_FILE})
endif()

#-----------------------------------------------------------------------------

Add below your modules

add_subdirectory(NewModule)

#-----------------------------------------------------------------------------
if(NOT Slicer_SOURCE_DIR)
include(${Slicer_EXTENSION_CPACK})
endif()

2) Use ModuleWizard to integrate modules.

That first step could easily be done with an "ExtensionWizard.py", then step 2 would be done using "ModuleWizard.py"

It means we would have a clear separation between "Modules" and "Extensions".

The "ExtensionWizard" would simply asked for:
--target /path/to/folder (optional arg, by default current dir)
EXTENSIONNAME

Moving forward, the "ExtensionWizard" could also be extended to propose:

  • github registration
  • midas registration
  • etc ...
pieper

pieper

2013-02-26 04:16

administrator   ~0008048

Yep, I know how to do it but I don't have time right now ;)

pieper

pieper

2013-06-07 10:00

administrator   ~0008721

The module wizard instructions have been updated to describe how to create extensions with multiple modules of different types.

http://www.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/ModuleWizard

pieper

pieper

2013-06-07 10:02

administrator   ~0008722

The current behavior isn't bad - people still need to do a little bit of hand editing, but since they are developers that's not bad.

jcfr

jcfr

2013-06-10 15:24

administrator   ~0008735

Good point. Thanks for working on this.

To simplify, few days ago I created a new template named:
../Extensions/Testing/EmptyExtensionTemplate/

I didn't get a chance to commit it but that would simplify the documentation. What do you think ?

Moving forward, I was even thinking about adding a wizard hint to the template, something like:

<Wizard:add_subdirectory>

pieper

pieper

2013-06-10 15:31

administrator   ~0008736

Yes, I almost created and committed an Extensions/Testing/GenericExtensionTemplate - probably would have been just like your EmptyExtensionTemplate ;)

But then as I was thinking about it, we probably don't need to do too much hand holding at this stage - if the only thing the developer needs to do is edit a few add_subdirectory commands they really have it pretty easy. I guess from my perspective once they have a working extension framework and can add arbitrary modules to it they have everything they need at that level. There are lots of other complicated tasks that we can simplify with a similar amount of effort (like adding more python documentation or something) so I figured we are in pretty good shape on this.

pieper

pieper

2013-06-10 15:32

administrator   ~0008737

Of course if you want to further improve the documentation or templates that would be great!

Issue History

Date Modified Username Field Change
2013-02-25 09:03 jcfr New Issue
2013-02-25 09:03 jcfr Status new => assigned
2013-02-25 09:03 jcfr Assigned To => jcfr
2013-02-25 09:03 jcfr Assigned To jcfr => pieper
2013-02-25 09:03 jcfr Priority normal => high
2013-02-25 09:03 jcfr Target Version => Slicer 4.3.0
2013-02-25 09:44 pieper Note Added: 0008042
2013-02-25 09:57 jcfr Note Added: 0008044
2013-02-26 04:16 pieper Note Added: 0008048
2013-06-07 10:00 pieper Note Added: 0008721
2013-06-07 10:00 pieper Status assigned => resolved
2013-06-07 10:00 pieper Fixed in Version => Slicer 4.3.0
2013-06-07 10:00 pieper Resolution open => fixed
2013-06-07 10:02 pieper Note Added: 0008722
2013-06-07 10:02 pieper Status resolved => closed
2013-06-10 15:24 jcfr Note Added: 0008735
2013-06-10 15:31 pieper Note Added: 0008736
2013-06-10 15:32 pieper Note Added: 0008737
2014-01-22 08:38 jcfr Relationship added related to 0003269
2014-01-23 10:25 matthew-woehlke Relationship added related to 0003566