Conversation
|
The templating changes all look good to me. I am not an expert on distutils or Appveyor, but I agree that the proposed changes seem to have reduced total LOC substantially which may ease future maintenance. |
6c38b2c to
daccc98
Compare
|
Disabling binaries is necessary for the Python-2.6/numpy-1.7 build. Otherwise matplotlib fails with an error that it was linked against the wrong numpy version. However, this prevents caching of the wheel which makes the build take much longer. I think this means either the test against old numpy versions, or the matplotlib doctests need to go. EDIT: Nevermind. pip doesn't order installations by dependency, so specifying numpy before matplotlib manually fixed it. |
|
Everything is passing now, but the caching on appveyor seems to be broken. It's working on my own CI environment, just not the PyWavelets one. EDIT: According to http://help.appveyor.com/discussions/problems/4048-build-cache-not-restored build caches are not kept on PR builds (but PR builds will use a cache from master). |
908a1b0 to
255974f
Compare
|
@grlee77 I've been using This is admittedly less nice than it being contained in I've sort of got out of tree tests working: This requires including the It also doesn't seem to play nicely with doctest or coverage, but in-tree builds seem to be the norm for python testing as far as I can tell. |
|
Removal of |
Yes. Tests pass now for installed I don't quite see why you'd need the |
Do you mean setuptools and
No, but it should be straightforward to fix: http://docs.cython.org/src/reference/compilation.html#distributing-cython-modules
Cython.cythonize does this internally. It also picks up if the installed version of Cython has changed and rebuilds (just noticed this now, neat).
If I'm in the working directory (next to |
|
The fact that tests were passing without the data files is a problem. Let me know if anybody has a solution. On that note, it should be possible to trigger CI on tags right? So the sdist build, test and upload can be done in an automated fashion? |
|
CI now fails without the data files: https://travis-ci.org/kwohlfahrt/pywt/builds/113160773, as does tox. |
73ef296 to
a1dfc5b
Compare
|
@kwohlfahrt It has been a while since I looked at this, but I see you added the ability to install without Cython present. I checked out this branch and verified that a local development installation via Is there anything else still in progress here or do you think it is ready? |
|
Been a while since I have looked as well, but I think I left it fine. It also lets us merge my other PR for code coverage (yay!) after a rebase. |
|
It's been a while, I'll have a look now. |
util/appveyor/build.cmd
Outdated
There was a problem hiding this comment.
This link doesn't work, I think it's https://github.com/cython/cython/wiki/CythonExtensionsOnWindows.
There was a problem hiding this comment.
Those instructions look outdated, in particular they are missing that the MSVC version to build Python 3.5 changed. The link above the table does use MSVC Express instead of the GRMSDKK.. thing. So I'm not sure that the simplifications below are OK.
There was a problem hiding this comment.
Found my source! Really should have linked this instead, either I copy/pasted the wrong thing or that used to be in the article at the link too - https://packaging.python.org/appveyor/
At the bottom. Will update the link if you're happy with the current solution?
There was a problem hiding this comment.
Nice, wasn't aware of those docs. I see now that Python 3.5 doesn't use that same SDK, switched via DISTUTILS_USE_SDK. So looks good to me.
|
With the doctesting added, a missing |
Cache pip install on travis-ci as well.
According to the article linked in the header, python3.3 and 3.4 need a special flag to make sure the build environment is set up correctly. This works together with util/appveyor/build.cmd.
This makes the build process a little more consistent (same packages updated and installed on both platforms). Also removes the dependency of the appveyor cache on appveyor.yml, which was preventing me from properly testing it. Caching on Travis doesn't seem to be working, but we'll see if this helps.
Numpy build was failing, this might be the reason.
This commit enables doctests and coverage reports. Also fixes the absurdly long logs (nosetests is more compact than test). Note matplotlib is required for data/_readers.py, use a non-interactive backend for travis.
Update tox.ini to install matplotlib for new doctests, and don't change out of source directory. Coverage isn't quite right, it includes lots of other modules not part of pywt (dateutil, etc)
No longer used.
Apparently setup.py nosetests already specifies --where, so using that gives a warning that it'll be deprecated in future. Use ignore-files instead. Install coverage on appveyor.
Shape returns e.g. (512L, 512L) on python2 appveyor. Check for equality instead.
Other packages (notably matplotlib) link against numpy, so they must be installed in the correct order.
Don't specify a numpy version so pip doesn't insist on upgrading it with pywt. Cython is treated as a compiler and not required after distribution, so don't require it.
This allows the import of Cython to fail, and attempts to use pre-built C sources if it does.
Tests before didn't pick up problems with the distribution (e.g. missing data files) that were present in the source tree. This should be fixed in CI now, developers should probably use: ./setup.py build nosetests build/lib.xyz/ --tests pywt/tests
nosetests wasn't added to $PATH on windows, so specify full location.
Old link was broken/the wrong link in the first place.
|
I propose to keep it simple for now and document that matplotlib is needed to run all tests. Then we can get this PR merged. For reference, this is what scipy does: https://github.com/scipy/scipy/blob/master/tools/refguide_check.py. It checks that docstrings run, but doesn't actually do the full doctesting. That allows skipping tests (possibly conditionally), not having to add doctest markup crap, etc. Doctests really aren't usable on a larger project, too many limitations. |
|
Can we use |
This is only used when you do
That makes two of us:) |
|
OK, updated. Feel free to merge (and then pull in #181 as well). |
|
Merging. Thanks Kai! |
This removes the last of the
.srctemplating. This means we no longer need to use numpy's distutils, which somewhat simplifies the CI process, especially on windows. This replaces #159 and closes #160.The first build takes ~20 minutes (numpy is built from source), but afterwards the wheels are cached and subsequent builds take <2 minutes.
The main disadvantage at the moment is it requires Cython and numpy to be installed before running
setup.py. There are numerous work-arounds including custombuild_extclasses so this shouldn't be a deal-breaker.TODO:
runtests.py --doctestsandruntests.pyboth run 992 tests on master, so it doesn't seem to be working there either