Skip to content

Commit

Permalink
Fix optional import of pandapower (#879)
Browse files Browse the repository at this point in the history
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
  • Loading branch information
HugoKulesza authored Oct 29, 2024
1 parent 6923825 commit 52cb608
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pypowsybl/network/impl/pandapower_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
import numpy as np
import pandas as pd
import pypowsybl._pypowsybl as _pp
from pandapower import pandapowerNet
from pandas import Series
from pandas import DataFrame
try:
from pandapower import pandapowerNet
except ImportError:
pandapowerNet = any

from .network import Network
from .network_creation_util import create_empty
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install_requires =
networkx

[options.extras_require]
extra =
pandapower =
pandapower>=2.4.11

[options.package_data]
Expand Down

0 comments on commit 52cb608

Please sign in to comment.