Skip to content

Commit 97c3e63

Browse files
Typo fixed in docstring guide, adding more info on how to send the PR
1 parent c73b048 commit 97c3e63

File tree

7 files changed

+132
-49
lines changed

7 files changed

+132
-49
lines changed

pandas/guide/_sources/pandas_docstring.rst.txt

+2
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ positional arguments `head(3)`.
777777
2 True
778778
3 False
779779
dtype: bool
780+
"""
781+
pass
780782
781783
**Bad:**
782784

pandas/guide/_sources/pandas_pr.rst.txt

+28-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,34 @@ Then, visit https://github.com/pandas-dev/pandas in your browser, and click
103103
on the "Compare & pull request" button in the yellow box above the repository
104104
files.
105105

106-
This will create a pull request, will be reviewed by other developers. It is
107-
unlikely that a pull request is accepted in its first version, so expect some
108-
comments on things that can be improved, from more senior pandas contributors.
106+
If you have only one commit, the pull request will automatically use its
107+
comment as title. Otherwise, please name it following the same standard as
108+
described before (e.g. "DOC: Improved the docstring of DataFrame.head()").
109+
In the body of the description, there are some checkboxes. For the sprint,
110+
we do not have an issue for each docstring change, and as we are not changing
111+
code, we do not need to add/run tests or add a `whatsnew` entry. So you can
112+
ignore these check boxes. Just verify that your changes respect the PEP-8
113+
style by running the command:
114+
115+
| ``git diff upstream/master -u -- "*.py" | flake8 --diff``
116+
117+
If the command does not return any warning, mark that checkbox with an X (do
118+
not leave spaces inside the brackets, use `[X]`). If it returns a warning,
119+
fix it, commit your changes, and push to your remote branch before opening
120+
the pull request.
121+
122+
After the checklist, please **copy the output of the validate_docstrings.py
123+
script**. This will help reviewers see the rendered docstring, as well as
124+
identify any validation problem.
125+
126+
This will create a pull request, and other developers will review it.
127+
128+
Updating a pull request
129+
~~~~~~~~~~~~~~~~~~~~~~~
130+
131+
It is unlikely that a pull request is accepted in its first version, so expect
132+
some comments on things that can be improved, from more senior pandas
133+
contributors.
109134

110135
For comments in your review, you can make new changes in your local branch for
111136
that pull request. And once you addressed all the comments, you can commit them

pandas/guide/pandas_docstring.html

+40-38
Original file line numberDiff line numberDiff line change
@@ -676,44 +676,46 @@ <h2>About docstrings and standards<a class="headerlink" href="#about-docstrings-
676676
<span class="k">pass</span>
677677

678678
<span class="k">def</span> <span class="nf">contains</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">pattern</span><span class="p">,</span> <span class="n">case_sensitive</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">na</span><span class="o">=</span><span class="n">numpy</span><span class="o">.</span><span class="n">nan</span><span class="p">):</span>
679-
<span class="s2">&quot;&quot;&quot;</span>
680-
<span class="s2"> Return whether each value contains `pattern`.</span>
681-
682-
<span class="s2"> In this case, we are illustrating how to use sections, even</span>
683-
<span class="s2"> if the example is simple enough and does not require them.</span>
684-
685-
<span class="s2"> Examples</span>
686-
<span class="s2"> --------</span>
687-
<span class="s2"> &gt;&gt;&gt; s = pd.Series(&#39;Antelope&#39;, &#39;Lion&#39;, &#39;Zebra&#39;, numpy.nan)</span>
688-
<span class="s2"> &gt;&gt;&gt; s.contains(pattern=&#39;a&#39;)</span>
689-
<span class="s2"> 0 False</span>
690-
<span class="s2"> 1 False</span>
691-
<span class="s2"> 2 True</span>
692-
<span class="s2"> 3 NaN</span>
693-
<span class="s2"> dtype: bool</span>
694-
695-
<span class="s2"> **Case sensitivity**</span>
696-
697-
<span class="s2"> With `case_sensitive` set to `False` we can match `a` with both</span>
698-
<span class="s2"> `a` and `A`:</span>
699-
700-
<span class="s2"> &gt;&gt;&gt; s.contains(pattern=&#39;a&#39;, case_sensitive=False)</span>
701-
<span class="s2"> 0 True</span>
702-
<span class="s2"> 1 False</span>
703-
<span class="s2"> 2 True</span>
704-
<span class="s2"> 3 NaN</span>
705-
<span class="s2"> dtype: bool</span>
706-
707-
<span class="s2"> **Missing values**</span>
708-
709-
<span class="s2"> We can fill missing values in the output using the `na` parameter:</span>
710-
711-
<span class="s2"> &gt;&gt;&gt; s.contains(pattern=&#39;a&#39;, na=False)</span>
712-
<span class="s2"> 0 False</span>
713-
<span class="s2"> 1 False</span>
714-
<span class="s2"> 2 True</span>
715-
<span class="s2"> 3 False</span>
716-
<span class="s2"> dtype: bool</span>
679+
<span class="sd">&quot;&quot;&quot;</span>
680+
<span class="sd"> Return whether each value contains `pattern`.</span>
681+
682+
<span class="sd"> In this case, we are illustrating how to use sections, even</span>
683+
<span class="sd"> if the example is simple enough and does not require them.</span>
684+
685+
<span class="sd"> Examples</span>
686+
<span class="sd"> --------</span>
687+
<span class="sd"> &gt;&gt;&gt; s = pd.Series(&#39;Antelope&#39;, &#39;Lion&#39;, &#39;Zebra&#39;, numpy.nan)</span>
688+
<span class="sd"> &gt;&gt;&gt; s.contains(pattern=&#39;a&#39;)</span>
689+
<span class="sd"> 0 False</span>
690+
<span class="sd"> 1 False</span>
691+
<span class="sd"> 2 True</span>
692+
<span class="sd"> 3 NaN</span>
693+
<span class="sd"> dtype: bool</span>
694+
695+
<span class="sd"> **Case sensitivity**</span>
696+
697+
<span class="sd"> With `case_sensitive` set to `False` we can match `a` with both</span>
698+
<span class="sd"> `a` and `A`:</span>
699+
700+
<span class="sd"> &gt;&gt;&gt; s.contains(pattern=&#39;a&#39;, case_sensitive=False)</span>
701+
<span class="sd"> 0 True</span>
702+
<span class="sd"> 1 False</span>
703+
<span class="sd"> 2 True</span>
704+
<span class="sd"> 3 NaN</span>
705+
<span class="sd"> dtype: bool</span>
706+
707+
<span class="sd"> **Missing values**</span>
708+
709+
<span class="sd"> We can fill missing values in the output using the `na` parameter:</span>
710+
711+
<span class="sd"> &gt;&gt;&gt; s.contains(pattern=&#39;a&#39;, na=False)</span>
712+
<span class="sd"> 0 False</span>
713+
<span class="sd"> 1 False</span>
714+
<span class="sd"> 2 True</span>
715+
<span class="sd"> 3 False</span>
716+
<span class="sd"> dtype: bool</span>
717+
<span class="sd"> &quot;&quot;&quot;</span>
718+
<span class="k">pass</span>
717719
</pre></div>
718720
</div>
719721
<p><strong>Bad:</strong></p>

pandas/guide/pandas_pr.html

+31-4
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,32 @@ <h2>5. Push your changes to pandas<a class="headerlink" href="#push-your-changes
134134
<p>Then, visit <a class="reference external" href="https://github.com/pandas-dev/pandas">https://github.com/pandas-dev/pandas</a> in your browser, and click
135135
on the “Compare &amp; pull request” button in the yellow box above the repository
136136
files.</p>
137-
<p>This will create a pull request, will be reviewed by other developers. It is
138-
unlikely that a pull request is accepted in its first version, so expect some
139-
comments on things that can be improved, from more senior pandas contributors.</p>
137+
<p>If you have only one commit, the pull request will automatically use its
138+
comment as title. Otherwise, please name it following the same standard as
139+
described before (e.g. “DOC: Improved the docstring of DataFrame.head()”).
140+
In the body of the description, there are some checkboxes. For the sprint,
141+
we do not have an issue for each docstring change, and as we are not changing
142+
code, we do not need to add/run tests or add a <cite>whatsnew</cite> entry. So you can
143+
ignore these check boxes. Just verify that your changes respect the PEP-8
144+
style by running the command:</p>
145+
<blockquote>
146+
<div><div class="line-block">
147+
<div class="line"><code class="docutils literal"><span class="pre">git</span> <span class="pre">diff</span> <span class="pre">upstream/master</span> <span class="pre">-u</span> <span class="pre">--</span> <span class="pre">&quot;*.py&quot;</span> <span class="pre">|</span> <span class="pre">flake8</span> <span class="pre">--diff</span></code></div>
148+
</div>
149+
</div></blockquote>
150+
<p>If the command does not return any warning, mark that checkbox with an X (do
151+
not leave spaces inside the brackets, use <cite>[X]</cite>). If it returns a warning,
152+
fix it, commit your changes, and push to your remote branch before opening
153+
the pull request.</p>
154+
<p>After the checklist, please <strong>copy the output of the validate_docstrings.py
155+
script</strong>. This will help reviewers see the rendered docstring, as well as
156+
identify any validation problem.</p>
157+
<p>This will create a pull request, and other developers will review it.</p>
158+
<div class="section" id="updating-a-pull-request">
159+
<h3>Updating a pull request<a class="headerlink" href="#updating-a-pull-request" title="Permalink to this headline"></a></h3>
160+
<p>It is unlikely that a pull request is accepted in its first version, so expect
161+
some comments on things that can be improved, from more senior pandas
162+
contributors.</p>
140163
<p>For comments in your review, you can make new changes in your local branch for
141164
that pull request. And once you addressed all the comments, you can commit them
142165
and push again to your local branch. As you used the parameter <cite>-u</cite> in your
@@ -160,6 +183,7 @@ <h2>5. Push your changes to pandas<a class="headerlink" href="#push-your-changes
160183
learn more. So, be patient and enjoy. And feel free to provide constructive
161184
feedback in other contributors pull requests too.</p>
162185
</div>
186+
</div>
163187
</div>
164188

165189

@@ -178,7 +202,10 @@ <h3><a href="contents.html">Table Of Contents</a></h3>
178202
<li><a class="reference internal" href="#visual-validation-of-the-docstring">2. Visual validation of the docstring</a></li>
179203
<li><a class="reference internal" href="#validate-that-the-docstring-is-clear-to-others">3. Validate that the docstring is clear to others</a></li>
180204
<li><a class="reference internal" href="#commit-your-changes">4. Commit your changes</a></li>
181-
<li><a class="reference internal" href="#push-your-changes-to-pandas">5. Push your changes to pandas</a></li>
205+
<li><a class="reference internal" href="#push-your-changes-to-pandas">5. Push your changes to pandas</a><ul>
206+
<li><a class="reference internal" href="#updating-a-pull-request">Updating a pull request</a></li>
207+
</ul>
208+
</li>
182209
</ul>
183210
</li>
184211
</ul>

pandas/guide/searchindex.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pandas/guide/source/pandas_docstring.rst

+2
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ positional arguments `head(3)`.
777777
2 True
778778
3 False
779779
dtype: bool
780+
"""
781+
pass
780782
781783
**Bad:**
782784

pandas/guide/source/pandas_pr.rst

+28-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,34 @@ Then, visit https://github.com/pandas-dev/pandas in your browser, and click
103103
on the "Compare & pull request" button in the yellow box above the repository
104104
files.
105105

106-
This will create a pull request, will be reviewed by other developers. It is
107-
unlikely that a pull request is accepted in its first version, so expect some
108-
comments on things that can be improved, from more senior pandas contributors.
106+
If you have only one commit, the pull request will automatically use its
107+
comment as title. Otherwise, please name it following the same standard as
108+
described before (e.g. "DOC: Improved the docstring of DataFrame.head()").
109+
In the body of the description, there are some checkboxes. For the sprint,
110+
we do not have an issue for each docstring change, and as we are not changing
111+
code, we do not need to add/run tests or add a `whatsnew` entry. So you can
112+
ignore these check boxes. Just verify that your changes respect the PEP-8
113+
style by running the command:
114+
115+
| ``git diff upstream/master -u -- "*.py" | flake8 --diff``
116+
117+
If the command does not return any warning, mark that checkbox with an X (do
118+
not leave spaces inside the brackets, use `[X]`). If it returns a warning,
119+
fix it, commit your changes, and push to your remote branch before opening
120+
the pull request.
121+
122+
After the checklist, please **copy the output of the validate_docstrings.py
123+
script**. This will help reviewers see the rendered docstring, as well as
124+
identify any validation problem.
125+
126+
This will create a pull request, and other developers will review it.
127+
128+
Updating a pull request
129+
~~~~~~~~~~~~~~~~~~~~~~~
130+
131+
It is unlikely that a pull request is accepted in its first version, so expect
132+
some comments on things that can be improved, from more senior pandas
133+
contributors.
109134

110135
For comments in your review, you can make new changes in your local branch for
111136
that pull request. And once you addressed all the comments, you can commit them

0 commit comments

Comments
 (0)