From e3c4701c80d7e664c16e29a817e6e6fec16ea1e8 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 11:18:05 -0800 Subject: [PATCH 01/11] Modernize packaging metadata, require Python 3.10+, bump to 1.3.0 - Require Python >=3.10 with no upper cap; classifiers list 3.10-3.14. - Declare the license as GPL-3.0-only with license-files (PEP 639) and drop the License classifier. LICENSE is plain GPL v3, so terms are unchanged. - Raise dependency minimums so they resolve together on Python 3.10: scipy 1.8.0, matplotlib 3.5.0, numba 0.56.2, MDAnalysis 2.2.0. - Add an openmm extra for MolSys.from_openMM. - Build with setuptools>=77 and drop wheel; use a recursive glob for package data (wheel contents unchanged). - CI: build docs on Python 3.12; remove GitLab 3.8 and 3.9 test jobs. - Add tests/conftest.py so pytest runs from any directory. - Bump version to 1.3.0. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pages.yml | 4 +-- .gitlab-ci.yml | 8 ----- pyproject.toml | 62 ++++++++++++++++++++----------------- src/chilife/__init__.py | 2 +- tests/conftest.py | 7 +++++ 5 files changed, 44 insertions(+), 39 deletions(-) mode change 100755 => 100644 pyproject.toml create mode 100644 tests/conftest.py diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 43d36b05..3dd9b045 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -11,10 +11,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 - - name: Set up Python 3.9 + - name: Set up Python 3.12 uses: actions/setup-python@v1 with: - python-version: 3.9 + python-version: "3.12" - uses: actions/cache@v2 with: path: | diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec24a32b..68efef76 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,14 +15,6 @@ workflow: - chiLife/data/* - chiLife/*.py -test:3.8: - image: python:3.8 - <<: *test_definition - -test:3.9: - image: python:3.9 - <<: *test_definition - test:3.10: image: python:3.10 <<: *test_definition diff --git a/pyproject.toml b/pyproject.toml old mode 100755 new mode 100644 index d63f5b75..8c4a5fcc --- a/pyproject.toml +++ b/pyproject.toml @@ -1,47 +1,53 @@ [project] name = "chilife" -description = 'A package for modeling non-canonical amino acid side chain ensembles.' -readme = 'README.md' -license= {name = 'GNU GPLv3', file = 'LICENSE'} -authors=[{name = 'Maxx Tessmer', email='mhtessmer@gmail.com'}, - {name = 'Stefan Stoll', email='stst@uw.edu'}] -keywords=['Spin-label', 'EPR', 'DEER', 'PELDOR', 'Side-chain'] +description = "A package for modeling non-canonical amino acid side chain ensembles." +readme = "README.md" +license = "GPL-3.0-only" +license-files = ["LICENSE"] +authors = [ + {name = "Maxx Tessmer", email = "mhtessmer@gmail.com"}, + {name = "Stefan Stoll", email = "stst@uw.edu"}, +] +keywords = ["Spin-label", "EPR", "DEER", "PELDOR", "Side-chain"] dynamic = ["version"] -requires-python = ">= 3.8,<3.14" -dependencies = ['numpy>=1.23.0', - 'scipy>=1.6.3', - 'matplotlib>=3.3.4', - 'numba>=0.55.0', - 'mdanalysis>=2.0.0', - 'tqdm>=4.45.0', - 'pytest>=6.2.2', - 'memoization>=0.3.1', - 'igraph>=0.10.3', - 'rtoml>=0.9.0'] - -classifiers=['License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12'] +requires-python = ">=3.10" +dependencies = [ + "numpy>=1.23.0", + "scipy>=1.8.0", + "matplotlib>=3.5.0", + "numba>=0.56.2", + "mdanalysis>=2.2.0", + "tqdm>=4.45.0", + "pytest>=6.2.2", + "memoization>=0.3.1", + "igraph>=0.10.3", + "rtoml>=0.9.0", +] +classifiers = [ + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] [project.urls] -homepage = 'https://github.com/StollLab/chiLife' +homepage = "https://github.com/StollLab/chiLife" documentation = "https://stolllab.github.io/chiLife/" [project.optional-dependencies] smiles2residue = ["rdkit>=2023.9.6"] +openmm = ["openmm>=8.1.1"] [tool.setuptools] -script-files = ['scripts/update_rotlib.py', 'scripts/oldProteinIC.py'] +script-files = ["scripts/update_rotlib.py", "scripts/oldProteinIC.py"] [tool.setuptools.package-data] -chilife = ['data/*', 'data/*/*', 'data/*/*/*'] +chilife = ["data/**/*"] [tool.setuptools.dynamic] version = {attr = "chilife.__version__"} [build-system] -requires = ["setuptools", "matplotlib", "wheel"] +requires = ["setuptools>=77", "matplotlib"] build-backend = "setuptools.build_meta" diff --git a/src/chilife/__init__.py b/src/chilife/__init__.py index 564aeaaa..256becbb 100644 --- a/src/chilife/__init__.py +++ b/src/chilife/__init__.py @@ -44,4 +44,4 @@ # SpinLabel = SpinLabel.SpinLabel # dSpinLabel = dSpinLabel.dSpinLabel -__version__ = "1.2.5" +__version__ = "1.3.0" diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 00000000..3d0561a8 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,7 @@ +import os +from pathlib import Path + +# Test modules reference data via relative paths such as "test_data/1ubq.pdb", +# and several load them at import time. Switch to the tests directory before +# collection so tests work no matter where pytest is launched from. +os.chdir(Path(__file__).parent) From c73dd2ffa5ef7f10ecee45a1502a05615b010082 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 11:42:47 -0800 Subject: [PATCH 02/11] Loosen tolerance in test_mkpep_template --- tests/test_ProteinUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_ProteinUtils.py b/tests/test_ProteinUtils.py index e0a86b1b..811a5078 100644 --- a/tests/test_ProteinUtils.py +++ b/tests/test_ProteinUtils.py @@ -578,8 +578,8 @@ def test_mkpep_template(): tphi = np.rad2deg(pep_IC.z_matrix[phi_idx, 2]) tpsi = np.rad2deg(pep_IC.z_matrix[psi_idx, 2]) - np.testing.assert_allclose(phi, tphi) - np.testing.assert_allclose(psi, tpsi) + np.testing.assert_allclose(phi, tphi, atol=1e-4) + np.testing.assert_allclose(psi, tpsi, atol=1e-4) def test_parsed_sequence(): From fb5962ce17f03cd45d035d11c93271a528c0a604 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 12:12:34 -0800 Subject: [PATCH 03/11] Fix NumPy deprecation warnings --- src/chilife/IntrinsicLabel.py | 2 +- src/chilife/MolSys.py | 2 +- src/chilife/MolSysIC.py | 2 +- src/chilife/SpinLabel.py | 2 +- src/chilife/SpinLigand.py | 3 +-- src/chilife/chilife.py | 2 +- tests/test_data/.traj_io.xtc_offsets.npz | Bin 0 -> 1220 bytes 7 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 tests/test_data/.traj_io.xtc_offsets.npz diff --git a/src/chilife/IntrinsicLabel.py b/src/chilife/IntrinsicLabel.py index 43d24fbb..34f4ca23 100644 --- a/src/chilife/IntrinsicLabel.py +++ b/src/chilife/IntrinsicLabel.py @@ -58,7 +58,7 @@ def __init__(self, res, atom_selection, spin_atoms=None, name='IntrinsicLabel'): sa_mask = np.isin(self.atom_names, self.spin_atoms,) self.spin_idx = np.argwhere(sa_mask) - self.spin_idx.shape = -1 + self.spin_idx = self.spin_idx.reshape(-1) self.atoms = [FreeAtom(atom.name, atom.type, idx, atom.resname, atom.resnum, atom.position) for idx, atom in enumerate(self._selection.atoms)] diff --git a/src/chilife/MolSys.py b/src/chilife/MolSys.py index 763786db..d0b975ad 100644 --- a/src/chilife/MolSys.py +++ b/src/chilife/MolSys.py @@ -1168,7 +1168,7 @@ def from_cif(cls, file_name): icodes = np.array(atom_site_data["pdbx_PDB_ins_code"][:n_atoms]) icodes[icodes == "?"] = "" - segs = np.char.array(atom_site_data["label_asym_id"][:n_atoms]) + segs = np.array(atom_site_data["label_asym_id"][:n_atoms], dtype=str) raw_eid = atom_site_data["label_entity_id"][:n_atoms] parsed_eid = np.array( diff --git a/src/chilife/MolSysIC.py b/src/chilife/MolSysIC.py index e90c2e5d..b31fcf92 100644 --- a/src/chilife/MolSysIC.py +++ b/src/chilife/MolSysIC.py @@ -452,7 +452,7 @@ def nonbonded(self): dtype=int, ) - self._nonbonded.shape = (-1, 2) + self._nonbonded = self._nonbonded.reshape(-1, 2) return self._nonbonded diff --git a/src/chilife/SpinLabel.py b/src/chilife/SpinLabel.py index 721a0c98..d058b4df 100644 --- a/src/chilife/SpinLabel.py +++ b/src/chilife/SpinLabel.py @@ -38,7 +38,7 @@ def __init__(self, label, site=None, protein=None, chain=None, rotlib=None, **kw self.spin_atoms = self.spin_atoms[sa_mask] self.spin_weights = self.spin_weights[sa_mask] self.spin_idx = np.argwhere(np.isin(self.atom_names, self.spin_atoms)) - self.spin_idx.shape = -1 + self.spin_idx = self.spin_idx.reshape(-1) @property def spin_coords(self): diff --git a/src/chilife/SpinLigand.py b/src/chilife/SpinLigand.py index 234d422a..00c810dd 100644 --- a/src/chilife/SpinLigand.py +++ b/src/chilife/SpinLigand.py @@ -35,5 +35,4 @@ def __init__(self, res, site=None, protein=None, chain=None, rotlib=None, **kwar self.spin_atoms = self.atom_names[spin_atoms].copy() self.spin_weights = spin_weights - self.spin_idx = spin_atoms - self.spin_idx.shape = -1 \ No newline at end of file + self.spin_idx = spin_atoms.reshape(-1) \ No newline at end of file diff --git a/src/chilife/chilife.py b/src/chilife/chilife.py index 3df8ea0d..9fbdb616 100644 --- a/src/chilife/chilife.py +++ b/src/chilife/chilife.py @@ -465,7 +465,7 @@ def create_library( ) if dihedrals.shape == (len(dihedrals),): - dihedrals.shape = (len(dihedrals), 1) + dihedrals = dihedrals.reshape(-1, 1) if weights is None: weights = np.ones(len(dihedrals)) diff --git a/tests/test_data/.traj_io.xtc_offsets.npz b/tests/test_data/.traj_io.xtc_offsets.npz new file mode 100644 index 0000000000000000000000000000000000000000..c39ca92bf909b9b8ea286048a0ea1db91483a638 GIT binary patch literal 1220 zcmWIWW@gc4fB;2?&b{Ba{)Yl?1`&q*w6x;Xl48BQf=WgP0R|67h(Z`W*)P;LAd-=x zjG2igy#_Yg9r;)y@wNo z4nT>7Ftylqut?wlMnZ9BRVpk7pdMp@(G*B7NG{3D zCD99M#3dpsc;Rigkj`4hTaKua(0pv-444-{IUz4Tu_Qkio)ci<52FV<9=`EFQh0zj zBa8DKERum4P-0}5Z(vU=fU|20R43F!vFvP literal 0 HcmV?d00001 From 47b535124008e6b5806ec70387430f7fd1705986 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 12:25:50 -0800 Subject: [PATCH 04/11] Update action versions --- .github/workflows/PR_test.yml | 4 ++-- .github/workflows/commit_test.yml | 4 ++-- .github/workflows/pages.yml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/PR_test.yml b/.github/workflows/PR_test.yml index 97670759..c08fa268 100755 --- a/.github/workflows/PR_test.yml +++ b/.github/workflows/PR_test.yml @@ -14,10 +14,10 @@ jobs: python-version: [ 3.11 ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/commit_test.yml b/.github/workflows/commit_test.yml index e63eced9..27c0048e 100644 --- a/.github/workflows/commit_test.yml +++ b/.github/workflows/commit_test.yml @@ -19,13 +19,13 @@ jobs: python-version: [3.11] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v7 with: ref: ${{ inputs.myCommit }} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 3dd9b045..a0213c4b 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -10,12 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v7 - name: Set up Python 3.12 - uses: actions/setup-python@v1 + uses: actions/setup-python@v7 with: python-version: "3.12" - - uses: actions/cache@v2 + - uses: actions/cache@v6 with: path: | ~/.cache/pip @@ -42,7 +42,7 @@ jobs: sphinx-build -E -b html ./docs/source ./pages - name: Deploy to GH-Pages if: always() - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./pages From 1e0bb4cebfac804a733a27cbce07d6888abd7be8 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 12:52:50 -0800 Subject: [PATCH 05/11] Fix pytest deprecations --- tests/test_MolSysIC.py | 2 +- tests/test_ProteinUtils.py | 2 +- tests/test_Scoring.py | 2 +- tests/test_chiLife.py | 4 ++-- tests/test_io.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_MolSysIC.py b/tests/test_MolSysIC.py index 4d8c09ee..ad71d3f3 100644 --- a/tests/test_MolSysIC.py +++ b/tests/test_MolSysIC.py @@ -127,7 +127,7 @@ def test_set_dihedral2(): print("DSF") -@pytest.mark.parametrize(["inp", "ans"], zip(gd_kwargs, gd_ans)) +@pytest.mark.parametrize(["inp", "ans"], list(zip(gd_kwargs, gd_ans))) def test_get_dihedral(inp, ans): ubqIC = xl.MolSysIC.from_atoms(ubq) dihedral = ubqIC.get_dihedral(**inp) diff --git a/tests/test_ProteinUtils.py b/tests/test_ProteinUtils.py index 811a5078..80b1e741 100644 --- a/tests/test_ProteinUtils.py +++ b/tests/test_ProteinUtils.py @@ -597,7 +597,7 @@ def test_parsed_sequence(): s2rans = [f"test_data/s2rm{i + 1}.npy" for i in range(len(s2rkeys))] -@pytest.mark.parametrize("key, ans", zip(s2rkeys, s2rans)) +@pytest.mark.parametrize("key, ans", list(zip(s2rkeys, s2rans))) def test_smiles2residue(key, ans): m1 = chilife.smiles2residue(key, randomSeed=0) test_mask = np.argsort(m1.names) diff --git a/tests/test_Scoring.py b/tests/test_Scoring.py index cf5fee35..1e62ac9f 100644 --- a/tests/test_Scoring.py +++ b/tests/test_Scoring.py @@ -57,7 +57,7 @@ lj_rot_idx = [0, 5, 5] -@pytest.mark.parametrize(("func", "ans", "rot_idx"), zip(lj_funcs, lj_ans, lj_rot_idx)) +@pytest.mark.parametrize(("func", "ans", "rot_idx"), list(zip(lj_funcs, lj_ans, lj_rot_idx))) def test_lj(func, ans, rot_idx): f = chilife.ljEnergyFunc(func) RL = chilife.RotamerEnsemble("TRP", 28, protein, energy_func=f, eval_clash=True) diff --git a/tests/test_chiLife.py b/tests/test_chiLife.py index 9702b920..25fd12f0 100755 --- a/tests/test_chiLife.py +++ b/tests/test_chiLife.py @@ -107,7 +107,7 @@ def test_get_lj_eps(): assert np.all(eps_params == ff.get_lj_eps(atom_names)) -@pytest.mark.parametrize("args, kws, expected", zip(args, kws, ans)) +@pytest.mark.parametrize("args, kws, expected", list(zip(args, kws, ans))) def test_distance_distribution(args, kws, expected): kws.setdefault("r", r) P_ans = expected @@ -178,7 +178,7 @@ def test_spin_populations(): # plt.show() -@pytest.mark.parametrize("cutoff, expected", zip([30, 0], sasa_ans)) +@pytest.mark.parametrize("cutoff, expected", list(zip([30, 0], sasa_ans))) def test_sas_res(cutoff, expected): sasres = chilife.get_sas_res(protein, cutoff) assert sasres == expected diff --git a/tests/test_io.py b/tests/test_io.py index 2164d8ab..41de0339 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -75,7 +75,7 @@ def test_fetch_AF_CIF(): fNames = ["1anf.pdb", "1omp.pdb", "3tu3.pdb"] -@pytest.mark.parametrize("pdbid, names", zip(IDs, fNames)) +@pytest.mark.parametrize("pdbid, names", list(zip(IDs, fNames))) def test_fetch2(pdbid, names): xl.fetch(pdbid, save=True) with open(f"test_data/m{names}", "r") as f: From 6243c568dbf9e2a8354f9ab1c46988066e1ca9dc Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 13:03:53 -0800 Subject: [PATCH 06/11] Fix MDAnalysis deprecation warnings --- src/chilife/MolSys.py | 8 ++++++++ src/chilife/io.py | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/chilife/MolSys.py b/src/chilife/MolSys.py index d0b975ad..7ff0dc12 100644 --- a/src/chilife/MolSys.py +++ b/src/chilife/MolSys.py @@ -33,6 +33,7 @@ "chains", "occupancies", "bs", + "tempfactors", "segs", "segids", "atypes", @@ -70,6 +71,7 @@ "segid": "segids", "charge": "charges", "bfactor": "bs", + "tempfactor": "bs", "qfactor": "occupancies", "occupancy": "occupancies", "segix": "segixs", @@ -1693,6 +1695,12 @@ def _segments(self): ] return self._segments_list + @property + def tempfactors(self): + """Alias of ``bs`` matching the MDAnalysis ``tempfactors`` attribute. A property rather than an attribute set + in ``__init__`` so that it also exists on MolSys objects unpickled from older files.""" + return self.bs + @property def molsys(self): return self diff --git a/src/chilife/io.py b/src/chilife/io.py index 6ce72e26..22f35b44 100644 --- a/src/chilife/io.py +++ b/src/chilife/io.py @@ -1250,8 +1250,8 @@ def write_frame(pdb_file: TextIO, atoms, frame=None, coords=None): "occupancies", np.ones(len(atoms.universe.atoms)) ) - if not hasattr(atoms.universe, "bfactors"): - atoms.universe.add_TopologyAttr("bfactors", np.ones(len(atoms.universe.atoms))) + if not hasattr(atoms.universe, "tempfactors"): + atoms.universe.add_TopologyAttr("tempfactors", np.ones(len(atoms.universe.atoms))) [ pdb_file.write( @@ -1263,7 +1263,7 @@ def write_frame(pdb_file: TextIO, atoms, frame=None, coords=None): atom.resnum, *coord, atom.occupancy, - atom.bfactor, + atom.tempfactor, atom.type, ) ) @@ -1468,7 +1468,7 @@ def write_atoms( for atom, coord in zip(atoms, coords): file.write( f"ATOM {atom.index + 1:5d} {atom.name:^4s} {atom.resname:3s} {'A':1s}{atom.resnum:4d} " - f"{coord[0]:8.3f}{coord[1]:8.3f}{coord[2]:8.3f}{atom.occupancy:6.2f}{atom.bfactor:6.2f} {atom.type:>2s} \n" + f"{coord[0]:8.3f}{coord[1]:8.3f}{coord[2]:8.3f}{atom.occupancy:6.2f}{atom.tempfactor:6.2f} {atom.type:>2s} \n" ) From 517bd7ac6d874a38eddd64c060233a13a8f9f9b2 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 13:17:33 -0800 Subject: [PATCH 07/11] Ignore MDAnalysis "no dt information" warning in tests --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 8c4a5fcc..0222aafc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,12 @@ chilife = ["data/**/*"] [tool.setuptools.dynamic] version = {attr = "chilife.__version__"} +[tool.pytest.ini_options] +filterwarnings = [ + # Tests build single-frame in-memory MDAnalysis Universes directly; chiLife's own loaders already suppress this. + "ignore:Reader has no dt information:UserWarning", +] + [build-system] requires = ["setuptools>=77", "matplotlib"] build-backend = "setuptools.build_meta" From 32c09236178b51d53abf6d68b49b450364251c08 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 14:58:24 -0800 Subject: [PATCH 08/11] Remove unused GitLab CI configuration --- .gitlab-ci.yml | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100755 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100755 index 68efef76..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,44 +0,0 @@ -workflow: - rules: - - if: $CI_COMMIT_BRANCH == 'main' - -.test_template: &test_definition - script: - - python -V # Print out python version for debugging - - python -m pip install -U pip - - pip install . - - cd tests - - pytest - rules: - - changes: - - tests/* - - chiLife/data/* - - chiLife/*.py - -test:3.10: - image: python:3.10 - <<: *test_definition - - # test:3.11: - # image: python:3.11 - # <<: *test_definition - - -.build_template: &build_definition - script: - - python setup.py bdist_wheel - # an alternative approach is to install and run: - - pip install dist/* - # run the command here - artifacts: - paths: - - dist/*.whl - - #run:3.8: - # image: python:3.8 - # <<: *build_definition - - #run:3.9: - # image: python:3.8 - # <<: *build_definition - # From 862d8f48c98f00599261bc5b517ddff2cb78cf28 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 15:05:31 -0800 Subject: [PATCH 09/11] Stop tracking MDAnalysis offset cache --- .gitignore | 4 ++++ tests/test_data/.traj_io.xtc_offsets.npz | Bin 1220 -> 0 bytes 2 files changed, 4 insertions(+) delete mode 100644 tests/test_data/.traj_io.xtc_offsets.npz diff --git a/.gitignore b/.gitignore index 74b5a9f5..e05f192c 100755 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,7 @@ examples/**/*_rotlib.npz docs/build docs/make.bat docs/Makefile + +# MDAnalysis trajectory offset caches +*_offsets.npz +*_offsets.lock diff --git a/tests/test_data/.traj_io.xtc_offsets.npz b/tests/test_data/.traj_io.xtc_offsets.npz deleted file mode 100644 index c39ca92bf909b9b8ea286048a0ea1db91483a638..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1220 zcmWIWW@gc4fB;2?&b{Ba{)Yl?1`&q*w6x;Xl48BQf=WgP0R|67h(Z`W*)P;LAd-=x zjG2igy#_Yg9r;)y@wNo z4nT>7Ftylqut?wlMnZ9BRVpk7pdMp@(G*B7NG{3D zCD99M#3dpsc;Rigkj`4hTaKua(0pv-444-{IUz4Tu_Qkio)ci<52FV<9=`EFQh0zj zBa8DKERum4P-0}5Z(vU=fU|20R43F!vFvP From 4438eb80e9d6d101c823dee8da0214639b1f4585 Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 15:46:44 -0800 Subject: [PATCH 10/11] Add PyPI classifiers and pytest default options --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0222aafc..9ec063f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,12 @@ dependencies = [ "rtoml>=0.9.0", ] classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "Operating System :: OS Independent", + "Topic :: Scientific/Engineering :: Chemistry", + "Topic :: Scientific/Engineering :: Physics", + "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -49,6 +55,7 @@ chilife = ["data/**/*"] version = {attr = "chilife.__version__"} [tool.pytest.ini_options] +addopts = ["-ra", "--strict-markers"] filterwarnings = [ # Tests build single-frame in-memory MDAnalysis Universes directly; chiLife's own loaders already suppress this. "ignore:Reader has no dt information:UserWarning", From 780808f376e002837add12cfcccff9bf84fab30b Mon Sep 17 00:00:00 2001 From: Stefan Stoll Date: Wed, 2 Dec 2026 15:53:50 -0800 Subject: [PATCH 11/11] Fix MDAnalysis deprecation warnings in tests --- tests/test_Topology.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test_Topology.py b/tests/test_Topology.py index 1b400aad..52c0a62e 100644 --- a/tests/test_Topology.py +++ b/tests/test_Topology.py @@ -5,7 +5,18 @@ import MDAnalysis import chilife as xl from chilife.Topology import * -from MDAnalysis.topology.guessers import guess_angles, guess_dihedrals + +try: # MDAnalysis >= 2.8 + from MDAnalysis.guesser import DefaultGuesser + + def guess_angles(bonds): + return DefaultGuesser(None).guess_angles(bonds) + + def guess_dihedrals(angles): + return DefaultGuesser(None).guess_dihedrals(angles) + +except ImportError: # older MDAnalysis + from MDAnalysis.topology.guessers import guess_angles, guess_dihedrals ubq = xl.MolSys.from_pdb('test_data/1ubq.pdb', sort_atoms=True) mbp = MDAnalysis.Universe("test_data/2klf.pdb", in_memory=True)