Repository navigation
flake8 D300 """triple double quotes""" in Tests - #2016
Conversation
|
Forgot to check in |
Codecov Report
@@ Coverage Diff @@
## master #2016 +/- ##
=========================================
+ Coverage 85.1% 85.1% +<.01%
=========================================
Files 314 314
Lines 50302 50302
=========================================
+ Hits 42809 42811 +2
+ Misses 7493 7491 -2
Continue to review full report at Codecov.
|
|
Interesting, I broke |
Plus a few other related fixes like adding missing docstrings.
|
|
||
| def test_get_molecular_weight_identical(self): | ||
| "Test calculating the protein molecular weight agrees with calculation from Bio.SeqUtils" | ||
| """Calculating the protein molecular weight agrees with calculation from Bio.SeqUtils.""" |
There was a problem hiding this comment.
Not related to this PR, but I wonder if this and the following test make sense, since molecular_weight of ProtParam.ProteinAnalysis is just a call to the module's function:
def molecular_weight(self):
"""Calculate MW from Protein sequence."""
return molecular_weight(self.sequence, monoisotopic=self.monoisotopic)There was a problem hiding this comment.
Not sure, haven't looked at that for a long time.
| del numpy | ||
| except ImportError: | ||
| from Bio import MissingExternalDependencyError | ||
| raise MissingExternalDependencyError( |
There was a problem hiding this comment.
Again not direclty related to this PR, but I would sort and seperate the import stuff like this (PEP-8):
import json
import unittest
import warnings
try:
import numpy
del numpy
except ImportError:
from Bio import MissingExternalDependencyError
raise MissingExternalDependencyError(
"Install NumPy if you want to use Bio.phenotype.")
from Bio._py3k import StringIO
from Bio import BiopythonExperimentalWarning
with warnings.catch_warnings():
warnings.simplefilter('ignore', BiopythonExperimentalWarning)
from Bio import phenotypeThere was a problem hiding this comment.
You mean first standard library imports, then own library imports (here Bio, BioSQL), finally any local imports (e.g. the BioSQL tests do that). I agree, we should work towards that.
MarkusPiotrowski
left a comment
There was a problem hiding this comment.
Wow, what an effort! I have two or three comments, would be nice to know your opinion about them.
|
@MarkusPiotrowski Lots of good questions, I have addressed the two specific issues in the changes on the pull request, and replied to the others. Thank you for looking at this so carefully! |
This pull request is somewhat related to issue #883 / #2014.
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.rstfile and understand that AppVeyor andTravisCI will be used to confirm the Biopython unit tests and
flake8stylechecks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)