# ExtensionWizard not uploading my extension

**URL:** <https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829>\
**Category:** Development\
**Created:** [August 5, 2017, 8:00am UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829 "2017-08-05T08:00:34Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [August 5, 2017, 8:00am UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/1 "2017-08-05T08:00:34Z")

</div>

Hello,

I am trying to upload [this extension](https://github.com/moselhy/PhantomSegmenter), but for some reason I am getting this error about a documentation url… I followed all the instructions [here](https://www.slicer.org/wiki/Documentation/Nightly/Developers/ExtensionWizard#Contributing_Extensions_to_the_Index) and the --describe option works fine.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/0/80b2759e6f65be68aa767379e4eb58c232cd6a56.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 5, 2017, 12:01pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/2 "2017-08-05T12:01:52Z")

</div>

I’ve never needed command-line interface of ExtensionWizard. You can do all Slicer-specific operations using graphical user interface of ExtensionWizard module. I find pushing files, sending pull requests simpler to do using generic tools (simple git commands) rather than learning ExtensionWizard commands.

Does anybody use ExtensionWizard command-line? For what operations? Maybe we can delete rarely used commands to reduce associated documentation, testing, support, and maintenance work.

---

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [August 5, 2017, 7:52pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/3 "2017-08-05T19:52:07Z")

</div>

So to upload my extension to the extension manager, do I just have to make an s4ext file and submit a pull request to [https://github.com/Slicer/ExtensionsIndex](https://github.com/Slicer/ExtensionsIndex)?

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 5, 2017, 8:33pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/4 "2017-08-05T20:33:42Z")

</div>

> [@moselhy](#):
>
> So to upload my extension to the extension manager, do I just have to make an s4ext file and submit a pull request to [GitHub - Slicer/ExtensionsIndex: Slicer extensions index](https://github.com/Slicer/ExtensionsIndex)?

Yes! And the s4ext file should be created automatically in the build directory for your extension.

> [@lassoan](#):
>
> I’ve never needed command-line interface of ExtensionWizard.

Me neither, but as I was looking for the page with the instructions to share with @moselhy, I found that `slicerExtensionWizard --contribute` is mentioned as one of the recommended approaches for contributing extensions, and it definitely looks more attractive than the other option, see [Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions).

I can see how the other option mentioned can be confusing to a beginner:

> Fork ExtensionIndex repository ([GitHub - Slicer/ExtensionsIndex: Slicer extensions index](https://github.com/Slicer/ExtensionsIndex)), add your extension, and send a pull request

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 5, 2017, 11:51pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/5 "2017-08-05T23:51:04Z")

</div>

I’ve added more specific instructions about how to upload a .s4ext file to the ExtensionIndex to a forked repository and send a pull request (although nowadays most developers use GitHub, so already familiar with the workflow). It is nice that all steps (fork repository, upload file, send pull request) are available directly on the web interface, by a few clicks.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [August 7, 2017, 9:17pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/6 "2017-08-07T21:17:44Z")

</div>

> [@fedorov](#):
>
> And the s4ext file should be created automatically in the build directory for your extension.

The good news, is that this is already the case. The description is created in the build directory of every extension

> [@fedorov](#):
>
> I found that slicerExtensionWizard --contribute is mentioned as one of the recommended approaches for contributing extensions, and it definitely looks more attractive than the other option

Our of curiosity and to put things in context, which “other options” are you referring to ? It looks like the [wiki page](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions) always suggested to use `slicerExtensionWizard --contribute`

> [@lassoan](#):
>
> You can do all Slicer-specific operations using graphical user interface of ExtensionWizard module. I find pushing files, sending pull requests simpler to do using generic tools (simple git commands) rather than learning ExtensionWizard commands.
> 
> Does anybody use ExtensionWizard command-line? For what operations? Maybe we can delete rarely used commands to reduce associated documentation, testing, support, and maintenance work.

Agreed. Now that few years went by, it may a good time to streamline the process.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 7, 2017, 10:07pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/7 "2017-08-07T22:07:51Z")

</div>

> [@jcfr](#):
>
> Our of curiosity and to put things in context, which “other options” are you referring to ?

@jcfr there were (and still are, after @lassoan edits) two options listed on the wiki: make a pull request manually, or use slicerExtensionWizard to automatically make a pull request with --contribute.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [August 7, 2017, 10:40pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/8 "2017-08-07T22:40:28Z")

</div>

> [@fedorov](#):
>
> two options listed on the wiki:

I see.

There are indeed two pages linked of the [extension How-tos](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/Extension):

1. [Contribute Extension Description File using Extension Wizard](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/Contribute_Extension_Description_File_using_Extension_Wizard)
2. [Manually contributing an extension description file](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/Contribute_Extension_Description_File)

That said, the main point of entry [Create Slicer Extension](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions) linked of the build instructions found on the main page (and also in the [new member check list](https://www.slicer.org/wiki/Documentation/Nightly/Developers/StartHere)) only mention the extension wizard approach. If you think that would help reduce confusion (if any), we could remove that second page ?

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 8, 2017, 1:50am UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/9 "2017-08-08T01:50:59Z")

</div>

> [@jcfr](#):
>
> That said, the main point of entry Create Slicer Extension linked of the build instructions found on the main page (and also in the new member check list) only mention the extension wizard approach.

I must be missing something - it actually mentions both approaches.

From [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions:](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions:)

"If you consider your extension is ready for distribution, contribute it to the ExtensionsIndex:

- Fork ExtensionIndex repository on GitHub by clicking Fork button on [GitHub - Slicer/ExtensionsIndex: Slicer extensions index](https://github.com/Slicer/ExtensionsIndex) page
- Add your .s4ext file to your forked repository: it can be done using a git client or simply by clicking Upload files button
- Create a pull request: by clicking Create pull request button
- Note: the Extension Wizard can automate this by the following command:"

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [August 8, 2017, 2:45am UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/10 "2017-08-08T02:45:04Z")

</div>

I missed that. The initial version was only mentioning the extension wizard. See [here](https://www.slicer.org/w/index.php?title=Documentation/Nightly/Developers/Tutorials/BuildTestPackageDistributeExtensions&oldid=47405)

Then, in Nov 2016, @lassoan improved the page explaining that both approaches were possible. See [here](https://www.slicer.org/w/index.php?title=Documentation%2FNightly%2FDevelopers%2FTutorials%2FBuildTestPackageDistributeExtensions&type=revision&diff=47413&oldid=47405) and more recently updated adding details about s4ext. See [here](https://www.slicer.org/w/index.php?title=Documentation%2FNightly%2FDevelopers%2FTutorials%2FBuildTestPackageDistributeExtensions&type=revision&diff=53944&oldid=53437)

@fedorov Would you suggest to remove the mention of pull request ? Or should we change the text to something like:

> [@](#):
>
> If you consider your extension is ready for distribution, contribute it to the ExtensionsIndex using the Extension Wizard:
> 
> ```auto
> $ bin/slicerExtensionWizard --contribute ~/Slicer-MyExtension/
> 
> ```
> 
> User having a working knowledge of git can also manually contribute the description file following these steps:
> 
> 1. Fork ExtensionIndex repository on GitHub by clicking Fork button on [GitHub - Slicer/ExtensionsIndex: Slicer extensions index](https://github.com/Slicer/ExtensionsIndex) page
> 2. Add your .s4ext file to your forked repository: it can be done using a git client or simply by clicking Upload files button
> 3. Create a pull request: by clicking Create pull request button

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 8, 2017, 12:01pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/11 "2017-08-08T12:01:00Z")

</div>

I feel that the world has changed a lot in the last few years. Git and GitHub has become mainstream, so forking, branchinc, modifying files, and sending pull request are the norm. ExtensionWizard’s commands shorten the command line but they are non-standard and hide what happens internally, making things look more complex than they really are.

We can keep the scripts as they are and documentation will be generated for it automatically, but I don’t think we should advertise them on the wiki at all.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 8, 2017, 1:06pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/12 "2017-08-08T13:06:21Z")

</div>

I agree with Andras. Slilcer ExtensionWizard is a “one off” thing that developers need to take effort to remember how to use, and it doesn’t always work. Working with git and GitHub is an essential skill that every open source developer should be motivated to learn. I certainly hope that developers contributing extension to Slicer are familiar with the basics of GitHub, such as how to make a PR!

---

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [August 8, 2017, 2:53pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/13 "2017-08-08T14:53:37Z")

</div>

Thank you for the clarification. See [this pull request](https://github.com/Slicer/ExtensionsIndex/pull/1444).

`Yes! And the s4ext file should be created automatically in the build directory for your extension.`

I had to generate the description file using the bin/slicerExtensionWizard --describe command and save the output into the .s4ext file, because I couldn’t find the s4ext file in my build directory. Is this a bug or am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [August 8, 2017, 3:32pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/14 "2017-08-08T15:32:38Z")

</div>

> [@moselhy](#):
>
> I had to generate the description file using the bin/slicerExtensionWizard --describe command and save the output into the .s4ext file, because I couldn’t find the s4ext file in my build directory. Is this a bug or am I doing something wrong?

I don’t know. I personally never used the auto-generated s4ext.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [August 8, 2017, 3:39pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/15 "2017-08-08T15:39:38Z")

</div>

> [@moselhy](#):
>
> Yes! And the s4ext file should be created automatically in the build directory for your extension.

@moselhy You can find it in the build tree. For example:

```auto
$ git clone https://github.com/moselhy/SequenceRegistration
$ mkdir SequenceRegistration-build
$ cd SequenceRegistration-build/
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DSlicer_DIR:PATH=/home/jcfr/Projects/Slicer-2-build/Slicer-build/ ../SequenceRegistration

$ make -j6
[...]
-- Configuring Scripted module: Elastix4D
-- Extension description has been written to: /tmp/SequenceRegistration-build/SequenceRegistration.s4ext <------------
[...]
-- Build files have been written to: /tmp/SequenceRegistration-build

$ pwd
/tmp/SequenceRegistration-build

$ ls *.s4ext
SequenceRegistration.s4ext

```

You should also see the following message reported when configuring:

```auto
Extension description has been written to: /tmp/SequenceRegistration-build/SequenceRegistration.s4ext

```

Content of the generated file:

```auto
$ cat SequenceRegistration.s4ext
[...]
# This is source code manager (i.e. svn)
scm git
scmurl https://github.com/moselhy/SequenceRegistration
scmrevision 39fe467

# list dependencies
# - These should be names of other modules that have .s4ext files
# - The dependencies will be built first
depends Sequence SlicerElastix

# Inner build directory (default is ".")
build_subdirectory .

# homepage
homepage https://github.com/moselhy/SequenceRegistration

# Firstname1 Lastname1 ([SubOrg1,]Org1), Firstname2 Lastname2 ([SubOrg2,]Org2)
# For example: Jane Roe (Superware), John Doe (Lab1, Nowhere), Joe Bloggs (Noware)
contributors Mohamed Moselhy (Western University), Andras Lasso (PerkLab, Queen's University)

# Match category in the xml description of the module (where it shows up in Modules menu)
category Registration

# url to icon (png, size 128x128 pixels)
iconurl https://raw.githubusercontent.com/moselhy/SequenceRegistration/master/Elastix4D/Resources/Icons/Elastix4D.png

# Give people an idea what to expect from this code
# - Is it just a test or something you stand behind?
status 

# One line stating what the module does
description This will register a multi-volume sequence using Elastix.

# Space separated list of urls
screenshoturls https://raw.githubusercontent.com/moselhy/SequenceRegistration/master/screenshot.png

# 0 or 1: Define if the extension should be enabled after its installation.
enabled 1

```

---

<div class="post-metadata">

**Author:** ![moselhy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/moselhy/32/501_2.png) [@moselhy](https://discourse.slicer.org/u/moselhy)\
**Post date:** [August 9, 2017, 3:11pm UTC](https://discourse.slicer.org/t/extensionwizard-not-uploading-my-extension/829/16 "2017-08-09T15:11:08Z")

</div>

Thank you, it makes sense now
