Skip to content

Commit

Permalink
Fix for h5py 3.0 (#3025)
Browse files Browse the repository at this point in the history
* Fixes #3023 
* fix h5py format failure after version 3.0 (now supports 2.0 and 3.0)
* unpin h5py version on conda (use latest available)
* pin h5py only binary on Azure
  • Loading branch information
yuxuanzhuang authored Apr 6, 2021
1 parent 7618445 commit 10fede2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .disabled-travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ env:
- SETUP_CMD="${PYTEST_FLAGS}"
- BUILD_CMD="pip install -e package/ && (cd testsuite/ && python setup.py build)"
- CONDA_MIN_DEPENDENCIES="mmtf-python biopython networkx cython matplotlib scipy griddataformats hypothesis gsd codecov"
- CONDA_DEPENDENCIES="${CONDA_MIN_DEPENDENCIES} seaborn>=0.7.0 clustalw=2.1 netcdf4 scikit-learn joblib>=0.12 chemfiles tqdm>=4.43.0 tidynamics>=1.0.0 rdkit>=2020.03.1 h5py==2.10.0"
- CONDA_DEPENDENCIES="${CONDA_MIN_DEPENDENCIES} seaborn>=0.7.0 clustalw=2.1 netcdf4 scikit-learn joblib>=0.12 chemfiles tqdm>=4.43.0 tidynamics>=1.0.0 rdkit>=2020.03.1 h5py"
- CONDA_CHANNELS='biobuilds conda-forge'
- CONDA_CHANNEL_PRIORITY=True
- PIP_DEPENDENCIES="duecredit parmed"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defaults:

env:
MDA_CONDA_MIN_DEPS: "pip pytest==6.1.2 mmtf-python biopython networkx cython matplotlib-base scipy griddataformats hypothesis gsd codecov"
MDA_CONDA_EXTRA_DEPS: "seaborn>=0.7.0 clustalw=2.1 netcdf4 scikit-learn joblib>=0.12 chemfiles tqdm>=4.43.0 tidynamics>=1.0.0 rdkit>=2020.03.1 h5py==2.10.0"
MDA_CONDA_EXTRA_DEPS: "seaborn>=0.7.0 clustalw=2.1 netcdf4 scikit-learn joblib>=0.12 chemfiles tqdm>=4.43.0 tidynamics>=1.0.0 rdkit>=2020.03.1 h5py"
MDA_PIP_MIN_DEPS: 'coveralls coverage<5 pytest-cov pytest-xdist'
MDA_PIP_EXTRA_DEPS: 'duecredit parmed'

Expand Down
5 changes: 2 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- script: python -m pip install --upgrade pip setuptools wheel
displayName: 'Install tools'
- script: >-
python -m pip install
python -m pip install --only-binary=h5py
cython
hypothesis
matplotlib
Expand All @@ -54,11 +54,10 @@ jobs:
pytest-xdist
scikit-learn
scipy
h5py==2.10.0
h5py
tqdm
displayName: 'Install dependencies'
# TODO: recent rdkit is not on PyPI
# NOTE: h5py pinned because of gh-3019
- script: >-
python -m pip install
biopython
Expand Down
4 changes: 2 additions & 2 deletions maintainer/conda/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- cython
- griddataformats
- gsd
- h5py==2.10.0
- h5py
- hypothesis
- joblib>=0.12
- matplotlib==3.2.2
Expand All @@ -31,4 +31,4 @@ dependencies:
- duecredit
- parmed
- msmb_theme==1.2.0
- sphinx-sitemap==1.0.2
- sphinx-sitemap==1.0.2
2 changes: 1 addition & 1 deletion package/MDAnalysis/coordinates/H5MD.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def _read_frame(self, frame):
else:
raise NoDataError("Provide at least a position, velocity"
" or force group in the h5md file.")
except ValueError:
except (ValueError, IndexError):
raise IOError from None

self._frame = frame
Expand Down

0 comments on commit 10fede2

Please sign in to comment.