Repository navigation
enable flake8 testing of doctests in Bio, BioSQL; fix tests - #1900
Conversation
|
As I changed doctests fails may occur. If you don't like commenting out some lines then disabling flake8 doctest checks for specific directories is an alternative, as it existed in |
Codecov Report
@@ Coverage Diff @@
## master #1900 +/- ##
=========================================
+ Coverage 85.5% 85.5% +<.01%
=========================================
Files 303 303
Lines 49464 49470 +6
=========================================
+ Hits 42294 42300 +6
Misses 7170 7170
Continue to review full report at Codecov.
|
|
I see you fixed a few objects being used as default arguments too :) |
|
I'm guessing you removed the section headers like this: in order to have a However, the PDB code was using those (and still has lots) in line with the numpy docstring style which we have broad agreement would be a good aspirational target for the Biopython docstrings. So, how about: In general self-contained examples are better, and you've done a great job in making most of the examples work as doctests by adding missing imports and more. Good job! |
|
If you've not see it, there is more information on the test framework in a chapter of the Tutorial: I just double checked Do you want to try adding a few more entries there, then to see if they pass?: We also usually add this snippet to the end of the files themselves to help with direct testing, However, I've found with some files local imports break under Python 3 so that trick doesn't always work. |
|
Running tests via |
Reason was I'm installing BioPython only on Py3 and the |
|
The primary goal of this pull request and #1899 is to check the doctest examples in our docstrings are following our flake8 settings (i.e. PEP8 code style, spaces etc). That seems to be working nicely, thanks to your work. A secondary goal of doctest examples is to be run as functional tests, which in Biopython we control via a list in |
|
Merged, thank you! |
Original author Marco Galardini and contributors since as tracked by git have agreed: - Jeroen Van Goey (@BioGeek) biopython#898 (comment) - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - Chris Rands (@chris-rands) biopython#1301 - Gasta88 (@Gasta88) biopython#1063 - Marco Galardini (@mgalardini) biopython#898 (comment) - Nick Negretti (@nimne) biopython#1768 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Sergio Valqui (@svalqui) biopython#1749
Original author Marco Galardini and contributors since as tracked by git have agreed: - Jeroen Van Goey (@BioGeek) #898 (comment) - Adhemar Zerlotini (@azneto) #1412 (comment) - Chris Rands (@chris-rands) #1301 - Gasta88 (@Gasta88) #1063 - Marco Galardini (@mgalardini) #898 (comment) - Nick Negretti (@nimne) #1768 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Sergio Valqui (@svalqui) #1749
Original author Thomas Hamelryck (when the file was called Bio/PDB/Vector.py) and all the contributors since as tracked with version control have agreed: - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - Bertrand Caron (@bertrand-caron) biopython#494 (comment) - Brian Osborne (@bosborne) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Connor McCoy (@cmccoy) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Francesco Gastaldello (@Gasta88) biopython#1063 - Hom (@platinhom) biopython#1920 - Joe Greener (@jgreener64) biopython#1393 - Michiel de Hoon (@mdehoon) biopython#898 (comment) - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Rasmus Fonseca (@fonseca.rasmus) biopython#1171 (comment) - Sergei Lebedev (@superbobry) biopython#898 (comment) - Sergio Valqui (@svalqui) biopython#1749 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
Original author Thomas Hamelryck and all the contributors since as tracked with version control have agreed: - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Chris Mitchell (@chrismit aka @Chris7) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Connor McCoy (@cmccoy) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Francesco Gastaldello (@Gasta88) biopython#1063 - João Rodrigues (@JoaoRodrigues) biopython#898 (comment) - Joe Greener (@jgreener64) biopython#1393 - Lenna Peterson (@lennax) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Sourav Singh (@souravsingh) biopython#957 - Sergei Lebedev (@superbobry) biopython#898 (comment) - Sergio Valqui (@svalqui) biopython#1749 - Sourav Singh (@souravsingh) biopython#957 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html - Travis Wrightsman (@twrightsman) biopython#898 (comment)
Original author Thomas Hamelryck and all the contributors since as tracked with version control have agreed: - Ben Reynwar (@benreynwar) biopython#898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Brian Osborne (@bosborne) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Connor McCoy (@cmccoy) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Francesco Gastaldello (@Gasta88) biopython#1063 - Hongbo Zhu (@hongbo-zhu-cn) biopython#898 (comment) - Joao Rodrigues (@JoaoRodrigues) biopython#898 (comment) - Kristian Rother (@krother) biopython#898 (comment) - Lenna Peterson (@lennax) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Joerg Schaarschmidt (@schaarj) biopython#1567 - Sergio Valqui (@svalqui) biopython#1749 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
Original author Thomas Hamelryck and all the contributors since as tracked with version control have agreed: - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - Brian Osborne (@bosborne) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Connor McCoy (@cmccoy) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Francesco Gastaldello (@Gasta88) biopython#1063 - Joe Greener (@jgreener64) biopython#1393 - Michiel de Hoon (@mdehoon) biopython#898 (comment) - @morrme biopython#1172 (comment) - Nick Negretti (@nimne) biopython#1768 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Sergio Valqui (@svalqui) biopython#1749 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html - Tiago Antao (@tiagoantao) biopython#898 (comment)
Original author Thomas Hamelryck (when the file was called Bio/PDB/Vector.py) and all the contributors since as tracked with version control have agreed: - Adhemar Zerlotini (@azneto) #1412 (comment) - Bertrand Caron (@bertrand-caron) #494 (comment) - Brian Osborne (@bosborne) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Connor McCoy (@cmccoy) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Francesco Gastaldello (@Gasta88) #1063 - Hom (@platinhom) #1920 - Joe Greener (@jgreener64) #1393 - Michiel de Hoon (@mdehoon) #898 (comment) - @morrme #1172 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Rasmus Fonseca (@fonseca.rasmus) #1171 (comment) - Sergei Lebedev (@superbobry) #898 (comment) - Sergio Valqui (@svalqui) #1749 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
Original author Thomas Hamelryck and all the contributors since as tracked with version control have agreed: - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Chris Mitchell (@chrismit aka @Chris7) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Connor McCoy (@cmccoy) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Francesco Gastaldello (@Gasta88) #1063 - João Rodrigues (@JoaoRodrigues) #898 (comment) - Joe Greener (@jgreener64) #1393 - Lenna Peterson (@lennax) #898 (comment) - Michiel de Hoon (@mdehoon) #898 (comment) - @morrme #1172 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Sourav Singh (@souravsingh) #957 - Sergei Lebedev (@superbobry) #898 (comment) - Sergio Valqui (@svalqui) #1749 - Sourav Singh (@souravsingh) #957 - Suresh Panneerselvam (@Amrithasuresh) #1575 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html - Travis Wrightsman (@twrightsman) #898 (comment)
Original author Thomas Hamelryck and all the contributors since as tracked with version control have agreed: - Ben Reynwar (@benreynwar) #898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Brian Osborne (@bosborne) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Connor McCoy (@cmccoy) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Francesco Gastaldello (@Gasta88) #1063 - Hongbo Zhu (@hongbo-zhu-cn) #898 (comment) - Joao Rodrigues (@JoaoRodrigues) #898 (comment) - Kristian Rother (@krother) #898 (comment) - Lenna Peterson (@lennax) #898 (comment) - Michiel de Hoon (@mdehoon) #898 (comment) - @morrme #1172 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Joerg Schaarschmidt (@schaarj) #1567 - Sergio Valqui (@svalqui) #1749 - Suresh Panneerselvam (@Amrithasuresh) #1575 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
Original author Thomas Hamelryck and all the contributors since as tracked with version control have agreed: - Adhemar Zerlotini (@azneto) #1412 (comment) - Brian Osborne (@bosborne) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Connor McCoy (@cmccoy) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Francesco Gastaldello (@Gasta88) #1063 - Joe Greener (@jgreener64) #1393 - Michiel de Hoon (@mdehoon) #898 (comment) - @morrme #1172 (comment) - Nick Negretti (@nimne) #1768 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Sergio Valqui (@svalqui) #1749 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html - Tiago Antao (@tiagoantao) #898 (comment)
Original author Thomas Hamelryck and all the contributors since as tracked with version control have agreed: - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - Alexander (@asford) biopython#2212 (comment) - @Amrithasuresh biopython#1575 - Andrew Guy (@andrewguy) biopython#2212 (comment) - Ben Reynwar (@benreynwar) biopython#898 (comment) - Bernhard C. Thiel (@Bernhard10) biopython#968 - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Brian Osborne (@bosborne) biopython#898 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Connor McCoy (@cmccoy) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Francesco Gastaldello (@Gasta88) biopython#1063 - Joe Greener (@jgreener64) biopython#1393 - Joerg Schaarschmidt (@schaarj) biopython#1567 - João Rodrigues (@JoaoRodrigues) biopython#898 (comment) - Klaus Kopec (@klauskopec) biopython#2241 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Sergio Valqui (@svalqui) biopython#1749 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
Original author Yanbo Ye and contributors since as tracked with version control have all agreed: - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Jordan Willis (@jwillis0720) biopython#292 (comment) - Marco Vincenzi (@ZykeDev) biopython#1891 - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Sergio Valqui (@svalqui) biopython#1749 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Travis Wrightsman (@twrightsman) biopython#898 (comment) - Yanbo Ye (@lijax) biopython#898 (comment)
Original author Eric Talevich and contributors since as tracked with version control have all agreed: - Barbara Mühlemann (@bamueh) biopython#898 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Fabio Zanini (@iosonofabio) biopython#898 (comment) - Nate Sutton (@nmsutton) biopython#898 (comment) - Nick Negretti (@nimne) biopython#1768 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Xing (@xhlulu) biopython#1916
Original author Thomas Hamelryck and all the contributors since as tracked with version control have agreed: - Adhemar Zerlotini (@azneto) #1412 (comment) - Alexander (@asford) #2212 (comment) - @Amrithasuresh #1575 - Andrew Guy (@andrewguy) #2212 (comment) - Ben Reynwar (@benreynwar) #898 (comment) - Bernhard C. Thiel (@Bernhard10) #968 - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Brian Osborne (@bosborne) #898 (comment) - Carlos Pena (@carlosp420) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Connor McCoy (@cmccoy) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Francesco Gastaldello (@Gasta88) #1063 - Joe Greener (@jgreener64) #1393 - Joerg Schaarschmidt (@schaarj) #1567 - João Rodrigues (@JoaoRodrigues) #898 (comment) - Klaus Kopec (@klauskopec) #2241 (comment) - Michiel de Hoon (@mdehoon) #898 (comment) - @morrme #1172 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Sergio Valqui (@svalqui) #1749 - Thomas Hamelryck (CVS username nisse) https://mailman.open-bio.org/pipermail/biopython/2018-September/016546.html
All contributors as tracked by version control have agreed: - Adam Sjøgren https://mailman.open-bio.org/pipermail/biopython/2019-October/016696.html - Chris MacRaild (@macraild) biopython#2209 - James Jeffryes (@JamesJeffryes) biopython#1499 - Kai Blin (@kblin) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900
Original author Yanbo Ye and contributors since as tracked with version control have all agreed: - Adhemar Zerlotini (@azneto) biopython#1412 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Jordan Willis (@jwillis0720) biopython#292 (comment) - Marco Vincenzi (@ZykeDev) biopython#1891 - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Sergio Valqui (@svalqui) biopython#1749 - Suresh Panneerselvam (@Amrithasuresh) biopython#1575 - Travis Wrightsman (@twrightsman) biopython#898 (comment) - Yanbo Ye (@lijax) biopython#898 (comment)
Original author Eric Talevich and contributors since as tracked with version control have all agreed: - Barbara Mühlemann (@bamueh) biopython#898 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Chris Rands (@chris-rands) biopython#1301 - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Fabio Zanini (@iosonofabio) biopython#898 (comment) - Nate Sutton (@nmsutton) biopython#898 (comment) - Nick Negretti (@nimne) biopython#1768 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900 - Xing (@xhlulu) biopython#1916
Original author Yanbo Ye and contributors since as tracked with version control have all agreed: - Adhemar Zerlotini (@azneto) #1412 (comment) - Carlos Pena (@carlosp420) #898 (comment) - Chris Rands (@chris-rands) #1301 - Christian Brueffer (@cbrueffer) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Jordan Willis (@jwillis0720) #292 (comment) - Marco Vincenzi (@ZykeDev) #1891 - @morrme #1172 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Sergio Valqui (@svalqui) #1749 - Suresh Panneerselvam (@Amrithasuresh) #1575 - Travis Wrightsman (@twrightsman) #898 (comment) - Yanbo Ye (@lijax) #898 (comment)
Original author Eric Talevich and contributors since as tracked with version control have all agreed: - Barbara Mühlemann (@bamueh) #898 (comment) - Carlos Pena (@carlosp420) #898 (comment) - Chris Rands (@chris-rands) #1301 - Christian Brueffer (@cbrueffer) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Fabio Zanini (@iosonofabio) #898 (comment) - Nate Sutton (@nmsutton) #898 (comment) - Nick Negretti (@nimne) #1768 (comment) - Peter Cock (@peterjc) #898 (comment) - Ralf Stephan (@rwst) #1900 - Xing (@xhlulu) #1916
All contributors as tracked by version control have agreed: - Adam Sjøgren https://mailman.open-bio.org/pipermail/biopython/2019-October/016696.html - Chris MacRaild (@macraild) biopython#2209 - James Jeffryes (@JamesJeffryes) biopython#1499 - Kai Blin (@kblin) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Ralf Stephan (@rwst) biopython#1900
This pull request addresses issue #1899
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.)