pyoptsparse
pyoptsparse copied to clipboard
Provide decorators for skipping code if an optimizer is not available
Description
Dymos recently added a decorator in openmdao/dymos#570, which may be something we want to implement in pyOptSparse natively also. This could be useful for:
- skipTest in pyOptSparse tests
- test scripts in other repos (e.g. MACH-Aero, pygeo)
May be related to #187.
Feel free to take as much of our implementation as you want.
Has this been addressed to the extent we wanted?
Not quite, but it's close. Right now we can check the availability of top-level packages with the decorator in baseclasses, but not submodules, e.g. pySNOPT
. The intent here is to check specifically for the optimizers, which in most cases involves checking the compiled library, e.g. snopt.so
.