Skip to content

DOC: fix doctest output in transformations.py for newer NumPy#5283

Open
Kd1880 wants to merge 4 commits intoMDAnalysis:developfrom
Kd1880:fix/doctest-transformations
Open

DOC: fix doctest output in transformations.py for newer NumPy#5283
Kd1880 wants to merge 4 commits intoMDAnalysis:developfrom
Kd1880:fix/doctest-transformations

Conversation

@Kd1880
Copy link

@Kd1880 Kd1880 commented Mar 6, 2026

Fixes part of #3925

What was wrong

The doctest in decompose_matrix() in transformations.py had an
outdated expected output. Newer versions of NumPy return
np.float64(0.123) instead of 0.123.

What I changed

Updated the expected output in the docstring from 0.123
to np.float64(0.123).

Tests

Ran python -m sphinx -b doctest source/ _build/doctest
all 160 doctests in transformations.py now pass.

AI Usage Declaration

AI tools (Claude by Anthropic) were used to help identify and
understand the fix. The actual code change was made manually
by me after understanding the issue.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there first time contributor! Welcome to the MDAnalysis community! We ask that all contributors abide by our Code of Conduct and that first time contributors introduce themselves on GitHub Discussions so we can get to know you. You can learn more about participating here. Please also add yourself to package/AUTHORS as part of this PR.

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.82%. Comparing base (54d37c2) to head (d0e2e54).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5283   +/-   ##
========================================
  Coverage    93.82%   93.82%           
========================================
  Files          180      182    +2     
  Lines        22477    22483    +6     
  Branches      3191     3195    +4     
========================================
+ Hits         21089    21095    +6     
  Misses         925      925           
  Partials       463      463           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the AI and other declarations from the PR template. Please add them before we review this PR.

@Kd1880 Kd1880 requested a review from IAlibay March 9, 2026 16:13
Copy link
Member

@BradyAJohnston BradyAJohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the template available in the repo (https://github.com/MDAnalysis/mdanalysis/blob/develop/.github/PULL_REQUEST_TEMPLATE.md).

It pre-fills when you open a PR on GitHub. Currently you have the changelog message from your other PR also in this PR. Please also update your other PR if you wish for us to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants