From d4de9107c563ac20ed778dcb2a84ab017b7909f5 Mon Sep 17 00:00:00 2001 From: Egor Marin Date: Fri, 12 Jan 2024 15:22:41 +0100 Subject: [PATCH] update changelog and tests for PCA fix --- package/CHANGELOG | 1 + testsuite/MDAnalysisTests/analysis/test_pca.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/package/CHANGELOG b/package/CHANGELOG index 142db2aa8c4..94cf984e04b 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -19,6 +19,7 @@ The rules for this file: * 2.8.0 Fixes + * Fix bug in PCA -- wasn't possible to use `frames=...` syntax before. * Fix deploy action to use the correct version of the pypi upload action. Enhancements diff --git a/testsuite/MDAnalysisTests/analysis/test_pca.py b/testsuite/MDAnalysisTests/analysis/test_pca.py index e157bee994e..b001ac4a8f3 100644 --- a/testsuite/MDAnalysisTests/analysis/test_pca.py +++ b/testsuite/MDAnalysisTests/analysis/test_pca.py @@ -132,6 +132,11 @@ def test_no_frames(u): with pytest.raises(ValueError): PCA(u, select=SELECTION).run(stop=1) +def test_can_run_frames(u): + atoms = u.select_atoms(SELECTION) + u.transfer_to_memory() + PCA(u, select=SELECTION).run(frames=[0,1]) + def test_transform(pca, u): ag = u.select_atoms(SELECTION)