Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions

From Slicer Wiki
Revision as of 10:10, 26 February 2013 by JChris.FillionR (talk | contribs)
Jump to: navigation, search
Home < Documentation < Nightly < Developers < Tutorials < BuildTestPackageDistributeExtensions

Prerequisites

Obtain an API key to submit on the extension server

In order to upload extensions on the slicer extensions server, it is required to:


  1. Create an account on the extension server: http://slicer.kitware.com by clicking on the Register link in the top right corner

  2. Slicer-midas-extensions-server-registration.png

    This image shows the top portion of http://slicer.kitware.com after it has been expanded by clicking the Register button.

  3. Go to NA-MIC community and click on Join community

  4. Retrieve your API key looking at your account details:

    1. Go to http://slicer.kitware.com. If needed, signin by clicking on Login in the top right corner.
    2. Click on your name in the top right corner.
    3. Click on My account.
    4. Click on API tab.
    5. Copy the API Key associated with Default application.

      1. There is currently a bug preventing api key containing non alpanumeric characters from being used.
        If your Default api key contain for example a /, try to delete the api key and regenerate one that is not containing "/" and is named Default.
        We are working on the issue to update the build system so that it properly escape "/" and also get in touch with Midas team so that api key containing just number and letter are generated.

  5. Slicer-midas-extensions-server-obtaining-api-key.png

Upload an extension in the experimental folder

See instructions on github


Extensions index

This page has been moved to read-the-docs.


Contributing a new extension

Extensions build against Slicer trunk

The following instruction describes how to contribute extension description file for an extension being built against slicer trunk.

  1. Fork the ExtensionsIndex: http://github.com/Slicer/ExtensionsIndex. Click here for forking instructions.

  2. Clone your fork, then create a topic named add-<ExtensionName>

  3. git clone git@github.com:USER/ExtensionsIndex SlicerExtensionsIndex
    cd SlicerExtensionsIndex
    git checkout -b add-YourExtensionName
    
  4. Commit your description file. Commit title should be Add YourExtensionName extension and the content should provide details about the extension.

  5. Push the topic to your fork

  6. git push origin 
    
  7. On your github fork, click on "Pull Request". Slicer folks will be automatically notified.

  8. That's it !



Extensions build against Slicer 4.10

Requesting an extension update

On your local fork, the idea is to create the following topic branches:

  • update-<YourExtensionName> based of master integration branch.
  • update-<YourExtensionName>-4.2 based of 4.2 integration branch.


Extensions build against Slicer trunk

The following instruction describes how to contribute extension description file updates for an extension being built against slicer trunk.

  1. Update the master branch of both your local clone and your online ExtensionsIndex fork

  2. git remote add upstream git://github.com/Slicer/ExtensionsIndex   # Add reference to the authoritative ExtensionsIndex
    git fetch upstream                                                # Fetch change of the authoritative ExtensionsIndex
    git checkout master                                               # Checkout master
    git reset --hard upstream/master                                  # Reset your local master branch using the authoritative master 
    git push origin master                                            # Update the master branch of your online fork
    
  3. If needed, create branch named update-YourExtensionName

  4. git checkout -b update-YourExtensionName                          # Create branch update-YourExtensionName
    
  5. Regenerate the YourExtensionName.s4ext file by configuring your extension with CMake

  6. Commit the YourExtensionName.s4ext file to your cloned ExtensionIndex repository (provide a meaningful commit comment)

  7. Push modifications to your ExtensionIndex fork on github

  8. git push origin update-YourExtensionName                         # Publish the updated branch on your fork
    
  9. Create a pull request:

  10. or

    Note: If you are using github for hosting your extension source code, make sure to associated a Compare View link. This is very helpful to summarize the changes.

    You can build the compare view URL manually with the following format: 
    
    https://github.com/USER/REPO/compare/[USER:]GIT-REF…[USER:]GIT-REF
    
    USER is your GitHub username, REPO is your GitHub repository, and GIT-REF can be a tag, branch, or commit SHA1. 
    

    Source: http://jbuckley.ca/2011/09/githubs-compare-view/

Extensions build against Slicer 4.10

The following instruction describes how to contribute extension description file updates for an extension being built against slicer trunk.

  1. Update the 4.10 branch of both your local clone and your online ExtensionsIndex fork

  2. git remote add upstream git://github.com/Slicer/ExtensionsIndex   # Add reference to the authoritative ExtensionsIndex
    git fetch upstream                                                # Fetch change of the authoritative ExtensionsIndex
    git checkout 4.2                                                  # Checkout 4.2
    git reset --hard upstream/4.2                                     # Reset your local 4.2 branch using the authoritative 4.2
    git push origin 4.2                                               # Update the 4.2 branch of your online fork
    
  3. If needed, create branch named update-YourExtensionName-4.2

  4. git checkout -b update-YourExtensionName-4.2                      # Create branch update-YourExtensionName-4.2
    


  5. Regenerate the YourExtensionName.s4ext file by configuring your extension with CMake

  6. Commit the YourExtensionName.s4ext file to your cloned ExtensionIndex repository providing a meaningful commit comment.

  7. Push modifications to your ExtensionIndex fork on github

  8. git push origin update-YourExtensionName-4.2                     # Publish the updated branch on your fork
    
  9. Create a pull request:

  10. or

    Note: If you are using github for hosting your extension source code, make sure to associated a Compare View link. This is very helpful to summarize the changes.

    You can build the compare view URL manually with the following format: 
    
    https://github.com/USER/REPO/compare/[USER:]GIT-REF…[USER:]GIT-REF
    
    USER is your GitHub username, REPO is your GitHub repository, and GIT-REF can be a tag, branch, or commit SHA1. 
    

    Source: http://jbuckley.ca/2011/09/githubs-compare-view/