SINTEF / Splipy

Spline modelling made easy.
GNU General Public License v3.0
100 stars 18 forks source link

Update dependency versions #54

Closed VikingScientist closed 6 years ago

VikingScientist commented 6 years ago

There was some trouble with numpy and nutils versions.

Come to think of it now, then we already support different incompatible versions of libraries (i.e. openCV supports both version 2 and 3, see splipy/utils/image.py). We could do similar structures for the numpy and nutils libraries as well, but it seems a bit annoying to maintain. I don't know if it too much to ask that the users have the latest versions of libraries installed?

TheBB commented 6 years ago

I don't think it's too much to ask that users have the latest releases of other packages necessarily, especially fringe packages like nutils. Numpy may be a different beast. As a decent rule of thumb, the latest Ubuntu LTS release (which, admittedly, there's a new one due in a couple of months) ships with Numpy 1.11.

If the __repr__ tests are the only problems with 1.14 I'd rather just not have tests for __repr__, or just test for the easily controllable parts, e.g.

self.assert(repr(...).startswith('p=2'))
VikingScientist commented 6 years ago

It is only the print formatting which needs to be addressed, and I agree that this is bad if Ubuntu ships with older versions. I'll see if I can special case the __repr__-tests for newer versions.

Long-term plan is to support the newest version of nutils, but I'm not yet comfortable with the syntax there. Apparently the namespace implementation of integrals should make things more readable, but I'm afraid I have to disagree with this. At least until I have had someone explain the structure thourouly. Currently it all seem like magical undocumented strings combined with some undocumented @-operator.

TheBB commented 6 years ago

It's documented, it's just tricky to find.

TheBB commented 6 years ago

But it is possible to avoid using Namespace altogether and just work with function objects directly as we do now. The biggest problem I think is that library.Hooke is removed.

VikingScientist commented 6 years ago

It is indeed removed and its causing some headache. I've tried using the namespace approach, but having tough luck with that. In an ideal world I would like to support python2 as well, but quite a number of things crash wrt nutils and python2. I wonder if I could use a subset of nutils and still make it run on python2?

I've relaxed the need for new numpy version, so we're back to numpy 1.9 or later; it has been tested on this version as well, which caused me to pick up a failed test.

I will attempt to make it compatible with the newest version of nutils (without using namespace in hopes of python 2-support) after which it is ready for squash and merge. As of now: I'm putting a work-in-progress tag on this.

VikingScientist commented 6 years ago

There! All done now and I've removed the WIP tag so you can have a look at it.