Files
crankshaft/src/py
dependabot[bot] cfb19c01aa Bump numpy from 1.11.0 to 1.22.0 in /src/py/crankshaft
Bumps [numpy](https://github.com/numpy/numpy) from 1.11.0 to 1.22.0.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst)
- [Commits](https://github.com/numpy/numpy/compare/v1.11.0...v1.22.0)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 21:07:01 +00:00
..
2019-12-19 13:47:15 +01:00

Crankshaft Python Package

...

Run the tests

cd crankshaft
nosetests test/

Notes about Python dependencies

  • This extension is targeted at production databases. Therefore certain restrictions must be assumed about the production environment vs other experimental environments.
  • Every dependency should be:
    • Added to the setup.py file
    • Installed through it
    • Tested, when they have a test suite.
    • Fixed in the requirements.txt

To avoid troublesome compilations/linkings we will use the available system package python-scipy. This package and its dependencies provide numpy 1.6.1 and scipy 0.9.0. To be able to use these versions we cannot PySAL 1.10 or later, so we'll stick to 1.9.1.

apt-get install -y python-scipy

Test the libraries

Test numpy library dependency:
import numpy
numpy.test('full')
Run scipy tests
import scipy
scipy.test('full')
Testing pysal

See [http://pysal.readthedocs.org/en/latest/developers/testing.html]

This will require putting this into dev/lib/python2.7/site-packages/setup.cfg:

[nosetests]
ignore-files=collection
exclude-dir=pysal/contrib

[wheel]
universal=1

And copying some files before executing the tests: (we'll use a temporary directory from where the tests will be executed because some tests expect some files in the current directory). Next must be executed from

cp dev/lib/python2.7/site-packages/pysal/examples/geodanet/* dev/local/lib/python2.7/site-packages/pysal/examples
mkdir -p test_tmp && cd test_tmp && cp ../dev/lib/python2.7/site-packages/pysal/examples/geodanet/* ./

Then, execute the tests with:

import pysal
import nose
nose.runmodule('pysal')