You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* **core developer:** A person contributing on very high frequency & who is
29
+
* **core developer:** A person contributing on very high frequency & who is
30
30
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
34
34
pandas for data processing) and looks at things from an end-user perspective.
35
35
36
36
Pandas Development & Release Process
@@ -44,7 +44,8 @@ Testing
44
44
**A:** Your test should be self-contained. That is, it should test preferably a
45
45
single thing, e.g., a method that you've added to the ``DataFrame`` class. Your
46
46
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``.
48
49
49
50
**Q:** Help! I can't get the tests to run!
50
51
@@ -66,13 +67,15 @@ Travis configuration for the Travis to start builds from my fork?
66
67
67
68
**A:** To be filled out.
68
69
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?
70
72
71
73
**A:** Because we're not using subversion. Okay, seriously, it's because as far
72
74
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>`_.
76
79
77
80
Documentation
78
81
-------------
@@ -92,26 +95,28 @@ Workflow
92
95
93
96
**Q:** Who will be responsible for evaluating my PR?
94
97
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...
99
103
100
104
Criteria for PR
101
105
---------------
102
106
103
107
**Q:** What are the criteria for acceptance of a PR?
104
108
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.
108
113
109
114
**Q:** Do I need to open an issue first?
110
115
111
116
**A:** Not necessarily. If you want to submit a documentation change, e.g., a
112
117
typo fix, then opening an issue is not necessary.
113
118
114
-
Coding Style
119
+
Coding Style
115
120
------------
116
121
117
122
**Q:** What level of commenting is accepted?
@@ -127,27 +132,32 @@ BAD:
127
132
.. code-block:: python
128
133
129
134
# increment i
130
-
i +=1
135
+
i =int
131
136
137
+
i +=1
132
138
133
139
GOOD:
134
140
135
141
.. code-block:: python
136
142
137
143
# add a person to the person count
138
-
i +=1
144
+
i =int
139
145
146
+
i +=1
140
147
141
148
Debugging
142
149
---------
143
150
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?
145
153
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
151
161
152
162
.. code-block:: shell
153
163
@@ -157,7 +167,7 @@ bells and whistles, making debugging less painful. There's also `ipdbplugin <htt
157
167
158
168
**A:** That's probably a bit overkill. See the suggestions above.
159
169
160
-
Pandas Library
170
+
Pandas Library
161
171
==============
162
172
163
173
Source Comments
@@ -171,9 +181,11 @@ Testing
171
181
172
182
**Q:** Why don't test functions have a docstring?
173
183
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.
177
189
178
190
**Q:** ``DataFrame`` and other ``pandas`` objects often many properties/methods.
179
191
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.
185
197
**Q:** Should I consider possible corner cases of my implementation?
186
198
187
199
**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.
189
202
190
203
Complexity
191
204
----------
192
205
193
206
* 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.
195
209
* 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
0 commit comments