-
Notifications
You must be signed in to change notification settings - Fork 0
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
Internal Cache Flag #52
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #52 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 180 194 +14
Branches 23 25 +2
=========================================
+ Hits 180 194 +14 ☔ View full report in Codecov by Sentry. |
opr/primer.py
Outdated
@@ -274,10 +305,13 @@ def melting_temperature(self, method=MeltingTemperature.BASIC): | |||
:type method: MeltingTemperature | |||
:return: approximated melting temperature | |||
""" | |||
if self._melting_temperature[method] is not None: | |||
if method not in self._computed["melting_temperature"]: | |||
raise OPRBaseError(PRIMER_INVALID_MELTING_TEMPERATURE_METHOD_ERROR) |
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.
This error and raise NotImplementedError(PRIMER_MELTING_TEMPERATURE_NOT_IMPLEMENTED_ERROR)
are very similar; please properly merge them. I suggest raising only NotImplementedError
.
CHANGELOG.md
Outdated
- `_computed` internal cache flag attribute | ||
- `is_computed` method | ||
### Changed | ||
- Cache structure in Primer |
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.
`Primer` class
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.
@AHReccese
Please resolve this pull request conflicts and then ping me so I can complete my review 🔥
opr/params.py
Outdated
@@ -26,3 +26,5 @@ | |||
PRIMER_MULTIPLICATION_ERROR = "The primer sequence can only be multiplied by an integer." | |||
|
|||
PRIMER_MELTING_TEMPERATURE_NOT_IMPLEMENTED_ERROR = "This method for calculating melting temperature has not been implemented." | |||
|
|||
PRIMER_ATTRIBUTE_NOT_COMPUTABLE_ERROR = "This attribute either doesn't exist or cannot be computed/cached (e.g., name)." |
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.
My suggestion:
This attribute either doesn't exist or cannot be computed/cached (e.g., name).
opr/primer.py
Outdated
@@ -11,6 +11,8 @@ | |||
from .params import DNA_COMPLEMENT_MAP | |||
from .params import PRIMER_ADDITION_ERROR, PRIMER_MULTIPLICATION_ERROR | |||
from .params import PRIMER_MELTING_TEMPERATURE_NOT_IMPLEMENTED_ERROR | |||
|
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.
Remove this blank like
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.
🔥
Reference Issues/PRs
#50
What does this implement/fix? Explain your changes.
Any other comments?