[Matplotlib-devel] Reorganising the test files?

Nelle Varoquaux nelle.varoquaux at gmail.com
Sat Jan 28 13:27:50 EST 2017


>
> Actually, it is really a pain that Matplotlib doesn't follow python
>> standards for any contributors that contributes to any other python
>> packages.
>>
>
> very true, but...
>
> 1) If we were starting from scratcth that would be one thing, but a lot of
> thrash jsut to meet a "standard" is probably not worth it.
>

The benefits of following standards for maintainability has been
demonstrated over and over.


> 2) I don't know how standardized this concept is, and personally, I don''t
> like it (if I understand it correctly, anyway)
>

It is extremely standard. Matplotlib is not the only project not following
standards, but it's probably in the 1% of projects not following standards.
More importantly, it is how we (the community) teach how to organize
packages and tests.

numpy, scipy, skimage, pandas, sklearn, sympy, ipython all follow this
standard.
The only other mainstream scientific python package that may not entirely
follow this convention is cython.


> I prefer that ALL tests be in one single directory tree, ideally with that
> tree mtaching the package / subpacakge/module tree of the project, ie:
>

The whole point of convention is to avoid  this.


>
> project
>     __init__.py
>     proj_mod1.py
>     sub_package1
>       __init__.py
>       sub_mod1.py
>     ...
>
> test_project
>     test_proj_mod1.py
>     test_sub_package1
>         test_sub_mod1.py
>
> i.e. one test file for each module file.
>
> With this method, it would not be hard to find the tests that correspond
> to a particular python module.
>
> I'm ambivalent about whether the test files should be importable packages,
> and I think there is a lot to be said for keeping the test code outside the
> installable package tree altogether, but I definitely don't like them all
> intermingled.
>
> though I still don't advocate a lot of churn for this...
>
> -CHB
>
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170128/63357d1a/attachment.html>


More information about the Matplotlib-devel mailing list