Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated hole, and completes py2 removal #2778

Merged
merged 16 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cache:
environment:
global:
CONDA_CHANNELS: conda-forge
CONDA_DEPENDENCIES: pip setuptools wheel cython six biopython networkx joblib matplotlib scipy vs2015_runtime pytest mmtf-python GridDataFormats hypothesis pytest-cov codecov chemfiles tqdm tidynamics>=1.0.0 rdkit
CONDA_DEPENDENCIES: pip setuptools wheel cython biopython networkx joblib matplotlib scipy vs2015_runtime pytest mmtf-python GridDataFormats hypothesis pytest-cov codecov chemfiles tqdm tidynamics>=1.0.0 rdkit
PIP_DEPENDENCIES: gsd==1.9.3 duecredit parmed
DEBUG: "False"
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
- MAIN_CMD="pytest ${PYTEST_LIST}"
- SETUP_CMD="${PYTEST_FLAGS}"
- BUILD_CMD="pip install -e package/ && (cd testsuite/ && python setup.py build)"
- CONDA_MIN_DEPENDENCIES="mmtf-python six biopython networkx cython matplotlib scipy griddataformats hypothesis gsd codecov"
- 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"
- CONDA_CHANNELS='biobuilds conda-forge'
- CONDA_CHANNEL_PRIORITY=True
Expand Down
2 changes: 1 addition & 1 deletion package/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ callbacks=cb_,_cb

# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,future.builtins
redefining-builtins-modules=


[SIMILARITIES]
Expand Down
7 changes: 6 additions & 1 deletion package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ The rules for this file:
* release numbers follow "Semantic Versioning" http://semver.org

------------------------------------------------------------------------------
??/??/?? richardjgowers, IAlibay, hmacdope, orbeckst, cbouy
??/??/?? richardjgowers, IAlibay, hmacdope, orbeckst, cbouy, lilyminium

* 2.0.0

Fixes
* Selections on emtpy AtomGroups now return an empty AtomGroup instead of an
IAlibay marked this conversation as resolved.
Show resolved Hide resolved
error (Issue #2765)
* TOPParser no longer guesses elements when missing atomic number records
(Issues #2449, #2651)
* Testsuite does not any more matplotlib.use('agg') (#2191)
Expand All @@ -32,6 +34,9 @@ Enhancements
* Added computation of Mean Squared Displacements (#2438, PR #2619)

Changes
* Changes development status from Beta to Mature (Issue #2773)
* Removes deprecated MDAnalysis.analysis.hole, please use
MDAnalysis.analysis.hole2.hole instead (Issue #2739)
* Replaces use of mock in favour of unittest.mock (Issue #2777)
* Removes support for passing `atoms` to XYZWriter. (Issue #2739, PR #2754)
* Removes; deprecated support for using Writer.write(Timestep), deprecated
Expand Down
12 changes: 10 additions & 2 deletions package/MDAnalysis/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
:mod:`~MDAnalysis.analysis.helanal`
Analysis of helices with the HELANAL_ algorithm.

:mod:`~MDAnalysis.analysis.hole`
:mod:`~MDAnalysis.analysis.hole2`
Run and process output from the :program:`HOLE` program
to analyze pores, tunnels and cavities in proteins.

Expand All @@ -72,6 +72,10 @@
a bilayer; the algorithm can deal with any deformations as long as
the two leaflets are topologically distinct.

:mod:`~MDAnalysis.analysis.msd`
Implements the calculation of Mean Squared Displacements (MSDs) by the
Einstein relation.

:mod:`~MDAnalysis.analysis.nuclinfo`
Analyse the nucleic acid for the backbone dihedrals, chi, sugar
pucker, and Watson-Crick distance (minor and major groove
Expand Down Expand Up @@ -108,6 +112,9 @@
:mod:`~MDAnalysis.analysis.legacy.x3dna` was moved to the
:mod:`MDAnalysis.analysis.legacy` package

.. versionchanged:: 2.0.0
Adds MSD, and changes hole for hole2.hole.

"""

__all__ = [
Expand All @@ -120,8 +127,9 @@
'hbonds',
'hydrogenbonds',
'helanal',
'hole',
'hole2',
'leaflet',
'msd',
'nuclinfo',
'polymer',
'psa',
Expand Down
10 changes: 3 additions & 7 deletions package/MDAnalysis/analysis/hbonds/hbond_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@ class HydrogenBondAnalysis_OtherFF(HydrogenBondAnalysis):
.. automethod:: _get_bonded_hydrogens_list

"""
from __future__ import division, absolute_import
import six
from six.moves import range, zip

import warnings
import logging
from collections import defaultdict
Expand Down Expand Up @@ -1252,7 +1248,7 @@ def count_by_type(self):

# float because of division later
tsteps = float(len(self.timesteps))
for cursor, (key, count) in enumerate(six.iteritems(hbonds)):
for cursor, (key, count) in enumerate(hbonds.items()):
out[cursor] = key + (count / tsteps,)

# return array as recarray
Expand Down Expand Up @@ -1310,7 +1306,7 @@ def timesteps_by_type(self):

out_nrows = 0
# count number of timesteps per key to get length of output table
for ts_list in six.itervalues(hbonds):
for ts_list in hbonds.values():
out_nrows += len(ts_list)

# build empty output table
Expand All @@ -1322,7 +1318,7 @@ def timesteps_by_type(self):
out = np.empty((out_nrows,), dtype=dtype)

out_row = 0
for (key, times) in six.iteritems(hbonds):
for (key, times) in hbonds.items():
for tstep in times:
out[out_row] = key + (tstep,)
out_row += 1
Expand Down
Loading