Skip to content

Commit

Permalink
Deprecate encore (#4737)
Browse files Browse the repository at this point in the history
* Deprecate encore for removal in 3.0
  • Loading branch information
fiona-naughton authored Oct 19, 2024
1 parent caa04ec commit 05876f2
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ Changes
numpy.testing.assert_allclose #4438)

Deprecations
* The MDAnalysis.anaylsis.encore module has been deprecated in favour of the
mdaencore MDAKit and will be removed in version 3.0.0 (PR #4737)
* The MMTF Reader is deprecated and will be removed in version 3.0
as the MMTF format is no longer supported (Issue #4634)
* The MDAnalysis.analysis.waterdynamics module has been deprecated in favour
Expand Down
8 changes: 8 additions & 0 deletions package/MDAnalysis/analysis/encore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@

__all__ = ['covariance', 'similarity', 'confdistmatrix', 'clustering']

import warnings

wmsg = ("Deprecation in version 2.8.0\n"
"MDAnalysis.analysis.encore is deprecated in favour of the "
"MDAKit mdaencore (https://www.mdanalysis.org/mdaencore/) "
"and will be removed in MDAnalysis version 3.0.0.")
warnings.warn(wmsg, category=DeprecationWarning)

from ...due import due, Doi

due.cite(Doi("10.1371/journal.pcbi.1004415"),
Expand Down
5 changes: 5 additions & 0 deletions package/MDAnalysis/analysis/encore/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
"""
import numpy as np
import logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
"""
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
"""
import numpy as np
import warnings
Expand Down
5 changes: 5 additions & 0 deletions package/MDAnalysis/analysis/encore/clustering/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
"""
import numpy as np
from ..utils import ParallelCalculation, merge_universes
Expand Down
5 changes: 5 additions & 0 deletions package/MDAnalysis/analysis/encore/confdistmatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ class to compute an RMSD matrix in such a way is also available.
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
"""
from joblib import Parallel, delayed
import numpy as np
Expand Down
6 changes: 6 additions & 0 deletions package/MDAnalysis/analysis/encore/covariance.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
:Author: Matteo Tiberti, Wouter Boomsma, Tone Bengtsen
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
"""
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
"""
import logging
import warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
"""
import numpy as np
from ..confdistmatrix import get_distance_matrix
Expand Down
5 changes: 5 additions & 0 deletions package/MDAnalysis/analysis/encore/similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
.. versionadded:: 0.16.0
.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.
The module contains implementations of similarity measures between protein
ensembles described in :footcite:p:`LindorffLarsen2009`. The implementation and
examples are described in :footcite:p:`Tiberti2015`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

.. versionadded:: 0.16.0


.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

The module contains implementations of similarity measures between protein
ensembles described in :footcite:p:`LindorffLarsen2009`. The implementation and examples
are described in :footcite:p:`Tiberti2015`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Utility functions for ENCORE
==============================

.. deprecated:: 2.8.0
This module is deprecated in favour of the
MDAKit `mdaencore <https://mdanalysis.org/mdaencore/>`_ and will be removed
in MDAnalysis 3.0.0.

.. automodule:: MDAnalysis.analysis.encore.utils
:members:

Expand Down
6 changes: 6 additions & 0 deletions testsuite/MDAnalysisTests/analysis/test_encore.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import os
import warnings
import platform
from importlib import reload

import pytest
from numpy.testing import assert_equal, assert_allclose
Expand All @@ -46,6 +47,11 @@ def function(x):
return x**2


def test_moved_to_mdakit_warning():
wmsg = "MDAnalysis.analysis.encore is deprecated"
with pytest.warns(DeprecationWarning, match=wmsg):
reload(encore)

class TestEncore(object):
@pytest.fixture(scope='class')
def ens1_template(self):
Expand Down

0 comments on commit 05876f2

Please sign in to comment.