Repository navigation
Use flake8-docstrings to run pydocstyle via flake8 - #1202
Conversation
|
Inviting comments, esp from @bow, @MarkusPiotrowski and @morrme |
|
Also CC @cbrueffer as he's worked on the git-commit hook side of things. |
Codecov Report
@@ Coverage Diff @@
## master #1202 +/- ##
==========================================
- Coverage 79.95% 79.94% -0.01%
==========================================
Files 323 323
Lines 51477 51478 +1
==========================================
- Hits 41157 41156 -1
- Misses 10320 10322 +2
Continue to review full report at Codecov.
|
|
There is currently a major catch to watch out for - right now |
|
Locally I've been using flake8 and pycodestyle installed under Python 3, which means certain differences in the output (like ignoring D302). Right now TravisCI is only running the style checks under Python 2, we'll do both later. |
| True is the sequence is a palindrom. | ||
| sequence is a Seq object. | ||
| """ | ||
| """Is the sequence (Seq objecT) as a palindrom.""" |
There was a problem hiding this comment.
I feel this is better phrased as "Whether the sequence is a palindrome or not." (also there is a typo in the end currently)
There was a problem hiding this comment.
In imperative mood: "Check wether the sequence is a palindrome or not."
There was a problem hiding this comment.
Thank you. Should we change the method name too (is_palindrome with an e)?
There was a problem hiding this comment.
That would be good. Something like:
def is_palindrom(...):
# ... deprecation notice here? I'm not sure if this is overkill since this is a small function ...
return is_palindrome(...)
def is_palindrome(...):
# actual function
|
|
||
| def test_correct_retrieval_1(self): | ||
| """ | ||
| """Correct retrievel of Cnksr3 in mouse. |
There was a problem hiding this comment.
This should be "Correct retrieval ..."
See discussion on biopython#1202.
|
Frustratingly I didn't have a pre-commit hook installed on this machine... |
|
I have updated my git pre-commit hook on #1188 to assume just |
$ flake8 BioSQL/ --select E123 --config /dev/null --ignore BioSQL/BioSeqDatabase.py:555:5: E123 closing bracket does not match indentation of opening bracket's line
Thank you Bow & Markus. TODO: Change the method name too?
See discussion on biopython#1202.
|
Thank you @bow & @MarkusPiotrowski for looking at this. I've just rebased with a slight history clean up; if this passes TravisCI I will merge it... |
See discussion on biopython#1202.
This would close #1199
It replaces the central
.pydocstyleconfiguration file forpydocstylewith top-level folder specific.flake8entries used withflake8-docstringsviaflake8instead.Our long term goal should be to unify on a single base-level
.flake8file for the entire project, but right now this setup allows e.g.BioSQL/andScripts/to be more strictly checked untilBio/andTests/catch up.