Repository navigation
Adding parameter to return print_that output instead of printing it - #1039
Conversation
Codecov Report@@ Coverage Diff @@
## master #1039 +/- ##
==========================================
+ Coverage 80.47% 80.55% +0.07%
==========================================
Files 320 320
Lines 49045 48993 -52
==========================================
- Hits 39468 39465 -3
+ Misses 9577 9528 -49
Continue to review full report at Codecov.
|
|
I don't understand the use-case here versus just doing Rather than a new boolean argument, would an optional handle make more sense (e.g. |
|
With template system I refer to jinja2 and similar. |
|
OK - I see what you mean. Frankly I am not keen on methods which directly print, rather than the more flexible option of returning a string. How about we introduce a new method like Its a bit more hassle, but leaves us with a cleaner API (although separately I'd like to retire the entire restriction module in favour of a re-write, see eg #268). |
|
I agree, that is the way to go. Will work on that. |
|
I called the new method .format_output() since format() was taken in that namespace. |
|
@peterjc The code is ready for review |
|
While |
|
I thought it was not need because print_that inside PrintFormat is mean to be called from print_that in Restriction. But will modify it anyway. |
|
Probably almost no one would be using that method, but it would be consistent to do both. Thanks. |
|
Looks good, thank you - finally two administrative questions: Are you happy to dual licence your Biopython contributions (including re-licensing your past contributions) under both the Biopython License Agreement AND the BSD 3-Clause License? See #898. Also, are you happy to be thanked by name in the |
|
Sorry I didn't answer. My answer is yes for both questions. |
See preceeding commit from pull request #1039.
|
Thank you 👍 |
Squashed commit of pull request biopython#1039, allowing use of the pretty-print functionality as strings which is more flexible that printing.
See preceeding commit from pull request biopython#1039.
Original author Sebastian Bassi and contributors since have all agreed: - @Amrithasuresh biopython#1575 - Markus Piotrowski (@MarkusPiotrowski) biopython#898 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Sebastian Bassi (@sbassi) biopython#1039 (comment) - Sergei Lebedev (@superbobry) biopython#898 (comment)
Original author Sebastian Bassi and contributors since have all agreed: - @Amrithasuresh biopython#1575 - Markus Piotrowski (@MarkusPiotrowski) biopython#898 (comment) - Carlos Pena (@carlosp420) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - @morrme biopython#1172 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Sebastian Bassi (@sbassi) biopython#1039 (comment) - Sergei Lebedev (@superbobry) biopython#898 (comment)
Named authors (Yves Bastide, Brad Chapman) and contributors since according to the git logs for Bio/SeqUtils/CheckSum.py and the original filename Bio/crc.py have agreed: - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Carlos Pena (@carlosp420) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Markus Piotrowski (@MarkusPiotrowski) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Sebastian Bassi (@sbassi) biopython#1039 (comment) - Sergei Lebedev (@superbobry) biopython#898 (comment) - Yves Bastide http://mailman.open-bio.org/pipermail/biopython/2018-September/016541.html - Wibowo Arindrarto (@bow) biopython#898 (comment)
Named authors (Yves Bastide, Brad Chapman) and contributors since according to the git logs for Bio/SeqUtils/CheckSum.py and the original filename Bio/crc.py have agreed: - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Carlos Pena (@carlosp420) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Markus Piotrowski (@MarkusPiotrowski) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Sebastian Bassi (@sbassi) biopython#1039 (comment) - Sergei Lebedev (@superbobry) biopython#898 (comment) - Yves Bastide http://mailman.open-bio.org/pipermail/biopython/2018-September/016541.html - Wibowo Arindrarto (@bow) biopython#898 (comment)
Original author Sebastian Bassi and contributors since have all agreed: - @Amrithasuresh #1575 - Markus Piotrowski (@MarkusPiotrowski) #898 (comment) - Carlos Pena (@carlosp420) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - @morrme #1172 (comment) - Peter Cock (@peterjc) #898 (comment) - Sebastian Bassi (@sbassi) #1039 (comment) - Sergei Lebedev (@superbobry) #898 (comment)
Named authors (Yves Bastide, Brad Chapman) and contributors since according to the git logs for Bio/SeqUtils/CheckSum.py and the original filename Bio/crc.py have agreed: - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Carlos Pena (@carlosp420) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Markus Piotrowski (@MarkusPiotrowski) #898 (comment) - Michiel de Hoon (@mdehoon) #898 (comment) - Peter Cock (@peterjc) #898 (comment) - Sebastian Bassi (@sbassi) #1039 (comment) - Sergei Lebedev (@superbobry) #898 (comment) - Yves Bastide http://mailman.open-bio.org/pipermail/biopython/2018-September/016541.html - Wibowo Arindrarto (@bow) #898 (comment)
This change allows to return the output of print_that instead of sending to stdout. This is usefull when you need this output for a template system.