Fixes a problem whereby numpy had to be installed before the program could be installed. This is fine if OpenQuake is already installed, but it breaks third-party installations like eGSIM, making their installation still feasible but cumbersome.
What happens is that setup.py needs numpy because smtk/__init__.py implements a load_database function. After inspection, that function:
has no essential rationale to be imported during installation (from smtk import load_database is handy, not essential)
regardless of this issue, it really looks like being in the wrong place now, in account of the fact that it refers to only one of the two "databases" implemented in smtk
This PR then moves load_database into the sm_database module, removes unnecessary imports in smtk/__init__.py (avoiding numpy import), and fixed tests
Fixes a problem whereby
numpy
had to be installed before the program could be installed. This is fine if OpenQuake is already installed, but it breaks third-party installations like eGSIM, making their installation still feasible but cumbersome.What happens is that
setup.py
needsnumpy
becausesmtk/__init__.py
implements aload_database
function. After inspection, that function:from smtk import load_database
is handy, not essential)smtk
This PR then moves
load_database
into thesm_database
module, removes unnecessary imports insmtk/__init__.py
(avoidingnumpy
import), and fixed tests