Skip to content
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
18 changes: 1 addition & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
- GIT_CI_EMAIL=TravisCI@mdanalysis.org
- MDA_DOCDIR=${TRAVIS_BUILD_DIR}/package/doc/html/html
# Set default python version to avoid repetition later
- PYTHON_VERSION=3.5
- PYTHON_VERSION=3.6
- BUILD_DOCS=false
- CODECOV=false
- PYTEST_FLAGS="--disable-pytest-warnings --durations=50"
Expand All @@ -41,7 +41,6 @@ env:
- CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=3.8 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=3.7 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- PYTHON_VERSION=3.6 CODECOV="true" SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
- NUMPY_VERSION=1.13.3
- NUMPY_VERSION=dev EVENT_TYPE="cron"

Expand All @@ -65,13 +64,6 @@ matrix:
CONDA_DEPENDENCIES=""
INSTALL_HOLE="false"

- env: NAME="python 2.7"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't remember the exact issue but I think we said we would drop 3.5 too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was this one: #2541 (comment)

Copy link
Member

@lilyminium lilyminium Jun 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought dropping py2.7 and py3.5 would be a 2.0 thing, and that 1.xx releases would be just bug fixes, based on that same comment?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinging @orbeckst here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like everyone else is moving on, I'd like to just ditch python 2. If we find anything nasty that we fix I could do a backport/LTS thing, but I'd rather just force everyone to move to py 3, anaconda makes this possible enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was about to tag that comment! ;) I think this discussion is suited for the dev list, but if major packages are already dropping support for 3.5 (see #2541 (comment)) probably we should drop it too.

Copy link
Member

@RMeli RMeli Jun 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought dropping py2.7 and py3.5 would be a 2.0 thing, and that 1.xx releases would be just bug fixes, based on that same comment?

My view here (probably to be discussed on the dev list) is that it would be nice to increase the number of releases to include small bug fixes. The reason is that many issues are solved relatively quickly, but make it on master after a very long time (and therefore most users don't benefit from them).

For this reason, I think we should start dropping Python 2 and 3.5 support with 1.0.x releases (as done here) and tidy up the code as much as possible on the way to 2.0 (possibly with type hints, and other cool stuff).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In https://www.mdanalysis.org/2019/11/06/roadmap/ we said 1.x will be the last version of MDAnalysis that fully supports Python 2.7

This means that 1.x supports and tests 2.7 so we cannot remove Python 2.7 tests. Drop it for 2.0.

I'll start a discussion on the dev list instead of an issue thread...

PYTHON_VERSION=2.7
CODECOV="true"
NUMPY_VERSION=1.16
SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"
PIP_DEPENDENCIES="${PIP_DEPENDENCIES} setuptools<45.0.0"

- env: NAME="asv check"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that ASV is currently running under 2.7 so we need an issue updating that to 3.x

PYTHON_VERSION=2.7
CODECOV="false"
Expand All @@ -85,14 +77,6 @@ matrix:
env: PYTHON_VERSION=3.6
NUMPY_VERSION=1.17.3

# macOS Python 2.7 works in principle but times out on Travis CI:
# Disabled so that the tests can pass.
# - os: osx
# env: PYTHON_VERSION=2.7
# NUMPY_VERSION=1.16
# CODECOV="true"
# SETUP_CMD="${PYTEST_FLAGS} --cov=MDAnalysis"

- env: NAME='minimal'
PIP_DEPENDENCIES=""
CONDA_DEPENDENCIES=${CONDA_MIN_DEPENDENCIES}
Expand Down
16 changes: 14 additions & 2 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,26 @@ The rules for this file:
* release numbers follow "Semantic Versioning" http://semver.org

------------------------------------------------------------------------------
mm/dd/yy richardjgowers, kain88-de, lilyminium, p-j-smith, bdice, joaomcteixeira,
??/??/?? richardjgowers

* 2.0.0

Fixes

Enhancements

Deprecations
* Dropped Python 2 support


06/09/20 richardjgowers, kain88-de, lilyminium, p-j-smith, bdice, joaomcteixeira,
PicoCentauri, davidercruz, jbarnoud, RMeli, IAlibay, mtiberti, CCook96,
Yuan-Yu, xiki-tempula, HTian1997, Iv-Hristov, hmacdope, AnshulAngaria,
ss62171, Luthaf, yuxuanzhuang, abhishandy, mlnance, shfrz, orbeckst,
wvandertoorn, cbouy, AmeyaHarmalkar, Oscuro-Phoenix, andrrizzi, WG150,
tylerjereddy, Marcello-Sega

* 0.21.0
* 1.0.0

Fixes
* MOL2Writer now accepts both Universes and AtomgGroups (Issue #2717)
Expand Down
4 changes: 2 additions & 2 deletions package/MDAnalysis/analysis/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def alignto(mobile, reference, select=None, weights=None,
.. _ClustalW: http://www.clustal.org/
.. _STAMP: http://www.compbio.dundee.ac.uk/manuals/stamp.4.2/

.. versionchanged:: 0.21.0
.. versionchanged:: 1.0.0
Added *match_atoms* keyword to toggle atom matching.

.. versionchanged:: 0.8
Expand Down Expand Up @@ -803,7 +803,7 @@ def __init__(self, mobile, reference=None, select='all', filename=None,
already a :class:`MemoryReader` then it is *always* treated as if
``in_memory`` had been set to ``True``.

.. versionadded:: 0.21.0
.. versionadded:: 1.0.0

.. versionchanged:: 1.0.0
Support for the ``start``, ``stop``, and ``step`` keywords has been
Expand Down
4 changes: 1 addition & 3 deletions package/MDAnalysis/analysis/gnm.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,8 @@ class closeContactGNMAnalysis(GNMAnalysis):
.. deprecated:: 0.16.0
Instead of ``MassWeight=True`` use ``weights="size"``.

.. versionchanged:: 0.21.0
MassWeight option (see above deprecation entry).

.. versionchanged:: 1.0.0
MassWeight option (see above deprecation entry).
Changed `selection` keyword to `select`
"""

Expand Down
4 changes: 1 addition & 3 deletions package/MDAnalysis/analysis/hbonds/hbond_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,8 @@ class HydrogenBondAnalysis(base.AnalysisBase):
DEFAULT_DONORS/ACCEPTORS is now embedded in a dict to switch between
default values for different force fields.

.. versionchanged:: 0.21.0
Added autocorrelation (MDAnalysis.lib.correlations.py) for calculating hydrogen bond lifetime

.. versionchanged:: 1.0.0
Added autocorrelation (MDAnalysis.lib.correlations.py) for calculating hydrogen bond lifetime
``save_table()`` method has been removed. You can use ``np.save()`` or
``cPickle.dump()`` on :attr:`HydrogenBondAnalysis.table` instead.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
:Year: 2019
:Copyright: GNU Public License v3

.. versionadded:: 0.21.0
.. versionadded:: 1.0.0

This module provides methods to find and analyse hydrogen bonds in a Universe.

Expand Down
4 changes: 2 additions & 2 deletions package/MDAnalysis/analysis/psa.py
Original file line number Diff line number Diff line change
Expand Up @@ -1680,7 +1680,7 @@ def plot(self, filename=None, linkage='ward', count_sort=False,
dist_matrix_clus
clustered distance matrix (reordered)

.. versionchanged:: 0.21.0
.. versionchanged:: 1.0.0
:attr:`tick1On`, :attr:`tick2On`, :attr:`label1On` and :attr:`label2On`
changed to :attr:`tick1line`, :attr:`tick2line`, :attr:`label1` and
:attr:`label2` due to upstream deprecation (see #2493)
Expand Down Expand Up @@ -1807,7 +1807,7 @@ def plot_annotated_heatmap(self, filename=None, linkage='ward', \

.. _seaborn: https://seaborn.pydata.org/

.. versionchanged:: 0.21.0
.. versionchanged:: 1.0.0
:attr:`tick1On`, :attr:`tick2On`, :attr:`label1On` and :attr:`label2On`
changed to :attr:`tick1line`, :attr:`tick2line`, :attr:`label1` and
:attr:`label2` due to upstream deprecation (see #2493)
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/coordinates/XDR.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class XDRBaseReader(base.ReaderBase):
Reader. However, the next time the trajectory is opened, the offsets will
have to be rebuilt again.

.. versionchanged:: 0.21.0
.. versionchanged:: 1.0.0
XDR offsets read from trajectory if offsets file read-in fails

"""
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/coordinates/XYZ.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class XYZWriter(base.WriterBase):
.. _xyzplugin:
http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/xyzplugin.html

.. versionchanged: 0.21.0
.. versionchanged: 1.0.0
Use elements attribute instead of names attribute, if present
"""

Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/core/_get_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def get_converter_for(format):
If no appropriate parser could be found.


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
try:
writer = _CONVERTERS[format]
Expand Down
12 changes: 6 additions & 6 deletions package/MDAnalysis/core/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ def center(self, weights, pbc=False, compound='group', unwrap=False):
.. versionchanged:: 0.20.0 Added ``'molecules'`` and ``'fragments'``
compounds
.. versionchanged:: 0.20.0 Added `unwrap` parameter
.. versionchanged:: 0.21.0 Removed flags affecting default behaviour
.. versionchanged:: 1.0.0 Removed flags affecting default behaviour
"""
atoms = self.atoms

Expand Down Expand Up @@ -933,7 +933,7 @@ def center_of_geometry(self, pbc=False, compound='group', unwrap=False):
.. versionchanged:: 0.20.0 Added ``'molecules'`` and ``'fragments'``
compounds
.. versionchanged:: 0.20.0 Added `unwrap` parameter
.. versionchanged:: 0.21.0 Removed flags affecting default behaviour
.. versionchanged:: 1.0.0 Removed flags affecting default behaviour
"""
return self.center(None, pbc=pbc, compound=compound, unwrap=unwrap)

Expand Down Expand Up @@ -1107,7 +1107,7 @@ def bbox(self, pbc=False):

.. versionadded:: 0.7.2
.. versionchanged:: 0.8 Added *pbc* keyword
.. versionchanged:: 0.21.0 Removed flags affecting default behaviour
.. versionchanged:: 1.0.0 Removed flags affecting default behaviour
"""
atomgroup = self.atoms

Expand Down Expand Up @@ -3043,7 +3043,7 @@ def ureybradley(self):
If the :class:`AtomGroup` is not length 2


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
if len(self) != 2:
raise ValueError(
Expand All @@ -3061,7 +3061,7 @@ def cmap(self):
If the :class:`AtomGroup` is not length 5


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
if len(self) != 5:
raise ValueError(
Expand Down Expand Up @@ -3104,7 +3104,7 @@ def convert_to(self, package):
No converter was found for the required package


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
converter = get_converter_for(package)
return converter().convert(self.atoms)
Expand Down
10 changes: 5 additions & 5 deletions package/MDAnalysis/core/topologyattrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,7 @@ def _check_connection_values(func):
- coerces them to tuples of ints (for hashing)
- ensures that first value is less than last (reversibility & hashing)

.. versionadded:: 0.21.0
.. versionadded:: 1.0.0

"""
@functools.wraps(func)
Expand All @@ -1955,7 +1955,7 @@ def wrapper(self, values, *args, **kwargs):
class _Connection(AtomAttr):
"""Base class for connectivity between atoms

.. versionchanged:: 0.21.0
.. versionchanged:: 1.0.0
Added type checking to atom index values.
"""

Expand Down Expand Up @@ -2044,7 +2044,7 @@ def _add_bonds(self, values, types=None, guessed=True, order=None):
@_check_connection_values
def _delete_bonds(self, values):
"""
.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""

to_check = set(values)
Expand Down Expand Up @@ -2231,7 +2231,7 @@ class UreyBradleys(_Connection):

These indices refer to the atom indices.

.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
attrname = 'ureybradleys'
singular = 'ureybradleys'
Expand Down Expand Up @@ -2272,7 +2272,7 @@ class Impropers(_Connection):
class CMaps(_Connection):
"""
A connection between five atoms
.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
attrname = 'cmaps'
singular = 'cmaps'
Expand Down
6 changes: 3 additions & 3 deletions package/MDAnalysis/core/topologyobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class UreyBradley(TopologyObject):
``!=`` operators. A UreyBradley angle is equal to another if the same atom
numbers are involved.

.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
btype = 'ureybradley'

Expand Down Expand Up @@ -369,7 +369,7 @@ class CMap(TopologyObject):
Coupled-torsion correction map term between five
:class:`~MDAnalysis.core.groups.Atom` instances.

.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
btype = 'cmap'

Expand Down Expand Up @@ -568,7 +568,7 @@ class TopologyGroup(object):
.. versionchanged:: 0.19.0
Empty TopologyGroup now returns correctly shaped empty array via
indices property and to_indices()
.. versionchanged::0.21.0
.. versionchanged::1.0.0
``type``, ``guessed``, and ``order`` are no longer reshaped to arrays
with an extra dimension
"""
Expand Down
22 changes: 11 additions & 11 deletions package/MDAnalysis/core/universe.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def empty(cls, n_atoms, n_residues=1, n_segments=1,
.. versionadded:: 0.17.0
.. versionchanged:: 0.19.0
The attached Reader when trajectory=True is now a MemoryReader
.. versionchanged:: 0.21.0
.. versionchanged:: 1.0.0
Universes can now be created with 0 atoms
"""
if not n_atoms:
Expand Down Expand Up @@ -981,7 +981,7 @@ def _add_topology_objects(self, object_type, values, types=None, guessed=False,
None, or an iterable of hashable values with the same length as ``values``


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
if all(isinstance(x, TopologyObject) for x in values):
try:
Expand Down Expand Up @@ -1061,7 +1061,7 @@ def add_bonds(self, values, types=None, guessed=False, order=None):
u2.add_bonds(u.bonds.to_indices())


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
self._add_topology_objects('bonds', values, types=types,
guessed=guessed, order=order)
Expand All @@ -1083,7 +1083,7 @@ def add_angles(self, values, types=None, guessed=False):
guessed : bool or iterable (optional, default False)
bool, or an iterable of hashable values with the same length as ``values``

.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
self._add_topology_objects('angles', values, types=types,
guessed=guessed)
Expand All @@ -1105,7 +1105,7 @@ def add_dihedrals(self, values, types=None, guessed=False):
bool, or an iterable of hashable values with the same length as ``values``


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
self._add_topology_objects('dihedrals', values, types=types,
guessed=guessed)
Expand All @@ -1127,7 +1127,7 @@ def add_impropers(self, values, types=None, guessed=False):
bool, or an iterable of hashable values with the same length as ``values``


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
self._add_topology_objects('impropers', values, types=types,
guessed=guessed)
Expand All @@ -1145,7 +1145,7 @@ def _delete_topology_objects(self, object_type, values):
If AtomGroups, TopologyObjects, or a TopologyGroup are passed,
they *must* be from the same Universe.

.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
indices = []
for x in values:
Expand Down Expand Up @@ -1199,7 +1199,7 @@ def delete_bonds(self, values):
u.delete_bonds(u2.bonds.to_indices())


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
self._delete_topology_objects('bonds', values)
self._cache.pop('fragments', None)
Expand All @@ -1216,7 +1216,7 @@ def delete_angles(self, values):
they *must* be from the same Universe.


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
self._delete_topology_objects('angles', values)

Expand All @@ -1232,7 +1232,7 @@ def delete_dihedrals(self, values):
they *must* be from the same Universe.


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
self._delete_topology_objects('dihedrals', values)

Expand All @@ -1248,7 +1248,7 @@ def delete_impropers(self, values):
they *must* be from the same Universe.


.. versionadded:: 0.21.0
.. versionadded:: 1.0.0
"""
self._delete_topology_objects('impropers', values)

Expand Down
Loading