Use declarative config for setup.py and enable coverage testing#422
Conversation
see https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files Also this commit expands some metadata, e.g. classifiers and project_urls. Testing requirements are specified with "tests" extras. Other development requirements are tracked with "develop" extras. Peferences to extras are supported in tests_require since setuptools v36.7.0, hence additional entry in setup_requires.
We run coverage tests only in py3.6
Also drop testing on py3.3
In this way Github recognize the LICENSE as BSD
|
Thanks, and apologies for the long delay!
Could you explain the advantages (and possible disadvantages) of this? Could you roll back the unbundling of six.py? I prefer to avoid the external dependency. |
More declarative config, no code at all. And all projects settings are in one place. Not sure about disadvantages, maybe version requirements for the setuptools, that disallow ancient stuff. I can lower this down to 30.3.0. The price is some repetition for *requires options: we can't reference extras requirements like
Can you explain some technical reasons behind of this? pip can handle external dependencies well, by design. In turn, you already have very outdated six.py file, almost uncovered by tests. An option may be copy&paste only very tiny part of the six, which is actually used and will be well maintained. |
|
It looks like we only depend on exec_ and print_ from six.py. I suppose we could just move those to backend.py? We don't even need the full print_, really; it's just used in a handful of places for concatenating strings. No dependency = one less thing that can go wrong. |
We use "imports from future" to get print() function.
|
Ok, dependency on six was removed. Note bad coverage on this new diff - implemented (BTW, codecov.yml taken from the diofant, you may want less strict patch requirements.) |
That must be because PY2 isn't covered at all. exec_ is heavily used, to implement the binary operations for the mpf type and for hypergeometric series! |
Of course. The question was: should we enable coverage testing on PY2 just for that single function? |
|
I don't understand the problem. |
For example, travis build will take longer time (COVERAGE=on jobs more then 2x times slower then usual). Ok, now code coverage collected for 2.7 too. Please restart failed job. |
|
Good! And now the fun game of raising the coverage% begins :) |
|
Does coverage testing ignore doctests? |
|
No. pytest is collecting doctests per default (i.e. we run it with But there may be problems, which I miss, may be with dynamic docstrings or something. |
|
Example: libmp.libintmath.stirling1 is reported as not covered, but should be covered via the doctest for mpmath.stirling1. Another example: functions.qfunctions.qhyper is reported as not covered, but has its own doctests. |
I see. These seems to be the mentioned above cases with dynamic |
|
That's bizarre -- the docstrings in functions/qfunctions.py are not dynamic. In either case, if the test runner doesn't run all doctests, that's not good. |
Hmm, indeed. This case seems to be related with broken defun* decorators, see #432. |
Major changes:
Minor stuff:
use xenial dist on TravisI can split this PR if you prefer.