WestHealth / pyvis

Python package for creating and visualizing interactive network graphs.
http://pyvis.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
940 stars 162 forks source link

Make notebook argument in Network.show default to False #274

Open adamcallison opened 3 months ago

adamcallison commented 3 months ago

Currently, the pytest tests fail, due to Network.show being called on Network instances that were initialised with notebook=False, meaning that Network.prep_notebook wasn't called and self.template remains as None. As Network.show's notebook argument defaults to True, it by default attempts to call self.template.render' and errors becauseNone` doesn't have this method.

This PR changes show to default to notebook=False, which follows the pattern used in other methods. The pytest tests now pass.

If notebook=True really is the desired default for show, an alternative is to explicitly set notebook=False in the tests.