-
Notifications
You must be signed in to change notification settings - Fork 716
replaced lib.transformations with transformations package #5062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
- removed old lib.transformations code - use transformations package instead (which is the updated version of our old vendored code): updated imports everywhere - moved our only addition (transformations.rotaxis() to mdamath.rotaxis()) and left a deprecated version in lib.transformations - blackened files
9dc6308
to
83a8e77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the vendored lib.transformations
C code with the external transformations
package, migrates a custom rotaxis
implementation into lib.mdamath
, and leaves a deprecated wrapper in the old namespace.
- Removed the compiled
_transformations
extension and switched all imports to use thetransformations
package. - Moved
rotaxis
intolib.mdamath
and added a deprecation test for the old location. - Updated tests to call into the installed package and documented the change in the CHANGELOG.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
testsuite/MDAnalysisTests/utils/test_transformations.py | Switched parameterized tests to use t.transformations.* and commented out obsolete Python-level tests |
package/setup.py | Deleted the MDAnalysis.lib._transformations extension from build configuration |
package/pyproject.toml | Added transformations to dependencies without pinning a version |
package/MDAnalysis/lib/mdamath.py | Added a new rotaxis function with docs and versionchanged note |
package/CHANGELOG | Recorded the replacement of vendored code and deprecation of lib.transformations |
Comments suppressed due to low confidence (1)
testsuite/MDAnalysisTests/utils/test_transformations.py:399
- Commenting out entire test blocks silently removes coverage; use pytest.mark.skip or xfail to indicate intentional deprecation while still reporting on coverage.
# @pytest.mark.parametrize(
25f8085
to
72c64c8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5062 +/- ##
===========================================
+ Coverage 93.62% 94.11% +0.48%
===========================================
Files 177 177
Lines 22001 21331 -670
Branches 3114 3021 -93
===========================================
- Hits 20599 20075 -524
+ Misses 947 847 -100
+ Partials 455 409 -46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
transformations: | ||
default: 'transformations' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought adding transformations here would install it as part of CI but I still see it as pypi installed https://github.com/MDAnalysis/mdanalysis/actions/runs/15578157334/job/43867072733?pr=5062#step:7:269
transformations 2025.1.1 pypi_0 pypi
What should I be doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got time this weekend, will look into it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to expand, I suspect that there is something deeper with the way in which conda recognises the package. We should check this before making the switch, otherwise we might end up with and rdkit pypi situation, except from a non-optional package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I noticed and maybe is relevant, is that the conda-forge package does not appear to be maintained: the latest packaged version is 2022.9.26
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sigh...
Do we want to put another orphan package on our shoulders (until we remove transformations in 3.0)?
Or do we want to go back and just vendor the 2025.x code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be as easy as merging a bunch of PRs https://github.com/conda-forge/transformations-feedstock/pulls ... or not ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say it is an orphan packaged, because PyPI is up to date and there has been a 2025 release. So I think the main issue is with the conda-forge feedstock, which we could take over?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @RMeli - the recipe seems rather simple so it might not be too much of a hassle for us to take it on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: when I tried mamba install transformations
in my developer env, it tried downgrading numpy. So I am just confirming what you've been saying: the conda-forge version of transformations needs to be updated for us to be useful.
Package Version Build Channel Size
─────────────────────────────────────────────────────────────────────────
Install:
─────────────────────────────────────────────────────────────────────────
+ transformations 2022.9.26 py312hc7c0aa3_2 conda-forge 80kB
Downgrade:
─────────────────────────────────────────────────────────────────────────
- numpy 2.2.6 py312h72c5963_0 conda-forge Cached
+ numpy 1.26.4 py312heda63a1_0 conda-forge Cached
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @orbeckst, always great to remove so much code without losing functionality.
213310f
to
4df6847
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to put a soft block so that we can work out what's up with the pypi install taking precedence over conda. Just so we don't see another rdkit-style pypi issue.
4df6847
to
bd88561
Compare
If you both think that’s feasible then it may still be a positive trade off for us: reduce code burden inside MDA (and magically increase coverage by 0.5%) and do something good for the community. Who would start the process of getting on the cf feedstock recipe?Am 6/12/25 um 03:57 schrieb Irfan Alibay ***@***.***>:
@IAlibay commented on this pull request.
In .github/actions/setup-deps/action.yaml:
+ transformations:
+ default: 'transformations'
I agree with @RMeli - the recipe seems rather simple so it might not be too much of a hassle for us to take it on.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I have opened an issue on the feedstock, let's see what happens. |
Thanks!
…--
Oliver Beckstein (he/his/him)
***@***.***
On Jun 12, 2025, at 08:34, Irfan Alibay ***@***.***> wrote:
IAlibay
left a comment
(MDAnalysis/mdanalysis#5062)
<#5062 (comment)>
Who would start the process of getting on the cf feedstock recipe?
I have opened an issue on the feedstock, let's see what happens.
—
Reply to this email directly, view it on GitHub <#5062 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAB2DHAVM53PF76OAREW7HT3DGM2DAVCNFSM6AAAAAB7BFF37KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNRXGMZDENJWGM>.
You are receiving this because you were mentioned.
|
Thanks @IAlibay! I'd be OK to be added as a maintainer if needed. |
While we wait for the Seems to be working? |
Fixes #5061
Changes made in this Pull Request:
PR Checklist
package/CHANGELOG
file updated?package/AUTHORS
? (If it is not, add it!)Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.
📚 Documentation preview 📚: https://mdanalysis--5062.org.readthedocs.build/en/5062/