signalling-games-org / evoke

A Python package for evolutionary signalling games
https://evoke.readthedocs.io/en/latest/
GNU General Public License v3.0
0 stars 1 forks source link

Optional imports #52

Closed manolomartinez closed 6 months ago

manolomartinez commented 10 months ago

We should perhaps decide which external libraries are non-optional (numpy, matplotlib, scipy, I think) and which ones are optional. For the optional ones we should do something like:

try:
    import optional_lib
    optional_lib_exists = True
except ModuleNotFoundError:
    optional_lib_exists = False

We would then check for that flag wherever the optional import would be used. I reckon gambit, ternary, and perhaps others should be optional.

stephenfmann commented 9 months ago

pygambit is now an optional import. Trying to run a function that requires it will trigger an error message telling the user to install pygambit version 16.1.0 or above.

manolomartinez commented 6 months ago

So this is now done, right?

stephenfmann commented 6 months ago

For pygambit yes, so this can be closed.