-
Notifications
You must be signed in to change notification settings - Fork 10
Add global primer settings + extend EBIC primer design with more parameters #361
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #361 +/- ##
==========================================
+ Coverage 96.94% 96.97% +0.03%
==========================================
Files 27 28 +1
Lines 2031 2052 +21
==========================================
+ Hits 1969 1990 +21
Misses 62 62
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 refactors primer design functionality by centralizing primer3 imports and adding configurable primer design settings. The main purpose is to standardize how primer melting temperature calculations and thermodynamic analyses are performed across the codebase.
- Centralizes primer3 imports to a single module (
primer3_functions.py) to standardize settings handling - Introduces configurable
PrimerDesignSettingsto allow customization of DNA concentration and salt conditions - Updates all primer design endpoints and functions to accept and use the new settings system
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/opencloning/primer3_functions.py | New module centralizing all primer3 functionality with configurable settings |
| src/opencloning/primer_design.py | Updates to use centralized primer3 functions and default settings |
| src/opencloning/endpoints/primer_design.py | Refactors to use new primer3 functions and adds settings parameters to endpoints |
| src/opencloning/ebic/primer_design.py | Updates EBIC primer design to use centralized primer3 functions with configurable Tm targets |
| tests/test_primer_design.py | Updates test calls to include new required parameters for EBIC primers |
| tests/test_endpoints_primer_design.py | Comprehensive test updates for new settings system and endpoint changes |
| scripts/check_primer3_imports.py | New validation script to enforce primer3 import restrictions |
| .pre-commit-config.yaml | Adds pre-commit hook to validate primer3 imports |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| template = parse(os.path.join(test_files, 'lacZ_EBIC_example.gb'))[0] | ||
|
|
||
| result = ebic_primers(template, SimpleLocation(1000, 4075), 50, 20) | ||
| result = ebic_primers(template, SimpleLocation(1000, 4075), 50, 20, 61, 3) |
Copilot
AI
Oct 14, 2025
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.
[nitpick] Consider using named parameters for the new arguments to improve code readability. The magic numbers 61 and 3 would be clearer as target_tm=61, target_tm_tolerance=3.
| template = parse(os.path.join(test_files, 'lacZ_EBIC_example.gb'))[0] | ||
| with self.assertRaises(ValueError) as e: | ||
| ebic_primers(template, SimpleLocation(0, 4075), 50, 20) | ||
| ebic_primers(template, SimpleLocation(0, 4075), 50, 20, 61, 3) |
Copilot
AI
Oct 14, 2025
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.
[nitpick] Consider using named parameters for the new arguments to improve code readability. The magic numbers 61 and 3 would be clearer as target_tm=61, target_tm_tolerance=3.
No description provided.