mdolab / pygeo

pyGeo provides geometric design variables and constraints suitable for gradient-based optimization.
https://mdolab-pygeo.readthedocs-hosted.com/en/latest/?badge=latest
Apache License 2.0
124 stars 55 forks source link

Prefoil dependency #147

Closed sseraj closed 2 years ago

sseraj commented 2 years ago

Description

141 added a hard prefoil dependency but setup.py was not updated to account for this. All tests that import pyGeo fail if you do not also have prefoil installed (which includes some ADflow tests).

At the very least, prefoil should be added in install_requires. However, I don't see much use in making everyone who wants to use pyGeo install prefoil. I would prefer if DVGeometryCST was imported like the other classes that have non-standard dependencies: https://github.com/mdolab/pygeo/blob/d786ca844e8bb2de82de9ec52ebb7d1ddf3504e5/pygeo/__init__.py#L11-L22 Similarly, if DVGeometryCST cannot be imported, we should skip its tests.

We can use this issue to discuss what the best approach is.

eytanadler commented 2 years ago

I'm happy to do the latter where DVGeometryCST is imported using the try/except block. Shall I make a PR with the change and we can discuss from there?

sseraj commented 2 years ago

Sounds good. Thanks!

eytanadler commented 2 years ago

Ok, working on it now. Sorry about the oversight!