Skip to content

Commit

Permalink
Merge pull request #86 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Bugfix: error if OpenEye not available
  • Loading branch information
seamm authored Nov 24, 2024
2 parents 4f18522 + 5e38fc4 commit e99691c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
=======
History
=======
2024.11.23 -- Bugfix: error if OpenEye not available
* Fixed an issue with the import of OpenEye that caused an error if OpenEye was not
available.

2024.11.21.1 -- Versions of openbabel, openeye, and rdkit
* Added functions to get the versions of openbabel, openeye, and rdkit that are
installed.
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ format: ## reformat with with yapf and isort
black --extend-exclude '_version.py' $(MODULE) tests

test: ## run tests quickly with the default Python
pytest --disable-warnings -rP --openeye tests/
# pytest --disable-warnings -rP --openeye tests/
pytest --disable-warnings -rP tests/

coverage: ## check code coverage quickly with the default Python
pytest -v --cov=$(MODULE) --cov-report term --color=yes tests/
Expand Down
6 changes: 5 additions & 1 deletion molsystem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
from .cell import Cell # noqa: F401
from .properties import standard_properties, add_properties_from_file # noqa: F401
from .openbabel import openbabel_version # noqa: F401
from .openeye import openeye_version # noqa: F401

try:
from .openeye import openeye_version # noqa: F401
except ImportError:
pass
from .rdkit_ import rdkit_version # noqa: F401


Expand Down
2 changes: 1 addition & 1 deletion molsystem/openeye.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

try:
from openeye import oechem
except ModuleNotFoundError:
except ImportError:
oechem_available = False
oechem_licensed = False
else:
Expand Down
4 changes: 2 additions & 2 deletions molsystem/smiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

try:
from openeye import oechem
except ModuleNotFoundError:
except ImportError:
oechem_available = False
oechem_licensed = False
else:
Expand All @@ -15,7 +15,7 @@

try:
from openeye import oeomega
except ModuleNotFoundError:
except ImportError:
oeomega_available = False
oeomega_licensed = False
else:
Expand Down

0 comments on commit e99691c

Please sign in to comment.