libpysal
libpysal copied to clipboard
More thoughtful try/except when import fails
Following #271, and other similar corrupted install issues in the past, it may be an opportune time to rethink the current implementations of @requires, simport, and the various cases to skip geopandas-based functionality during unittests (i.e., libpysal, spaghetti, etc...). The jit decorator may also benefit from a more specific try/except.
See the original comment here
Our
SKIPIFcheck setsgeopandasto not be available onImportError, but does not check the specific message that is thrown. Maybe aModuleNotFoundErrorwould be more appropriate for the unavailability ofgeopandas, whereImportErroris reserved for an actual problem with the install?