Difference between revisions of "Documentation/Labs/ExtensionsFrameworkRoadmap"

From Slicer Wiki
Jump to: navigation, search
 
(46 intermediate revisions by 2 users not shown)
Line 5: Line 5:
  
 
The goal here is to simplify the number of steps allowing people to contribute extension.  
 
The goal here is to simplify the number of steps allowing people to contribute extension.  
 +
 +
More specifically, we would like to make it very easy for people to create a python extension by:
 +
* removing the need for a Slicer build tree
 +
* reducing the number of steps required to create and load an extension from a template
 +
* simplifying how an extension is contributed to the index
 +
* simplifying how an extension can be uploaded to the extension server
  
 
== Current process ==
 
== Current process ==
Line 59: Line 65:
 
For scripted extensions, creation directly from within Slicer:
 
For scripted extensions, creation directly from within Slicer:
  
# Slicer: Python interactor -> <code>createScriptedExtension('Foo')</code>  ''Note: The final API may be slightly different''
+
# Slicer: Modules -> Developer -> ExtensionWizard
 +
# ExtensionWizard module: Set name, description, contributors etc ... then click on Create
 +
## Set the working directory ? Where to create.
 +
## External link to the github account creation page (will open web browswer or tab in the extension manager ?)
 +
## Optionally create github repo and pre-populate repo ...
 +
# Path to the module(s) in extension should be added to the additional module path.
 
# Slicer: Restart - 'Foo' module should show up. ''Note: This last step could probably be removed''
 
# Slicer: Restart - 'Foo' module should show up. ''Note: This last step could probably be removed''
  
 
=== To save extension code ===
 
=== To save extension code ===
 +
 +
For all type of extensions, the simplified workflow is:
 +
 
# Github: Create an account
 
# Github: Create an account
 
# Workstation -> Github: Create repository done with '''1 command'''. <code>ExtensionWizard.py --publish ~/code/MyExtension</code>
 
# Workstation -> Github: Create repository done with '''1 command'''. <code>ExtensionWizard.py --publish ~/code/MyExtension</code>
 +
 +
For scripted extensions:
 +
 +
# initial publish on github done from the ExtensionWizard module. See above
 +
 +
=== To publish extension code update===
 +
 +
For all type of extensions, the workflow is:
 +
 +
# git commit, ..., git push
  
 
=== To contribute an extension to the Index  ===
 
=== To contribute an extension to the Index  ===
# SlicerWiki: Create documentation page
+
# SlicerWiki: Create documentation page.
 +
## Need to check with BHW if wiki version can be updated so that any IP could use the mediawiki API
 
# Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]
 
# Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]
 +
## Create a "Slicer Extensions" community where user have to request access
 +
## Folks belonging to the "Slicer Extensions" would be automatically be granted access
 +
## Jc: Check with Midas team with user can request access to community
 
# Workstation: Configure upload credential
 
# Workstation: Configure upload credential
 +
## Update [[Documentation/Nightly/Developers/Tutorials/ObtainExtensionServerApiKey|documentation]] to explain that MIDAS_API_* variable can be set in the env.
 
# Workstation -> ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]
 
# Workstation -> ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]
 
# Add extension to the index using '''1 command''': <code>ExtensionWizard.py --contribute --target master ~/code/MyExtension</code>
 
# Add extension to the index using '''1 command''': <code>ExtensionWizard.py --contribute --target master ~/code/MyExtension</code>
  
 +
== Progress ==
 +
 +
* [http://na-mic.org/Mantis/view.php?id=3604 3604 ExtensionServer: Consolidate ExtensionsIndex account creation.] '''ToBeDone'''
 +
 +
* [http://na-mic.org/Mantis/view.php?id=3605 3605 SlicerWiki: Automatic creation of extension wiki page.] '''ToBeDone'''
 +
 +
* [http://na-mic.org/Mantis/view.php?id=3606 3606 Slicer: Given an extension python script. Should be possible to upload the extension directly from Slicer.] '''ToBeDone'''
 +
 +
== Completed ==
 +
 +
* Improve Wizard to create empty extension: reduce number of terminal commands to 1 - {{done}} '''Completed'''
 +
** [http://na-mic.org/Mantis/view.php?id=3566 3566: Wizard: Simplify creation of extensions/modules]: {{done}} '''Completed'''
 +
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add ExtensionWizard wiki page]: {{done}} Completed - See [[Documentation/Nightly/Developers/ExtensionWizard]]
 +
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add developer documentation for ExtensionWizard]. {{done}} '''Completed'''
 +
* Publish extension on Github by creating github repo. {{done}} '''Completed'''
 +
 +
* In case of Python extension, remove the need for a Slicer build tree: {{done}} '''Completed'''
 +
** Wizard: Remove dependency on build tree or CMake generated file. {{done}} '''Completed'''
 +
** Add install rules for the template source code - To make them available from an installed Slicer.{{done}} '''Completed'''
 +
** [http://na-mic.org/Mantis/view.php?id=3269 3269: Simplify contribution of scripted extension]: {{done}} '''Completed'''
 +
** [http://na-mic.org/Mantis/view.php?id=3603 3603 Slicer: Creation of python extension directly from Slicer.] {{done}} '''Completed'''
 +
*** Slicer: Optional Restart. {{done}} '''NotNeeded''' (Scripted module are optionally loaded after creating them using the wizard.) {{done}} '''Completed'''
 +
 +
= Extensions Catalog / Manager =
 +
 +
The goal here is to improve the overall user experience associated with the extension catalog.
 +
 +
When accessed from within Slicer the catalog is also referred as extensions manager.
  
 
== Progress ==
 
== Progress ==
  
* Improve Wizard to create empty extension: reduce number of terminal commands to 1
+
* Low priority:
** [http://na-mic.org/Mantis/view.php?id=3566 3566: Wizard: Simplify creation of extensions/modules]: {{done}} Completed - Review in progress
+
** [http://na-mic.org/Mantis/view.php?id=2334 2334: Differentiate different type of extenions in extension manager: Concept of channel]. '''ToBeDone'''
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add ExtensionWizard wiki page]: {{done}} Completed - Review in progress
+
** [http://na-mic.org/Mantis/view.php?id=2778 2778: Add "Download stats" on each extension page ]. '''ToBeDone'''
** [http://na-mic.org/Mantis/view.php?id=3572 3572: Add developer documentation for ExtensionWizard]: {{done}} Completed - Review in progress
+
** Consolidate rating across extension version. See [https://github.com/midasplatform/slicerappstore/issues/9#issuecomment-15643678 midasplatform/slicerappstore/issues/9]
* Publish extension on Github by creating github repo - {{done}} Completed - Review in progress
 
  
* In case of Python extension, remove the need for a Slicer build tree: '''50%'''
+
== Completed ==
** Wizard: Remove dependency on build tree or CMake generated file. {{done}} - Review in progress
 
** [http://na-mic.org/Mantis/view.php?id=3269 3269: Simplify contribution of scripted extension]: '''50%'''
 
** Slicer: Creation of python extension directly from within Slicer. '''ToBeDone'''
 
*** Slicer: Optional Restart.  '''ToBeDone'''
 
  
* Slicer: Creation of python extension directly from Slicer. '''ToBeDone'''
+
* [http://na-mic.org/Mantis/view.php?id=2779 2779: Mechanism to keep track of the installed extensions across version]. {{done}} '''Completed'''
 +
* [http://na-mic.org/Mantis/view.php?id=2089 2089: Either on-demand or when slicer starts, check if there are available extensions update.]. {{done}} '''Completed'''
 +
* [http://na-mic.org/Mantis/view.php?id=3564 3564: Add search option in extension manager]. {{done}} '''Completed'''
 +
* [http://na-mic.org/Mantis/view.php?id=3602 3602: ExensionsManager - Add a "Show url" link']. {{done}} '''Completed'''
 +
* [http://na-mic.org/Mantis/view.php?id=3607 3607: ExtensionManager: Exclude category "Example" from "All" listing ]. {{done}} '''Completed'''
 +
* [http://na-mic.org/Mantis/view.php?id=2912 2912: Install dependent extensions ]. {{done}} '''Completed'''
 +
* [http://na-mic.org/Mantis/view.php?id=3608 3608: ExtensionsManager: Display description for installed extensions.]. {{done}} '''Completed'''
 +
* [http://na-mic.org/Mantis/view.php?id=2145 2145: Provide a mechanism allowing to easily install extension given the location of the package ]. {{done}} '''Completed'''
  
* ExtensionServer: Consolidate ExtensionsIndex account creation. '''ToBeDone'''
+
= Extensions Wizard UI =
  
* SlicerWiki: Automatic creation of extension wiki page. '''ToBeDone'''
+
The wizard UI will provide a Slicer module allowing to:
 +
* easily create / publish / contribute extensions directly from Slicer.
 +
* directly load scripted modules after they are created.
  
* Slicer: Given an extension python script. Should be possible to upload the extension directly from Slicer. '''ToBeDone'''
+
[[File:Slicer-in-app-wizard1.png|250px]]
  
= Extension catalog / Manager =
+
== Completed ==
  
== In progress ==
+
See issues [http://na-mic.org/Mantis/view.php?id=3603 #3603], [http://na-mic.org/Mantis/view.php?id=3606 #3606] listed above. {{done}} '''Completed'''
* [http://na-mic.org/Mantis/view.php?id=3564 3564: Add search option in extension manager]
 
  
== Done ==
+
= Extension developer documentation =
 +
 
 +
The goal is to consolidate the existing documentation so that it is easy to understand what is the python API available to the Slicer python extension developer.
 +
 
 +
== Progress ==
  
== To be done ==
+
* Generate Slicer python API documentation. '''In progress'''. See experiment http://mwoehlke-kitware.github.io/Slicer/Base/

Latest revision as of 00:14, 28 March 2018

Home < Documentation < Labs < ExtensionsFrameworkRoadmap

This page serves as roadmap for the Slicer Extensions framework.


Extension contribution process

The goal here is to simplify the number of steps allowing people to contribute extension.

More specifically, we would like to make it very easy for people to create a python extension by:

  • removing the need for a Slicer build tree
  • reducing the number of steps required to create and load an extension from a template
  • simplifying how an extension is contributed to the index
  • simplifying how an extension can be uploaded to the extension server

Current process

The current process to create an empty extension is documented here, then the steps to contribute the extension are documented here.

For all type of extension (C++ or python), the steps can then be summarized as:

To create an extension

  1. Workstation: Build Slicer application in Release
  2. Workstation: Use the Wizard to create an extension 5 commands to enter in a terminal
  3. Workstation: Initialize git repository 1 command
  4. Workstation: Implement extension / local commits

To save extension code

  1. Github: Create an account
  2. Github: Create a repository
  3. Workstation -> Github: Push local work on Github

To contribute an extension to Index

  1. SlicerWiki: Create documentation page
  2. Extension Server: Create an account
  3. Extension Server: Join community
  4. Extension Server: Ask permission for experimental folder.
  5. Workstation: Configure upload credential
  6. Workstation -> ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]
  7. Github: Fork ExtensionsIndex
  8. Workstation: Clone fork locally
  9. Workstation: Create branch add-YourExtensionName
  10. Workstation: Commit description file obtained from build tree
  11. Workstation -> Github: Push the topic to fork
  12. Github: Click on Pull request button

To update an extension in Index

  1. SlicerWiki: Update documentation page
  2. Workstation: In extension index clone: 5 commands to type
  3. Workstation: Create branch update-YourExtensionName
  4. Workstation: Commit description file obtained from build tree
  5. Workstation -> Github: Create pull request manually creating the URL
  6. Github: Add a comment in the pull request with a Compare link also manually generated

Proposed changes

To create an extension

For all type of extensions, the simplified workflow is:

  1. Workstation: Build Slicer application in Release
  2. Workstation: Use the Wizard to create an extension 1 commands to enter in a terminal
  3. Workstation: Initialize git repository 1 command
  4. Workstation: Implement extension / local commits


For scripted extensions, creation directly from within Slicer:

  1. Slicer: Modules -> Developer -> ExtensionWizard
  2. ExtensionWizard module: Set name, description, contributors etc ... then click on Create
    1. Set the working directory ? Where to create.
    2. External link to the github account creation page (will open web browswer or tab in the extension manager ?)
    3. Optionally create github repo and pre-populate repo ...
  3. Path to the module(s) in extension should be added to the additional module path.
  4. Slicer: Restart - 'Foo' module should show up. Note: This last step could probably be removed

To save extension code

For all type of extensions, the simplified workflow is:

  1. Github: Create an account
  2. Workstation -> Github: Create repository done with 1 command. ExtensionWizard.py --publish ~/code/MyExtension

For scripted extensions:

  1. initial publish on github done from the ExtensionWizard module. See above

To publish extension code update

For all type of extensions, the workflow is:

  1. git commit, ..., git push

To contribute an extension to the Index

  1. SlicerWiki: Create documentation page.
    1. Need to check with BHW if wiki version can be updated so that any IP could use the mediawiki API
  2. Extension Server: Create an account [Join community + experimental folder permission consolidated in one location]
    1. Create a "Slicer Extensions" community where user have to request access
    2. Folks belonging to the "Slicer Extensions" would be automatically be granted access
    3. Jc: Check with Midas team with user can request access to community
  3. Workstation: Configure upload credential
    1. Update documentation to explain that MIDAS_API_* variable can be set in the env.
  4. Workstation -> ExtensionServer: Test upload [1 command to enter in a terminal / 1 click in visual studio]
  5. Add extension to the index using 1 command: ExtensionWizard.py --contribute --target master ~/code/MyExtension

Progress

Completed

Extensions Catalog / Manager

The goal here is to improve the overall user experience associated with the extension catalog.

When accessed from within Slicer the catalog is also referred as extensions manager.

Progress

Completed

Extensions Wizard UI

The wizard UI will provide a Slicer module allowing to:

  • easily create / publish / contribute extensions directly from Slicer.
  • directly load scripted modules after they are created.

Slicer-in-app-wizard1.png

Completed

See issues #3603, #3606 listed above. Check.svg Completed

Extension developer documentation

The goal is to consolidate the existing documentation so that it is easy to understand what is the python API available to the Slicer python extension developer.

Progress