Modernizing the use of ndarray in pybind11 wrappers is trivial:
1) Remove #include "numpy/arrayobject.h" (and any other numpy header files)
2) Remove the following:
if (_import_array() < 0) {
|
PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import");
|
return nullptr;
|
}
|
I don't know where it's written down (Jim Bosch might know). However, it works, it makes warnings about using an outdated numpy API go away, and Jenkins is happy. I've done it to many packages now.
For travis, we have a standard .travis.yml file we add to a repo. It is described here:
https://developer.lsst.io/stack/adding-a-new-package.html?highlight=travis#configuring-github-repositories
Fortunately it needs to changes per repo.
The other step in enabling automatic pep8 checking with flake8 is to add a setup.cfg file. That one needs a few special exclusions if the package contains tasks (as meas_algorithms does), since tasks have those Doxygen ## blocks that flake8 hates. I'm not sure where the official docs are.
Lauren MacArthur do you have time to look at this? It's a set of small changes on two packages. It may be a bit easier to review them commit by commit (since so much of it is automated and trivial), but please do it however you like.