Closed bbrelje closed 1 year ago
I think @lamkina was planning on addressing a similar issue related to silent import errors
Yes I have been working on a fix for this issue. Typically the import error is thrown properly with a descriptive message at the lowest level where it's used, but then as we propogate the import statements up through the layers it gets silenced. My plan is to pass specific error codes that tell downstream import statements when to throw/not throw certain errors.
Description
If a user does not have prefoil installed, importing DVGeometryCST at pygeo init will fail silently and produce a "ImportError: cannot import name 'DVGeometryCST' from 'pygeo'" error message when the module is actually used. This hides the underlying cause, which is that prefoil is not installed. The prefoil dependency is not described, as far as I can tell, anywhere in the docs or installation instructions.
Steps to reproduce issue
Install pygeo 1.12.2 on ubuntu-like system Try to use DVGeometryCST (e.g. from cmplxfoil)
Current behavior
Error message hides reason for import error
Expected behavior
Error message ought to describe the missing dependency Docs ought to describe prefoil depedency
Code versions