Skip to content

Commit 581b43b

Browse files
committed
DOC: add dev environment creation details to contributing.rst
1 parent 75fce78 commit 581b43b

File tree

4 files changed

+141
-44
lines changed

4 files changed

+141
-44
lines changed

CONTRIBUTING.md

+53
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,59 @@ clear what the branch brings to *pandas*. You can have many
137137
shiny-new-features and switch in between them using the git checkout
138138
command.
139139

140+
### Creating a development environment
141+
142+
An easy way to create a *pandas* development environment is as follows.
143+
First, install either Install Anaconda \<install-anaconda\> or
144+
Install miniconda \<install-miniconda\>.
145+
146+
Tell `conda` to create a new environment, named `pandas_dev`, or any
147+
name you would like for this environment by running:
148+
149+
conda create -n pandas_dev pandas cython nose libpython
150+
151+
For a python 3 environment
152+
153+
conda create -n pandas_dev python=3 pandas cython nose libpython
154+
155+
This will create the new environment, and not touch any of your existing
156+
environment, nor any existing python installation. It will install all
157+
of the basic dependencies of pandas, as well as the development and
158+
testing tools. If you would like to install other dependencies, you can
159+
install them as follows:
160+
161+
conda install -n pandas_dev -c pandas pytables scipy
162+
163+
To install *all* pandas dependencies you can do the following:
164+
165+
conda install -n pandas_dev -c pandas --file ci/requirements.txt
166+
167+
To work in this environment, `activate` it as follows:
168+
169+
activate pandas_dev
170+
171+
At which point, the prompt will change to indicate you are in the new
172+
development environment.
173+
174+
> **note**
175+
>
176+
> The above syntax is for `windows` environments. To work on
177+
> `macosx/linux`, use:
178+
>
179+
> source activate pandas_dev
180+
>
181+
> Furthermore, `libpython` is only required on `windows` environments.
182+
183+
To view your environments:
184+
185+
conda info -e
186+
187+
To return to you home root environment:
188+
189+
deactivate
190+
191+
See the full `conda` docs [here](http://conda.pydata.org/docs).
192+
140193
### Making changes
141194

142195
Before making your code changes, it is often necessary to build the code

ci/requirements.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
dateutil
2+
pytz
3+
openpyxl
4+
xlsxwriter
5+
xlrd
6+
html5lib
7+
patsy
8+
beautiful-soup
9+
numpy
10+
cython
11+
scipy
12+
numexpr
13+
pytables
14+
matplotlib
15+
lxml
16+
sqlalchemy
17+
bottleneck
18+
pymysql

doc/source/contributing.rst

+65-3
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,71 @@ changes in this branch specific to one bug or feature so it is clear
132132
what the branch brings to *pandas*. You can have many shiny-new-features
133133
and switch in between them using the git checkout command.
134134

135+
.. _contributing.dev_env:
136+
137+
Creating a development environment
138+
----------------------------------
139+
140+
An easy way to create a *pandas* development environment is as follows. First, install either :ref:`Install Anaconda <install-anaconda>` or :ref:`Install miniconda <install-miniconda>`.
141+
142+
Tell ``conda`` to create a new environment, named ``pandas_dev``, or any name you would like for this environment by running:
143+
144+
::
145+
146+
conda create -n pandas_dev pandas cython nose libpython
147+
148+
149+
For a python 3 environment
150+
151+
::
152+
153+
conda create -n pandas_dev python=3 pandas cython nose libpython
154+
155+
This will create the new environment, and not touch any of your existing environment, 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:
156+
157+
::
158+
159+
conda install -n pandas_dev -c pandas pytables scipy
160+
161+
To install *all* pandas dependencies you can do the following:
162+
163+
::
164+
165+
conda install -n pandas_dev -c pandas --file ci/requirements.txt
166+
167+
To work in this environment, ``activate`` it as follows:
168+
169+
::
170+
171+
activate pandas_dev
172+
173+
At which point, the prompt will change to indicate you are in the new development environment.
174+
175+
.. note::
176+
177+
The above syntax is for ``windows`` environments. To work on ``macosx/linux``, use:
178+
179+
::
180+
181+
source activate pandas_dev
182+
183+
Furthermore, ``libpython`` is only required on ``windows`` environments.
184+
185+
To view your environments:
186+
187+
::
188+
189+
conda info -e
190+
191+
To return to you home root environment:
192+
193+
::
194+
195+
deactivate
196+
197+
See the full ``conda`` docs `here
198+
<http://conda.pydata.org/docs>`_.
199+
135200
Making changes
136201
--------------
137202

@@ -572,6 +637,3 @@ branch has not actually been merged.
572637
The branch will still exist on GitHub, so to delete it there do ::
573638

574639
git push origin --delete shiny-new-feature
575-
576-
577-

doc/source/install.rst

+5-41
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ pandas at all.
3535
Simply create an account, and have access to pandas from within your brower via
3636
an `IPython Notebook <http://ipython.org/notebook.html>`__ in a few minutes.
3737

38+
.. _install.anaconda
39+
3840
Installing pandas with Anaconda
3941
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4042

@@ -66,6 +68,8 @@ admin rights to install it, it will install in the user's home directory, and
6668
this also makes it trivial to delete Anaconda at a later date (just delete
6769
that folder).
6870

71+
.. _install.miniconda
72+
6973
Installing pandas with Miniconda
7074
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7175

@@ -173,47 +177,8 @@ Installing using your Linux distribution's package manager.
173177

174178
Installing from source
175179
~~~~~~~~~~~~~~~~~~~~~~
176-
.. note::
177-
178-
Installing from the git repository requires a recent installation of `Cython
179-
<http://cython.org>`__ as the cythonized C sources are no longer checked
180-
into source control. Released source distributions will contain the built C
181-
files. I recommend installing the latest Cython via ``easy_install -U
182-
Cython``
183-
184-
The source code is hosted at http://github.com/pydata/pandas, it can be checked
185-
out using git and compiled / installed like so:
186-
187-
::
188-
189-
git clone git://github.com/pydata/pandas.git
190-
cd pandas
191-
python setup.py install
192-
193-
Make sure you have Cython installed when installing from the repository,
194-
rather then a tarball or pypi.
195180

196-
On Windows, I suggest installing the MinGW compiler suite following the
197-
directions linked to above. Once configured property, run the following on the
198-
command line:
199-
200-
::
201-
202-
python setup.py build --compiler=mingw32
203-
python setup.py install
204-
205-
Note that you will not be able to import pandas if you open an interpreter in
206-
the source directory unless you build the C extensions in place:
207-
208-
::
209-
210-
python setup.py build_ext --inplace
211-
212-
The most recent version of MinGW (any installer dated after 2011-08-03)
213-
has removed the '-mno-cygwin' option but Distutils has not yet been updated to
214-
reflect that. Thus, you may run into an error like "unrecognized command line
215-
option '-mno-cygwin'". Until the bug is fixed in Distutils, you may need to
216-
install a slightly older version of MinGW (2011-08-02 installer).
181+
See the :ref:`contributing documentation <contributing>` for complete instructions on building from the git source tree. Further, see :ref:`creating a devevlopment environment <contributing-dev_env>` if you wish to create a *pandas* development environment.
217182

218183
Running the test suite
219184
~~~~~~~~~~~~~~~~~~~~~~
@@ -354,4 +319,3 @@ Optional Dependencies
354319
work. Hence, it is highly recommended that you install these. A packaged
355320
distribution like `Enthought Canopy
356321
<http://enthought.com/products/canopy>`__ may be worth considering.
357-

0 commit comments

Comments
 (0)