[Numpy-discussion] Guidance regarding build and testing

Ralf Gommers ralf.gommers at gmail.com
Sun Dec 21 16:54:33 EST 2014


On Sun, Dec 21, 2014 at 7:17 PM, Maniteja Nandana <
maniteja.modesty067 at gmail.com> wrote:

> Hello Ralf,
> Thanks for the help. Now I am able to see the modifications in the
> interpreter. As I was going through broadcasting and slicing, I was eager
> to try out different modifications to understand the working.
>
> On Sun, Dec 21, 2014 at 10:57 PM, Ralf Gommers <ralf.gommers at gmail.com>
> wrote:
>
>>
>> Almost. test_xxx.py contains tests for all functions in the file xxx.py
>>
>>
> Sorry was a bit confused then. Thanks for the correction  :)
>
>>
>> Note that there is also a variant which does use virtualenvs documented
>> at https://github.com/scipy/scipy/blob/master/HACKING.rst.txt#faq (under
>> "*How do I set up a development version of SciPy in parallel to a
>> released version that I use to do my job/research?").*
>>
>>
>>> maniteja at ubuntu:~/FOSS/numpy$ echo $PYTHONPATH
>>> /home/maniteja/FOSS/numpy/numpy
>>>
>>>
>> Maybe that's one /numpy too many? If it's right, you should have a dir
>> /home/maniteja/FOSS/numpy/
>> numpy/numpy/core.
>>
>>  No I have setup.py in home/maniteja/FOSS/numpy/numpy.
>  Hence, I have core also as home/maniteja/FOSS/numpy/numpy/core
>
>
>> An easy way to check which numpy you're using is "import numpy;
>>> print(numpy.__file__)".
>>>
>>
>> Thanks, I didn't get the idea then. It now shows
> '/home/maniteja/FOSS/numpy/numpy/__init__.pyc'
>
> The documentation tells that the PWD of the setup.py is to be set as
> PYTHONPATH variable.
>

That's correct. Note that setup.py's are hierarchical - you have one in
.../FOSS/numpy (this is the main one), one in .../FOSS/numpy/numpy, one in
.../FOSS/numpy/numpy/core and so on.

This is fine. You should not develop directly on your own master branch.
>> Rather, keep your master branch in sync with numpy master, and create a new
>> feature branch for every new feature that you want to work on.
>>
>> Ralf
>>
>> Oh thanks, I have only used git for my local repositories or
> collaboration with peers. So just wanted to clarify before I end up messing
> anything :), though there I know that there needs to be write access to
> modify the master branch.
>
> Lastly, it would be great if you could suggest whether I should learn
> Cython or any other codebase to understand the source code
>

It depends on what you want to work on. There's not much Cython in numpy,
only in numpy.random. There's a lot of things you can work on knowing only
Python, but the numpy core (ndarray, dtypes, ufuncs, etc.) is written in C.

I'd suggest diving right in and starting with something that can be
fixed/implemented in Python, something from
https://github.com/numpy/numpy/labels/Easy%20Fix perhaps. Then send a PR
for that so you get some feedback and a feeling for how the process of
contributing works.


> and also the timings preferable to work and discuss on the mailing lists
> as I stay in India ,which is GMT+5:30 timezone. This is my winter holidays.
> So, I could adjust my timings accordingly as I have no schoolwork :)
>

I wouldn't worry about that. In many cases it takes a day or couple of days
before someone replies, especially if the topic requires detailed knowledge
of the codebase. And the people on this list are split roughly equally
between the US and Europe with smaller representations from all other
continents, so there's always someone awake:)

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20141221/76779c9c/attachment.html>


More information about the NumPy-Discussion mailing list