Skip to content

Commit

Permalink
Fix #4687 -- rdkit values in azure CI (#4688)
Browse files Browse the repository at this point in the history
* Investigate rdkit issue

* Update azure-pipelines.yml

* fix numpy 2.0 import block

* fix imports
  • Loading branch information
IAlibay committed Aug 25, 2024
1 parent 326698d commit 94b1b79
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
displayName: 'pin to older NumPy (wheel test)'
condition: and(succeeded(), ne(variables['NUMPY_MIN'], ''))
- script: >-
python -m pip install
python -m pip install -vvv
biopython
"chemfiles>=0.10,<0.10.4"
duecredit
Expand All @@ -112,8 +112,8 @@ jobs:
networkx
parmed
pytng>=0.2.3
tidynamics>=1.0.0
rdkit>=2020.03.1
tidynamics>=1.0.0
displayName: 'Install additional dependencies for 64-bit tests'
condition: and(succeeded(), eq(variables['PYTHON_ARCH'], 'x64'))
- script: >-
Expand Down
10 changes: 2 additions & 8 deletions package/MDAnalysis/converters/RDKit.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
from io import StringIO

import numpy as np
from numpy.lib import NumpyVersion

from . import base
from ..coordinates import memory
Expand All @@ -96,13 +95,8 @@
from ..exceptions import NoDataError

try:
# TODO: remove this guard when RDKit has a release
# that supports NumPy 2
if NumpyVersion(np.__version__) < "2.0.0":
from rdkit import Chem
from rdkit.Chem import AllChem
else:
raise ImportError
from rdkit import Chem
from rdkit.Chem import AllChem
except ImportError:
pass
else:
Expand Down
2 changes: 1 addition & 1 deletion testsuite/MDAnalysisTests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def import_not_available(module_name):
# TODO: remove once these packages have a release
# with NumPy 2 support
if NumpyVersion(np.__version__) >= "2.0.0":
if module_name in {"rdkit", "parmed"}:
if module_name == "parmed":
return True
try:
test = importlib.import_module(module_name)
Expand Down

0 comments on commit 94b1b79

Please sign in to comment.