mdanalysis
mdanalysis copied to clipboard
Make networkx an optional dep?
Networkx is solely used by a single analysis module (leaflet.py). It may make sense to make this an optional dependency?
Sure.
By now we seem to have settled on a typical pattern for dealing with optional packages: flag availability with HAS_PACKAGE from a try/except ImportError, raise exception inside function/class if not available. Guard tests.
Yes.
On Fri, Sep 16, 2022 at 00:18, Oliver Beckstein @.***> wrote:
Sure.
By now we seem to have settled on a typical pattern for dealing with optional packages: flag availability with HAS_PACKAGE from a try/except ImportError, raise exception inside function/class if not available. Guard tests.
— Reply to this email directly, view it on GitHub https://github.com/MDAnalysis/mdanalysis/issues/3822#issuecomment-1248739769, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGSGB7VPBMKLH7YRE5LWT3V6OVFBANCNFSM6AAAAAAQIVGZLM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Sure.
By now we seem to have settled on a typical pattern for dealing with optional packages: flag availability with HAS_PACKAGE from a try/except ImportError, raise exception inside function/class if not available. Guard tests.
Should we make this official policy in Docs / Userguide/ wiki?
Mmm I don't know just yet, there was plan with some OMSF folks to move this to a separate package that uses importlib creatively. Not sure where that got.
We should have a written policy on optional packages. I'll put a note on agenda for the next meeting.