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
If you are on Windows, then you will also need to install the compiler linkages:
113
-
114
-
conda install -n pandas_dev libpython
112
+
> **warning**
113
+
>
114
+
> If you are on Windows, see here for a fully compliant Windows environment <contributing.windows>.
115
115
116
116
This will create the new environment, and not touch any of your existing environments, nor any existing python installation. It will install all of the basic dependencies of *pandas*, as well as the development and testing tools. If you would like to install other dependencies, you can install them as follows:
117
117
@@ -143,6 +143,28 @@ See the full conda docs [here](http://conda.pydata.org/docs).
143
143
144
144
At this point you can easily do an *in-place* install, as detailed in the next section.
145
145
146
+
### Creating a Windows development environment
147
+
148
+
To build on Windows, you need to have compilers installed to build the extensions. You will need to install the appropriate Visual Studio compilers, VS 2008 for Python 2.7, VS 2010 for 3.4, and VS 2015 for Python 3.5.
149
+
150
+
For Python 2.7, you can install the `mingw` compiler which will work equivalently to VS 2008:
151
+
152
+
conda install -n pandas_dev libpython
153
+
154
+
or use the [Microsoft Visual Studio VC++ compiler for Python](https://www.microsoft.com/en-us/download/details.aspx?id=44266). Note that you have to check the `x64` box to install the `x64` extension building capability as this is not installed by default.
155
+
156
+
For Python 3.4, you can download and install the [Windows 7.1 SDK](https://www.microsoft.com/en-us/download/details.aspx?id=8279). Read the references below as there may be various gotchas during the installation.
157
+
158
+
For Python 3.5, you can download and install the [Visual Studio 2015 Community Edition](https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx).
Before making your code changes, it is often necessary to build the code that was just checked out. There are two primary methods of doing this.
@@ -258,17 +280,26 @@ Contributing to the code base
258
280
259
281
### Code standards
260
282
261
-
*pandas* uses the [PEP8](http://www.python.org/dev/peps/pep-0008/) standard. There are several tools to ensure you abide by this standard.
283
+
*pandas* uses the [PEP8](http://www.python.org/dev/peps/pep-0008/) standard. There are several tools to ensure you abide by this standard. Here are *some* of the more common `PEP8` issues:
284
+
285
+
> - we restrict line-length to 80 characters to promote readability
286
+
> - passing arguments should have spaces after commas, e.g. `foo(arg1, arg2, kw1='bar')`
287
+
288
+
The Travis-CI will run [flake8](http://pypi.python.org/pypi/flake8) tool and report any stylistic errors in your code. Generating any warnings will cause the build to fail; thus these are part of the requirements for submitting code to *pandas*.
289
+
290
+
It is helpful before submitting code to run this yourself on the diff:
291
+
292
+
git diff master | flake8 --diff
262
293
263
-
We've written a tool to check that your commits are PEP8 great, [pip install pep8radius](https://github.com/hayd/pep8radius). Look at PEP8 fixes in your branch vs master with:
294
+
Furthermore, we've written a tool to check that your commits are PEP8 great, [pip install pep8radius](https://github.com/hayd/pep8radius). Look at PEP8 fixes in your branch vs master with:
264
295
265
-
pep8radius master --diff
296
+
pep8radius master --diff
266
297
267
298
and make these changes with:
268
299
269
300
pep8radius master --diff --in-place
270
301
271
-
Alternatively, use the [flake8](http://pypi.python.org/pypi/flake8) tool for checking the style of your code. Additional standards are outlined on the [code style wiki page](https://github.com/pydata/pandas/wiki/Code-Style-and-Conventions).
302
+
Additional standards are outlined on the [code style wiki page](https://github.com/pydata/pandas/wiki/Code-Style-and-Conventions).
272
303
273
304
Please try to maintain backward compatibility. *pandas* has lots of users with lots of existing code, so don't break it if at all possible. If you think breakage is required, clearly state why as part of the pull request. Also, be careful when changing method signatures and add deprecation warnings where needed.
274
305
@@ -315,6 +346,14 @@ The tests suite is exhaustive and takes around 20 minutes to run. Often it is wo
Performance matters and it is worth considering whether your code has introduced performance regressions. *pandas* is in the process of migrating to the [asv library](https://github.com/spacetelescope/asv) to enable easy monitoring of the performance of critical *pandas* operations. These benchmarks are all found in the `pandas/asv_bench` directory. asv supports both python2 and python3.
@@ -356,7 +395,7 @@ It can also be useful to run tests in your current environment. You can simply d
356
395
357
396
This command is equivalent to:
358
397
359
-
asv run --quick --show-stderr --python=same
398
+
asv run --quick --show-stderr --python=same
360
399
361
400
This will launch every test only once, display stderr from the benchmarks, and use your local `python` that comes from your `$PATH`.
0 commit comments