Difference between revisions of "Documentation/Nightly/Developers/Tutorials/ContributePatch"

From Slicer Wiki
Jump to: navigation, search
(Prepend documentation/versioncheck template. See http://na-mic.org/Mantis/view.php?id=2887)
 
(7 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
The following instructions describes the recommended workflow to contribute patch to Slicer code base.  
 
The following instructions describes the recommended workflow to contribute patch to Slicer code base.  
  
It is assumed you followed the [[Documentation/4.1/Developers/StartHere#New_community_member_checklist|New community member checklist]] and have a clone of https://github.com/Slicer/Slicer/.
+
It is assumed that you followed the [[Documentation/Nightly/Developers/StartHere#New_community_member_checklist|New community member checklist]], have a clone of https://github.com/Slicer/Slicer/ and have setup the development environment as described [[Documentation/Nightly/Developers/DevelopmentWithGit#Slicer_Setup | here]].
It is also assumed that you have setup the development environment as described in the [[Documentation/Nightly/Developers/DevelopmentWithGit#Slicer_Setup | Slicer Setup]] section.
+
<!--
 
 
 
'''If not already done, make sure to read the [[Documentation/{{documentation/version}}/Developers/Style_Guide|Slicer Coding Style Guide]] :-)'''
 
'''If not already done, make sure to read the [[Documentation/{{documentation/version}}/Developers/Style_Guide|Slicer Coding Style Guide]] :-)'''
 +
-->
 +
<ol start="1" style="list-style-type: decimal;">
  
* 1. Create an issue in the [http://na-mic.org/Mantis/bug_report_page.php tracker]. For example, see issue [http://na-mic.org/Mantis/view.php?id=1906 #1906]
+
<li>
 +
  <p>Create an issue in the [http://na-mic.org/Mantis/bug_report_page.php tracker] setting <i>severity</i> to <i>feature</i>. For example, see issue [http://na-mic.org/Mantis/view.php?id=1906 #1906]</p>
 +
  {{remark|lightgreen|For simple changes (e.g typo, ...), this step is optional.}}
 +
</li>
  
* 2. Make sure your fork has a [https://help.github.com/articles/adding-a-remote git remote]. Replace <code>jcfr</code> with your git login.
+
<li><p>Make sure your clone has a [https://help.github.com/articles/adding-a-remote git remote]. After [https://help.github.com/articles/fork-a-repo forking Slicer repository], replace <code>jcfr</code> with your git login.</p>
 
<pre>
 
<pre>
 
git remote add jcfr git@github.com:jcfr/Slicer.git
 
git remote add jcfr git@github.com:jcfr/Slicer.git
 
</pre>
 
</pre>
 +
</li>
  
* 3. Create a topic named <code>&lt;issuer_number&gt;-a-descriptive-topic-name</code>. For example:
+
<li><p>Create a topic named <code>&lt;issuer_number&gt;-a-descriptive-topic-name</code>. For example:</p>
 
<pre>
 
<pre>
 
git checkout -b 1906-uninstall-extensions-on-restart
 
git checkout -b 1906-uninstall-extensions-on-restart
 
</pre>
 
</pre>
 +
</li>
 +
 +
<li>
 +
  <p>Fix the code or implement your feature, then commit your change(s)</p>
 +
  {{remark|red|Make sure to read the [[Documentation/{{documentation/version}}/Developers/Style_Guide|Slicer Coding and Commit Style Guide]]}}
 +
</li>
 +
 +
<li><p>Publish the topic on your fork</p>
 +
<pre>
 +
git push jcfr 1906-uninstall-extensions-on-restart
 +
</pre>
 +
</li>
 +
 +
<li><p>Create a [https://help.github.com/articles/creating-a-pull-request/ Pull Request] and add a note to the issue with a link pointing to your topic. For example, see note [http://na-mic.org/Mantis/view.php?id=1906#c4578 1906#c4578]</p></li>
  
* 4. Add a note to the issue with a link pointing to your topic. For example, see note [http://na-mic.org/Mantis/view.php?id=1906#c4578 1906#c4578]
+
<!--
 +
<li><p>Send an email on the [http://massmail.bwh.harvard.edu/mailman/listinfo/slicer-devel slicer-developers] list pointing to the reported bug. Title of the email should start with <code>[BUG <IssueNumber>] Title of the bug - <category></code></p></li>
 +
-->
  
* 5. Send an email on the [http://massmail.bwh.harvard.edu/mailman/listinfo/slicer-devel slicer-developers] list pointing to the reported bug. Title of the email should start with <code>[BUG <IssueNumber>] Title of the bug - <category></code>
+
</ol>

Latest revision as of 14:43, 31 January 2017

Home < Documentation < Nightly < Developers < Tutorials < ContributePatch


For the latest Slicer documentation, visit the read-the-docs.


The following instructions describes the recommended workflow to contribute patch to Slicer code base.

It is assumed that you followed the New community member checklist, have a clone of https://github.com/Slicer/Slicer/ and have setup the development environment as described here.

  1. Create an issue in the tracker setting severity to feature. For example, see issue #1906

    1. For simple changes (e.g typo, ...), this step is optional.
  2. Make sure your clone has a git remote. After forking Slicer repository, replace jcfr with your git login.

    git remote add jcfr git@github.com:jcfr/Slicer.git
    
  3. Create a topic named <issuer_number>-a-descriptive-topic-name. For example:

    git checkout -b 1906-uninstall-extensions-on-restart
    
  4. Fix the code or implement your feature, then commit your change(s)

    1. Make sure to read the Slicer Coding and Commit Style Guide
  5. Publish the topic on your fork

    git push jcfr 1906-uninstall-extensions-on-restart
    
  6. Create a Pull Request and add a note to the issue with a link pointing to your topic. For example, see note 1906#c4578