Modernise package: Python 3.10+ compatibility, pytest, bug fixes, updated tests#25
Merged
Conversation
New pynb with Schutte potential
- traj.py: fix typo _read_dtraj -> _read_distraj (broke discrete traj loading) - msm.py: fix wrong loop variable self.keys[k] -> self.keys[i] in do_lbrate - msm.py: replace deprecated np.float() with float() (removed in NumPy>=1.24) - msm_lib.py: replace deprecated np.matrix() with plain ndarray in do_boots_worker - traj_lib.py: remove unconditional top-level hdbscan import (optional dependency) - traj.py: make hdbscan a lazy import with a clear ImportError message - test/download_data.py: use __file__-relative paths instead of os.getcwd() - test/test_trajectory.py: fix import paths and hardcoded 'test/data/' paths - test/test_msm.py: fix import path for download_data All 14 tests now pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Runs pytest on push/PR to master and develop across: - OS: ubuntu-latest, macos-latest - Python: 3.10, 3.11, 3.12 Uses miniforge/conda to install mdtraj and scientific stack reliably. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Same broken 'from test.download_data import ...' path that was causing pytest collection to fail across all CI matrix jobs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Travis CI no longer supports open source projects. Replaced with the new GitHub Actions CI badge pointing to BioKT/MasterMSM. Removed the Codacy badge which referenced the old repo and is not configured. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- msm_lib.py: fix two remaining np.float() calls in calc_mlrate - ci.yml: print package versions before tests and use --tb=long to diagnose the Python 3.10-specific failure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix TimeSeries(dtraj=) → TimeSeries(distraj=) kwarg typo in test setUp - Fix SuperMSM.__init__ missing self.keys (AttributeError in do_lbrate) - Fix MSM.calc_count using x.keys instead of self.keys - Fix calc_eigsK eigenvector arrays: float → complex to avoid ComplexWarning - Re-enable TestMSMLib (19 methods) and add fresh TestSuperMSM (3 methods); fix deprecated np.float/np.complex in test_calc_eigsK; fix tau_averages call signature; 1 active test → 37 active tests, all passing - Update setup.py: version 0.1dev → 0.2.0, Python 3.10/3.11/3.12 classifiers, python_requires>=3.10, install_requires list - Add mdtraj and scikit-learn to requirements.txt - Add TODO.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SuperMSM.self.keysAttributeError,MSM.calc_countwrongx.keysreference,TimeSeries(dtraj=)kwarg typo,calc_eigsKcomplex eigenvector array typemsm.pyandtraj.pysignificantly simplified and modernised;traj_lib.pytrimmed;np.float/np.matrixdeprecations removedTestMSMLib(19 methods), added freshTestSuperMSM(3 methods)0.1dev→0.2.0, Python 3.10/3.11/3.12 classifiers,python_requires>=3.10,install_requireslist,scikit-learnadded to requirementsTest plan
pytest mastermsm/test/ -v→ 37 passed locallypip install -e .succeeds cleanly🤖 Generated with Claude Code