Skip to content

Commit

Permalink
Move optimade dependency as extra dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Feb 2, 2024
1 parent 2e9523d commit 83b2327
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion aiidalab_widgets_base/databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,17 @@ def __init__(
title: str = None,
**kwargs,
) -> None:
from optimade_client import default_parameters, query_filter, query_provider
try:
from optimade_client import default_parameters, query_filter, query_provider
except ImportError:
super().__init__(
[
ipw.HTML(
"This widget requires the `optimade-client` package to be installed."
)
]
)
return

providers_header = ipw.HTML("<h4>Select a provider</h4>")
providers = query_provider.OptimadeQueryProviderWidget(
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ install_requires =
more-itertools~=8.0
pymysql~=0.9
nglview~=3.0
optimade-client==2022.9.19
spglib>=1.14,<3
vapory~=0.1.2
python_requires = >=3.8
Expand All @@ -56,6 +55,8 @@ dev =
pytest-timeout~=2.2
selenium~=4.7.0
webdriver-manager~=3.8
optimade =
optimade-client==2022.9.19
smiles =
rdkit>=2021.09.2
scikit-learn~=1.0.0
Expand Down

0 comments on commit 83b2327

Please sign in to comment.