e2nIEE / pandapower

Convenient Power System Modelling and Analysis based on PYPOWER and pandas
https://www.pandapower.org
Other
847 stars 478 forks source link

Missing matplotlib dependency #1212

Open jbarberia opened 3 years ago

jbarberia commented 3 years ago

I clone the repository, set up a fresh virtual environment and ran the tests as follows:

python setup.py install
pytest

I had 3 errors due to missing matplotlib module.

rbolgaryn commented 3 years ago

Hi @jbarberia ,

matplotlib dependency is optional in pandapower, because it is possible that pandapower is used for calculations on a server without a graphical user interface. A better fix would be to add a try..expect block for matplotlib in the files that rely on it, with a logging message for the user.

jbarberia commented 3 years ago

Hello @rbolgaryn ,

Yes there are better ways to fix it. The pull request #1213 was a quick fix.