Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue 4940 - Loosen restriction of FormattedSeq._table in Restriction module#4941

Merged
peterjc merged 3 commits intobiopython:masterfrom
manulera:issue-4940
Feb 19, 2025
Merged

Issue 4940 - Loosen restriction of FormattedSeq._table in Restriction module#4941
peterjc merged 3 commits intobiopython:masterfrom
manulera:issue-4940

Conversation

@manulera
Copy link
Contributor

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

Closes #4940

@codecov
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.26%. Comparing base (186d382) to head (2527e9a).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4941      +/-   ##
==========================================
+ Coverage   85.37%   86.26%   +0.89%     
==========================================
  Files         282      282              
  Lines       59405    59405              
==========================================
+ Hits        50716    51247     +531     
+ Misses       8689     8158     -531     

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

@manulera
Copy link
Contributor Author

Thanks @peterjc I made that change

Copy link
Member

@peterjc peterjc left a comment

Choose a reason for hiding this comment

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

Sorry, I didn't look closely enough at the test earlier, but this is an easy fix:

======================================================================
FAIL: test_non_iupac_letters (test_Restriction.SequenceTesting)
Test if non-IUPAC letters raise a TypeError.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/biopython/biopython/Tests/test_Restriction.py", line 57, in test_non_iupac_letters
    with self.assertRaises(TypeError):
AssertionError: TypeError not raised

----------------------------------------------------------------------

Either remove that test, or modify it to test random non-letter symbols raise the error?

@manulera
Copy link
Contributor Author

manulera commented Feb 19, 2025

Hey @peterjc should be fixed now. Sorry about overlooking it, when I run this locally other tests failed and none seemed related to Restriction. Sorry about that. It's good to test with the - characters, since someone may be using an alignment sequence where the spacer - breaks up the restriction site or messes up the meaning of the .search return value.

@peterjc peterjc merged commit 775b901 into biopython:master Feb 19, 2025
31 checks passed
@manulera manulera mentioned this pull request Sep 12, 2025
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.

Loosen restriction of FormattedSeq._table in Restriction module

2 participants