Skip to content

Issue 2220 - #2349

Merged
peterjc merged 7 commits into
biopython:masterfrom
chebizarro:issue_2220
Nov 26, 2019
Merged

peterjc merged 7 commits into
biopython:masterfrom
chebizarro:issue_2220

Conversation

@chebizarro

Copy link
Copy Markdown
Contributor

This pull request addresses issue #2220

It was relatively straight-forward to create a custom documenter for the AbstractCommandLine class but many of the applications needed modifications to the formatting of the docstrings of their dynamic attributes to be compatible with rst/docutils. The resulting changes render very well in html but result in some minor artifacts (escape characters) in the command line help text.

  • 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.rst file, have run flake8 locally, and
    understand that AppVeyor and TravisCI will be used to confirm the Biopython unit
    tests and style checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

@codecov

codecov Bot commented Nov 20, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #2349 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2349      +/-   ##
==========================================
- Coverage   84.95%   84.94%   -0.02%     
==========================================
  Files         323      323              
  Lines       52690    52690              
==========================================
- Hits        44764    44756       -8     
- Misses       7926     7934       +8
Impacted Files Coverage Δ
Bio/Align/Applications/_Dialign.py 100% <ø> (ø) ⬆️
Bio/Sequencing/Applications/_bwa.py 100% <ø> (ø) ⬆️
Bio/Blast/Applications.py 85.91% <ø> (ø) ⬆️
Bio/Phylo/Applications/_Raxml.py 100% <ø> (ø) ⬆️
Bio/Phylo/Applications/_Phyml.py 100% <ø> (ø) ⬆️
Bio/_py3k/__init__.py 72.41% <0%> (-4.6%) ⬇️
Bio/Restriction/Restriction.py 84.51% <0%> (-0.32%) ⬇️
Bio/PopGen/GenePop/Controller.py 64.47% <0%> (-0.2%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bb7a24...5fbd0a7. Read the comment docs.

Comment thread Bio/Blast/Applications.py Resolved
Comment thread Bio/Blast/Applications.py Resolved
Comment thread Bio/Blast/Applications.py Resolved
@peterjc

peterjc commented Nov 20, 2019

Copy link
Copy Markdown
Member

I didn't even know this was possible with Sphinx! Nice 👍

I have a repeated query about slashes on continued lines in the docstrings - many of which can likely be edited in multiple ways to produce nicer RST output.

Comment thread Bio/Sequencing/Applications/_bwa.py Outdated
equate=False),
_Option(["-d", "d"],
"Off-diagonal X-dropoff (Z-dropoff). Stop extension when the difference between the best and the current extension score is above |i-j|*A+INT, where i and j are the current positions of the query and reference, respectively, and A is the matching score. Z-dropoff is similar to BLAST\'s X-dropoff except that it doesn\'t penalize gaps in one of the sequences in the alignment. Z-dropoff not only avoids unnecessary extension, but also reduces poor alignments inside a long good alignment. [100]",
r"Off-diagonal X-dropoff (Z-dropoff). Stop extension when the difference between the best and the current extension score is above \|i-j\|*A+INT, where i and j are the current positions of the query and reference, respectively, and A is the matching score. Z-dropoff is similar to BLAST\'s X-dropoff except that it doesn\'t penalize gaps in one of the sequences in the alignment. Z-dropoff not only avoids unnecessary extension, but also reduces poor alignments inside a long good alignment. [100]",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to slash escape the apostrophes here do we?

@peterjc

peterjc commented Nov 20, 2019

Copy link
Copy Markdown
Member

Still some slashes in Bio/Phylo/Applications/_Phyml.py and Bio/Phylo/Applications/_Raxml.py - good to know it was just an editor doing something silly.

@peterjc

peterjc commented Nov 20, 2019

Copy link
Copy Markdown
Member

This is a big improvement, although running it locally I see something odd. e.g.

$ tox -c .travis-tox.ini -e api
$ open Doc/api/_build/html/Bio.Blast.Applications.html

Everything seems to be listed twice per class, once as attributes of the object, and again (after the methods) as properties. Visually the property list looks nicer, so I'd hide the attributes given the choice. This could just be how properties are displayed by default?

Do you see the same thing (might depend on versions of Sphinx etc)?

If you don't immediately see how to fix this, I am inclined to merge this as it is still an improvement.

@chebizarro

Copy link
Copy Markdown
Contributor Author

The latest commit should fix this - the duplicate attributes are apparently caused by numpydoc clashing with autosummary.

@peterjc
peterjc merged commit 7844bca into biopython:master Nov 26, 2019
@peterjc

peterjc commented Nov 26, 2019

Copy link
Copy Markdown
Member

Thank you - confirmed after testing locally. This should be live here soon:
https://biopython.org/docs/dev/api/

@chebizarro
chebizarro deleted the issue_2220 branch July 22, 2020 23:56
peterjc added a commit to peterjc/biopython that referenced this pull request Nov 15, 2020
Original author Eric Talevich and other contributors
since as tracked with version control have agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Carlos Pena (@carlosp420)
   biopython#898 (comment)
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Eric Talevich (@etal)
   biopython#898 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
peterjc added a commit to peterjc/biopython that referenced this pull request Nov 15, 2020
Original author Eric Talevich and contributors since
tracked with version control (with one exception noted
below) have all agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Eric Talevich (@etal)
   biopython#898 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430

We have not had explicit permission from Jingping Li
(@Jingping) for the one line change applied in
biopython#73 and
credited to them. The change was suggested by me, but
the recorded authorship was more to recognise their
work in identifying the problem and testing the solution.
peterjc added a commit to peterjc/biopython that referenced this pull request Nov 15, 2020
Original author Saket Choudhary and contributors
since as tracked by version control have agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Carlos Pena (@carlosp420)
   biopython#898 (comment)
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Jeremy LaBarge (@biojerm)
   biopython#1847 (comment)
 - John Ma (@JohnMCMa)
   biopython#1790
 - @morrme
   biopython#1172 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Saket Choudhary (@saketkc)
   biopython#898 (comment)
 - Sergei Lebedev (@superbobry)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430
 - Travis Wrightsman (@twrightsman)
   biopython#898 (comment)
peterjc added a commit that referenced this pull request Nov 17, 2020
Original author Saket Choudhary and contributors
since as tracked by version control have agreed:

 - Adhemar Zerlotini (@azneto)
   #1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   #2444
 - Carlos Pena (@carlosp420)
   #898 (comment)
 - Chris Daley (@chebizarro)
   #2349
 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - Jeremy LaBarge (@biojerm)
   #1847 (comment)
 - John Ma (@JohnMCMa)
   #1790
 - @morrme
   #1172 (comment)
 - Peter Cock (@peterjc)
   #898 (comment)
 - Saket Choudhary (@saketkc)
   #898 (comment)
 - Sergei Lebedev (@superbobry)
   #898 (comment)
 - Sergio Valqui (@svalqui)
   #1749
 - Sujan Dulal (@Dsujan)
   #2430
 - Travis Wrightsman (@twrightsman)
   #898 (comment)
peterjc added a commit that referenced this pull request Dec 3, 2020
Original author Eric Talevich and other contributors
since as tracked with version control have agreed:

 - Adhemar Zerlotini (@azneto)
   #1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   #2444
 - Carlos Pena (@carlosp420)
   #898 (comment)
 - Chris Daley (@chebizarro)
   #2349
 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - Eric Talevich (@etal)
   #898 (comment)
 - Peter Cock (@peterjc)
   #898 (comment)
 - Sergio Valqui (@svalqui)
   #1749
peterjc added a commit that referenced this pull request Dec 3, 2020
Original author Eric Talevich and contributors since
tracked with version control (with one exception noted
below) have all agreed:

 - Adhemar Zerlotini (@azneto)
   #1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   #2444
 - Chris Daley (@chebizarro)
   #2349
 - Christian Brueffer (@cbrueffer)
   #898 (comment)
 - Eric Talevich (@etal)
   #898 (comment)
 - Peter Cock (@peterjc)
   #898 (comment)
 - Sergio Valqui (@svalqui)
   #1749
 - Sujan Dulal (@Dsujan)
   #2430

We have not had explicit permission from Jingping Li
(@Jingping) for the one line change applied in
#73 and
credited to them. The change was suggested by me, but
the recorded authorship was more to recognise their
work in identifying the problem and testing the solution.
JoaoRodrigues pushed a commit to JoaoRodrigues/biopython that referenced this pull request Jun 3, 2021
Original author Saket Choudhary and contributors
since as tracked by version control have agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Carlos Pena (@carlosp420)
   biopython#898 (comment)
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Jeremy LaBarge (@biojerm)
   biopython#1847 (comment)
 - John Ma (@JohnMCMa)
   biopython#1790
 - @morrme
   biopython#1172 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Saket Choudhary (@saketkc)
   biopython#898 (comment)
 - Sergei Lebedev (@superbobry)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430
 - Travis Wrightsman (@twrightsman)
   biopython#898 (comment)
JoaoRodrigues pushed a commit to JoaoRodrigues/biopython that referenced this pull request Jun 3, 2021
Original author Eric Talevich and other contributors
since as tracked with version control have agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Carlos Pena (@carlosp420)
   biopython#898 (comment)
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Eric Talevich (@etal)
   biopython#898 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
JoaoRodrigues pushed a commit to JoaoRodrigues/biopython that referenced this pull request Jun 3, 2021
Original author Eric Talevich and contributors since
tracked with version control (with one exception noted
below) have all agreed:

 - Adhemar Zerlotini (@azneto)
   biopython#1412 (comment)
 - Andrey Raspopov (@Andrey-Raspopov)
   biopython#2444
 - Chris Daley (@chebizarro)
   biopython#2349
 - Christian Brueffer (@cbrueffer)
   biopython#898 (comment)
 - Eric Talevich (@etal)
   biopython#898 (comment)
 - Peter Cock (@peterjc)
   biopython#898 (comment)
 - Sergio Valqui (@svalqui)
   biopython#1749
 - Sujan Dulal (@Dsujan)
   biopython#2430

We have not had explicit permission from Jingping Li
(@Jingping) for the one line change applied in
biopython#73 and
credited to them. The change was suggested by me, but
the recorded authorship was more to recognise their
work in identifying the problem and testing the solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants