Skip to content

Commit 6fb141f

Browse files
DOC: Move pandas_development_faq pages from wiki to doc pandas-dev#30232
1 parent 307ba0c commit 6fb141f

File tree

3 files changed

+50
-283
lines changed

3 files changed

+50
-283
lines changed

doc/source/development/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Development
1414

1515
contributing
1616
code_style
17-
testing
1817
maintaining
1918
internals
2019
extending

doc/source/development/pandas_development_faq.rst

+50-36
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ Purpose
1313
=======
1414

1515
Based on https://github.com/pydata/pandas/pull/4404#issuecomment-22864665 this
16-
wiki page gathers oft-asked questions/comments from contributors to make the
16+
wiki page gathers oft-asked questions/comments from contributors to make the
1717
contribution process a bit less painful.
1818

19-
The aim is to make it easier for
19+
The aim is to make it easier for
2020

2121
* Core developers to give advice & accept new code contributions.
2222
* New contributors to find an easier way in for quick and efficient bug-fixes
2323
or feature additions
2424

25-
While some questions/comments/advice may be applicable to general programming,
25+
While some questions/comments/advice may be applicable to general programming,
2626
these are things that directly relate to ``pandas`` development.
2727

2828
* `**PR == pull request** <https://help.github.com/articles/using-pull-requests>`_
29-
* **core developer:** A person contributing on very high frequency & who is
29+
* **core developer:** A person contributing on very high frequency & who is
3030
familiar with the code base and development process of ``pandas``.
31-
* **contributors:** The occasional contributor, maybe from a specific domain,
32-
contributes bug fixes, features or documentation with low frequency, may not
33-
be an every day programmer (e.g. programming scientists or engineer using
31+
* **contributors:** The occasional contributor, maybe from a specific domain,
32+
contributes bug fixes, features or documentation with low frequency, may not
33+
be an every day programmer (e.g. programming scientists or engineer using
3434
pandas for data processing) and looks at things from an end-user perspective.
3535

3636
Pandas Development & Release Process
@@ -44,7 +44,8 @@ Testing
4444
**A:** Your test should be self-contained. That is, it should test preferably a
4545
single thing, e.g., a method that you've added to the ``DataFrame`` class. Your
4646
test function/method should start with ``test_`` and the rest of the name should
47-
be related to whatever functionality you're testing, like ``test_replace_with_dict_regex``.
47+
be related to whatever functionality you're testing, like
48+
``test_replace_with_dict_regex``.
4849

4950
**Q:** Help! I can't get the tests to run!
5051

@@ -66,13 +67,15 @@ Travis configuration for the Travis to start builds from my fork?
6667

6768
**A:** To be filled out.
6869

69-
**Q:** Why do I need a Travis file in my repo if it's already in the head repository?
70+
**Q:** Why do I need a Travis file in my repo if it's already in the head
71+
repository?
7072

7173
**A:** Because we're not using subversion. Okay, seriously, it's because as far
7274
as ``git`` is concerned *your* repository is the *only* one that exists. There's
73-
really no such thing as a "head" repository in the eyes of ``git``, those are concepts
74-
that we impose on it to make collaboration more effective and easier. This is one
75-
of the nice aspects of `distributed version control <http://en.wikipedia.org/wiki/Distributed_revision_control>`_.
75+
really no such thing as a "head" repository in the eyes of ``git``, those are
76+
concepts that we impose on it to make collaboration more effective and easier.
77+
This is one of the nice aspects of
78+
`distributed version control <http://en.wikipedia.org/wiki/Distributed_revision_control>`_.
7679

7780
Documentation
7881
-------------
@@ -92,26 +95,28 @@ Workflow
9295

9396
**Q:** Who will be responsible for evaluating my PR?
9497

95-
**A:** Technically, anyone with push rights to the ``pydata/pandas`` can evaluate
96-
it. In practice, there are a handful of people who are constantly watching the ``pandas``
97-
repo for new PRs, so most likely it'll be one of them that evaluates it. I'm not
98-
going to list names, but it's not that hard to figure out...
98+
**A:** Technically, anyone with push rights to the ``pydata/pandas`` can
99+
evaluate it. In practice, there are a handful of people who are constantly
100+
watching the ``pandas`` repo for new PRs, so most likely it'll be one of them
101+
that evaluates it. I'm not going to list names, but it's not that hard to figure
102+
out...
99103

100104
Criteria for PR
101105
---------------
102106

103107
**Q:** What are the criteria for acceptance of a PR?
104108

105-
**A:** First and foremost, your fix **must not break any existing functionality**,
106-
one indicator of this is that your Travis build passes. Second, just give it some
107-
time. Everyone is busy and @wesm has not (yet?) amassed a ``pandas`` development army.
109+
**A:** First and foremost, your fix **must not break any existing
110+
functionality**, one indicator of this is that your Travis build passes. Second,
111+
just give it some time. Everyone is busy and @wesm has not (yet?) amassed a
112+
``pandas`` development army.
108113

109114
**Q:** Do I need to open an issue first?
110115

111116
**A:** Not necessarily. If you want to submit a documentation change, e.g., a
112117
typo fix, then opening an issue is not necessary.
113118

114-
Coding Style
119+
Coding Style
115120
------------
116121

117122
**Q:** What level of commenting is accepted?
@@ -127,27 +132,32 @@ BAD:
127132
.. code-block:: python
128133
129134
# increment i
130-
i += 1
135+
i = int
131136
137+
i += 1
132138
133139
GOOD:
134140

135141
.. code-block:: python
136142
137143
# add a person to the person count
138-
i += 1
144+
i = int
139145
146+
i += 1
140147
141148
Debugging
142149
---------
143150

144-
**Q:** How can I debug without adding loads of ``print`` statements/calls everywhere?
151+
**Q:** How can I debug without adding loads of ``print`` statements/calls
152+
everywhere?
145153

146-
**A:** You can use the Python standard library's ``pdb`` and set a breakpoint.
147-
Put ``import pdb; pdb.set_trace()`` at the line where you want to stop.
148-
`ipdb <https://github.com/gotcha/ipdb>`_ is ``pdb`` with tab-completion and a few other
149-
bells and whistles, making debugging less painful. There's also `ipdbplugin <https://github.com/flavioamieiro/nose-ipdb>`_ which allows you to drop into ``ipdb`` from
150-
`nose <https://github.com/nose-devs/nose>`_ when a test fails via
154+
**A:** You can use the Python standard library's ``pdb`` and set a breakpoint.
155+
Put ``import pdb; pdb.set_trace()`` at the line where you want to stop.
156+
`ipdb <https://github.com/gotcha/ipdb>`_ is ``pdb`` with tab-completion and a
157+
few other bells and whistles, making debugging less painful. There's also
158+
`ipdbplugin <https://github.com/flavioamieiro/nose-ipdb>`_ which allows you to
159+
drop into ``ipdb`` from `nose <https://github.com/nose-devs/nose>`_ when a test
160+
fails via
151161

152162
.. code-block:: shell
153163
@@ -157,7 +167,7 @@ bells and whistles, making debugging less painful. There's also `ipdbplugin <htt
157167

158168
**A:** That's probably a bit overkill. See the suggestions above.
159169

160-
Pandas Library
170+
Pandas Library
161171
==============
162172

163173
Source Comments
@@ -171,9 +181,11 @@ Testing
171181

172182
**Q:** Why don't test functions have a docstring?
173183

174-
**A:** If your tests are self-contained and aren't `sprawling ecosystems of spaghetti <http://cdn.memegenerator.net/instances/250x250/26336623.jpg>`_ then having a docstring
175-
is redundant. Also, the test name is usually (and should be!) very descriptive.
176-
Remember there's no character limit for variable names. We're not using FORTRAN.
184+
**A:** If your tests are self-contained and aren't
185+
`sprawling ecosystems of spaghetti <http://cdn.memegenerator.net/instances/250x250/26336623.jpg>`_
186+
then having a docstring is redundant. Also, the test name is usually (and
187+
should be!) very descriptive. Remember there's no character limit for variable
188+
names. We're not using FORTRAN.
177189

178190
**Q:** ``DataFrame`` and other ``pandas`` objects often many properties/methods.
179191
What is the level of detail that I should consider when I'm writing my test(s)?
@@ -185,16 +197,18 @@ things to be *really* self-contained.
185197
**Q:** Should I consider possible corner cases of my implementation?
186198

187199
**A:** The answer is a resounding **YES**! In some cases you may come across
188-
something that is very pathological. In those cases you should ask a core developer.
200+
something that is very pathological. In those cases you should ask a core
201+
developer.
189202

190203
Complexity
191204
----------
192205

193206
* Some modules (e.g. io/parsers.py) seem to have grown into very high complexity.
194-
It is very time consuming to find out what is done where just for fixing a small bug.
207+
It is very time consuming to find out what is done where just for fixing a
208+
small bug.
195209
* a splitting into several modules would be good
196-
* more in-code comments telling why something is done and under which condition and
197-
for what expected result.
210+
* more in-code comments telling why something is done and under which condition
211+
and for what expected result.
198212

199213

200214
Docstrings

0 commit comments

Comments
 (0)