Skip to content

Fix argument type passed to get_spherical_coordinates#5166

Open
Augustin-Zidek wants to merge 1 commit intobiopython:masterfrom
Augustin-Zidek:patch-3
Open

Fix argument type passed to get_spherical_coordinates#5166
Augustin-Zidek wants to merge 1 commit intobiopython:masterfrom
Augustin-Zidek:patch-3

Conversation

@Augustin-Zidek
Copy link
Copy Markdown

The function expects a columnar Numpy array, but a list was being passed instead.

  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file, have run pre-commit
    locally, and understand that continuous integration checks will be used to
    confirm the Biopython unit tests and style checks pass with these changes.

The function expects a columnar Numpy array, but a list was being passed instead.
@peterjc
Copy link
Copy Markdown
Member

peterjc commented Feb 20, 2026

Is this based on the (relatively recent) type annotations? If so perhaps rather than changing the test, the annotation should be tweaked. If the docstring also said array, then it is less clear cut.

@peterjc
Copy link
Copy Markdown
Member

peterjc commented Feb 20, 2026

Ah - so this was motivated by our discussion on #5138. There too we have a test passing a possibly odd input that nevertheless worked for years. My slight worry over any tightening in the accepted input style is we'll discover end users' scripts were also passing slightly odd arrays in too... and we'll break their code.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.10%. Comparing base (ead54d7) to head (dbbfefa).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5166      +/-   ##
==========================================
- Coverage   85.51%   78.10%   -7.41%     
==========================================
  Files         282      282              
  Lines       59490    59490              
==========================================
- Hits        50871    46466    -4405     
- Misses       8619    13024    +4405     

☔ 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.

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.

2 participants