contribute_to_paddle.html 9.8 KB
Newer Older
Y
Yu Yang 已提交
1 2 3 4 5 6 7 8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
9
    <title>Contribute to PaddlePaddle &#8212; PaddlePaddle  documentation</title>
Y
Yu Yang 已提交
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
    
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <link rel="top" title="PaddlePaddle  documentation" href="../index.html" />
    <link rel="up" title="Build And Install PaddlePaddle" href="index.html" />
Y
Yu Yang 已提交
29
    <link rel="next" title="Docker installation guide" href="docker_install.html" />
Y
Yu Yang 已提交
30 31 32 33 34 35 36 37 38 39 40 41 42
    <link rel="prev" title="Build and Install" href="build_from_source.html" /> 
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
Y
Yu Yang 已提交
43
          <a href="docker_install.html" title="Docker installation guide"
Y
Yu Yang 已提交
44 45 46 47
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="build_from_source.html" title="Build and Install"
             accesskey="P">previous</a> |</li>
48 49
        <li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle  documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Build And Install PaddlePaddle</a> &#187;</li> 
Y
Yu Yang 已提交
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="contribute-to-paddlepaddle">
<span id="contribute-to-paddlepaddle"></span><h1>Contribute to PaddlePaddle<a class="headerlink" href="#contribute-to-paddlepaddle" title="Permalink to this headline"></a></h1>
<p>We sincerely appreciate your contributions. You can use fork and pull request
workflow to merge your code.</p>
<div class="section" id="code-requirements">
<span id="code-requirements"></span><h2>Code Requirements<a class="headerlink" href="#code-requirements" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Your code mush be fully documented by
<a class="reference external" href="http://www.stack.nl/~dimitri/doxygen/">doxygen</a> style.</li>
<li>Make sure the compiler option WITH_STYLE_CHECK is on and the compiler
passes the code style check.</li>
<li>All code must have unit test.</li>
<li>Pass all unit tests.</li>
</ul>
<p>The following tutorial guides you into submitting your contibution.</p>
</div>
<div class="section" id="creating-a-fork">
<span id="creating-a-fork"></span><h2><a class="reference external" href="https://help.github.com/articles/fork-a-repo/">Creating a Fork</a><a class="headerlink" href="#creating-a-fork" title="Permalink to this headline"></a></h2>
<p>Just head over to the GitHub page and click the &#8220;Fork&#8221; button.
It&#8217;s just that simple.</p>
</div>
<div class="section" id="clone">
<span id="clone"></span><h2>Clone<a class="headerlink" href="#clone" title="Permalink to this headline"></a></h2>
<p>Once you&#8217;ve created a fork, you can use your favorite git client to clone your
repo or just head straight to the command line:</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span><span class="c1"># Clone your fork to your local machine</span>
84
git clone git@github.com:USERNAME/Paddle.git
Y
Yu Yang 已提交
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
</pre></div>
</div>
<p>Then you can start to develop.</p>
</div>
<div class="section" id="commit">
<span id="commit"></span><h2>Commit<a class="headerlink" href="#commit" title="Permalink to this headline"></a></h2>
<p>Commit your changes by following command lines:</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span><span class="c1"># show the working tree status</span>
git status
<span class="c1"># add modified files</span>
git add xx
git commit -m <span class="s2">&quot;commit info&quot;</span>
</pre></div>
</div>
<p>The first line of commit infomation is the title. The second and later lines
are the details if any.</p>
</div>
<div class="section" id="keeping-fork-up-to-date">
<span id="keeping-fork-up-to-date"></span><h2>Keeping Fork Up to Date<a class="headerlink" href="#keeping-fork-up-to-date" title="Permalink to this headline"></a></h2>
Y
Yu Yang 已提交
104
<p>Before pull your request, you shold sync you code from the latest PaddlePaddle.
Y
Yu Yang 已提交
105 106 107 108
To do this, you&#8217;ll need to add a remote at first:</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span><span class="c1"># see the current configured remote repository</span>
git remote -v
<span class="c1"># add upstream repository</span>
109
git remote add upstream https://github.com/baidu/Paddle.git
Y
Yu Yang 已提交
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
<span class="c1"># verify the new upstream</span>
git remote -v
</pre></div>
</div>
<p>Update your fork with the latest upstream changes:</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span>git fetch upstream
git pull upstream master
</pre></div>
</div>
<p>If there are no unique commits locally, git will simply perform a fast-forward.
However, if you have been making changes (in the vast majority of cases you
probably shouldn&#8217;t be), you may have to deal with conflicts.</p>
<p>Now, your local master branch is up-to-date with everything modified upstream.</p>
</div>
<div class="section" id="push-to-github">
<span id="push-to-github"></span><h2>Push to GitHub<a class="headerlink" href="#push-to-github" title="Permalink to this headline"></a></h2>
<div class="highlight-shell"><div class="highlight"><pre><span></span><span class="c1"># push to your repository in Github</span>
git push origin master
</pre></div>
</div>
</div>
<div class="section" id="pull-request">
<span id="pull-request"></span><h2>Pull Request<a class="headerlink" href="#pull-request" title="Permalink to this headline"></a></h2>
<p>Go to the page for your fork on GitHub, select your development branch,
and click the <strong>pull request button</strong>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Contribute to PaddlePaddle</a><ul>
<li><a class="reference internal" href="#code-requirements">Code Requirements</a></li>
<li><a class="reference internal" href="#creating-a-fork">Creating a Fork</a></li>
<li><a class="reference internal" href="#clone">Clone</a></li>
<li><a class="reference internal" href="#commit">Commit</a></li>
<li><a class="reference internal" href="#keeping-fork-up-to-date">Keeping Fork Up to Date</a></li>
<li><a class="reference internal" href="#push-to-github">Push to GitHub</a></li>
<li><a class="reference internal" href="#pull-request">Pull Request</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="build_from_source.html"
                        title="previous chapter">Build and Install</a></p>
  <h4>Next topic</h4>
Y
Yu Yang 已提交
162 163
  <p class="topless"><a href="docker_install.html"
                        title="next chapter">Docker installation guide</a></p>
Y
Yu Yang 已提交
164 165 166 167 168 169 170 171 172 173
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/build/contribute_to_paddle.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
174 175
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
Y
Yu Yang 已提交
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
Y
Yu Yang 已提交
195
          <a href="docker_install.html" title="Docker installation guide"
Y
Yu Yang 已提交
196 197 198 199
             >next</a> |</li>
        <li class="right" >
          <a href="build_from_source.html" title="Build and Install"
             >previous</a> |</li>
200 201
        <li class="nav-item nav-item-0"><a href="../index.html">PaddlePaddle  documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="index.html" >Build And Install PaddlePaddle</a> &#187;</li> 
Y
Yu Yang 已提交
202 203 204
      </ul>
    </div>
    <div class="footer" role="contentinfo">
205 206
        &#169; Copyright 2016, PaddlePaddle developers.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.6.
Y
Yu Yang 已提交
207 208 209
    </div>
  </body>
</html>