From 22d8dabe4c1d9152f4b39a453213d6bbee8bfc29 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Thu, 9 Mar 2023 12:12:30 -0700 Subject: [PATCH 1/6] finalized CHANGES for 0.8.3 --- CHANGES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index ebf32b9d..715ec3a3 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,12 @@ CHANGELOG for GromacsWrapper ============================== +2023-03-09 0.8.3 +orbeckst + +* replaced deprecacted logger.warn() with logger.warning() (#229) + + 2021-09-09 0.8.2 orbeckst, simonbray From 1475877fbd335115fc8eb3aefe16e84989788668 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Thu, 9 Mar 2023 12:20:51 -0700 Subject: [PATCH 2/6] replace deprecated np.bool - fix #234 - only affects tests --- CHANGES | 3 ++- gromacs/fileformats/xvg.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 715ec3a3..2526efd0 100644 --- a/CHANGES +++ b/CHANGES @@ -5,7 +5,8 @@ 2023-03-09 0.8.3 orbeckst -* replaced deprecacted logger.warn() with logger.warning() (#229) +* replaced deprecated logger.warn() with logger.warning() (#229) +* replaced deprecated numpy.bool with bool in a test (#234) 2021-09-09 0.8.2 diff --git a/gromacs/fileformats/xvg.py b/gromacs/fileformats/xvg.py index e7b23b0f..34355874 100644 --- a/gromacs/fileformats/xvg.py +++ b/gromacs/fileformats/xvg.py @@ -1200,7 +1200,7 @@ def break_array(a, threshold=numpy.pi, other=None): b = numpy.empty((len(a) + m)) # calculate new indices for breaks in b, taking previous insertions into account b_breaks = breaks + numpy.arange(m) - mask = numpy.zeros_like(b, dtype=numpy.bool) + mask = numpy.zeros_like(b, dtype=bool) mask[b_breaks] = True b[~mask] = a b[mask] = numpy.NAN From 48f7d5c3f9c43a1983e4f84770b01513b5882ee6 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Thu, 9 Mar 2023 12:26:05 -0700 Subject: [PATCH 3/6] fix CI to run on main needed for #232 --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c1fa7df6..574fa4ec 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,10 +6,10 @@ on: - cron: "44 4 * * 0" push: branches: - - "master" + - "main" pull_request: branches: - - "master" + - "main" concurrency: group: "${{ github.ref }}-${{ github.head_ref }}" From 912b9498f2f21c20b6890ef7788bf64102e4c15c Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Thu, 9 Mar 2023 12:36:33 -0700 Subject: [PATCH 4/6] expand testing to GROMACS 2022 and Python 3.10 and 3.11 - updated CI - added 2022 to explicitly tested GMX releases - update CHANGES --- .github/workflows/ci.yaml | 25 ++++++++++++++++--------- CHANGES | 2 ++ tests/test_tools.py | 3 ++- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 574fa4ec..e3f33750 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,34 +22,41 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macOS-latest] - python-version: [2.7, 3.6, 3.7, 3.8, 3.9] + python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] gromacs-version: ["2021.1"] # Test other GROMACS versions selectively on a recent Python. # On macOS only test one GROMACS version and two Python versions # to keep the testing matrix manageable. exclude: - os: macOS-latest - python-version: 3.6 + python-version: "3.6" - os: macOS-latest - python-version: 3.7 + python-version: "3.7" - os: macOS-latest - python-version: 3.9 + python-version: "3.8" + - os: macOS-latest + python-version: "3.9" + - os: macOS-latest + python-version: "3.10" include: - os: ubuntu-latest - python-version: 2.7 + python-version: "2.7" gromacs-version: "4.6.5" - os: ubuntu-latest - python-version: 3.8 + python-version: "3.10" gromacs-version: "4.6.5" - os: ubuntu-latest - python-version: 3.8 + python-version: "3.10" gromacs-version: "2018.6" - os: ubuntu-latest - python-version: 3.8 + python-version: "3.10" gromacs-version: "2019.1" - os: ubuntu-latest - python-version: 3.8 + python-version: "3.10" gromacs-version: "2020.6" + - os: ubuntu-latest + python-version: "3.10" + gromacs-version: "2022.4" env: MPLBACKEND: agg diff --git a/CHANGES b/CHANGES index 2526efd0..b149a622 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,8 @@ 2023-03-09 0.8.3 orbeckst +* confirmed support for GROMACS 4.6.5, 2018, 2019, 2020, 2021, 2022 on + Python 2.7 and 3.6--3.11 on Linux and macOS * replaced deprecated logger.warn() with logger.warning() (#229) * replaced deprecated numpy.bool with bool in a test (#234) diff --git a/tests/test_tools.py b/tests/test_tools.py index fa247584..58a28858 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -49,7 +49,8 @@ def test_failure_ignore(): raise AssertionError("Should have ignored exception {}".format(err)) class TestRelease(object): - major_releases = ('4', '5', '2016', '2018', '2019', '2020', '2021') + # add tested releases here + major_releases = ('4', '5', '2016', '2018', '2019', '2020', '2021', '2022') def test_release(self): assert gromacs.release().startswith(self.major_releases) From ccbdc8a8891b34dc5ceb0deccb0b97508018dd08 Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Fri, 10 Mar 2023 09:02:20 -0700 Subject: [PATCH 5/6] replaced collections.Iterable with six version fix #235 --- CHANGES | 1 + tests/test_utilities.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b149a622..87eaf578 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,7 @@ orbeckst Python 2.7 and 3.6--3.11 on Linux and macOS * replaced deprecated logger.warn() with logger.warning() (#229) * replaced deprecated numpy.bool with bool in a test (#234) +* fixed use of moved collections.Iterable in test (#235) 2021-09-09 0.8.2 diff --git a/tests/test_utilities.py b/tests/test_utilities.py index 7d910187..f15f336e 100644 --- a/tests/test_utilities.py +++ b/tests/test_utilities.py @@ -9,7 +9,7 @@ import pytest from six.moves import cPickle as pickle from six.moves import StringIO -from collections import Iterable +from six.moves.collections_abc import Iterable import numpy as np From 056381842eb893927a6ab04b43ec28dba0a504ed Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Fri, 10 Mar 2023 09:37:09 -0700 Subject: [PATCH 6/6] skip topology scaling tests for AMBER03* and AMBER03w FF See issue #236 for details. --- tests/fileformats/top/test_amber03star.py | 4 +++- tests/fileformats/top/test_amber03w.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/fileformats/top/test_amber03star.py b/tests/fileformats/top/test_amber03star.py index 0a563bb0..238deabc 100644 --- a/tests/fileformats/top/test_amber03star.py +++ b/tests/fileformats/top/test_amber03star.py @@ -7,11 +7,13 @@ import pytest -from gromacs.exceptions import GromacsError +import gromacs from .top import TopologyTest from ...datafiles import datafile +@pytest.mark.xfail(gromacs.release().startswith("2022"), + reason="issue https://github.com/Becksteinlab/GromacsWrapper/issues/236") class TestAmber03star(TopologyTest): processed = datafile('fileformats/top/amber03star/processed.top') conf = datafile('fileformats/top/amber03star/conf.gro') diff --git a/tests/fileformats/top/test_amber03w.py b/tests/fileformats/top/test_amber03w.py index e1203033..36ce4286 100644 --- a/tests/fileformats/top/test_amber03w.py +++ b/tests/fileformats/top/test_amber03w.py @@ -7,11 +7,13 @@ import pytest -from gromacs.exceptions import GromacsError +import gromacs from .top import TopologyTest from ...datafiles import datafile +@pytest.mark.xfail(gromacs.release().startswith("2022"), + reason="issue https://github.com/Becksteinlab/GromacsWrapper/issues/236") class TestAmber03w(TopologyTest): processed = datafile('fileformats/top/amber03w/processed.top') conf = datafile('fileformats/top/amber03w/conf.gro')