Skip to content

Adding missing public docstrings to Bio.Phylo, Issue 1203 - #1868

Merged
peterjc merged 5 commits into
biopython:masterfrom
svalqui:issue_1203_Bio_Phylo
Feb 1, 2019
Merged

peterjc merged 5 commits into
biopython:masterfrom
svalqui:issue_1203_Bio_Phylo

Conversation

@svalqui

@svalqui svalqui commented Dec 3, 2018

Copy link
Copy Markdown
Contributor

This pull request addresses issue #1203

  • 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 and understand that AppVeyor and
    TravisCI will be used to confirm the Biopython unit tests and flake8 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.)

@svalqui
svalqui requested a review from etal as a code owner December 3, 2018 22:06
@codecov

codecov Bot commented Dec 3, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #1868 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1868      +/-   ##
==========================================
+ Coverage   85.47%   85.48%   +<.01%     
==========================================
  Files         302      302              
  Lines       49425    49434       +9     
==========================================
+ Hits        42248    42258      +10     
+ Misses       7177     7176       -1
Impacted Files Coverage Δ
Bio/Phylo/NeXMLIO.py 89.22% <ø> (ø) ⬆️
Bio/Phylo/PhyloXML.py 81.39% <ø> (ø) ⬆️
Bio/Phylo/TreeConstruction.py 94.17% <ø> (ø) ⬆️
Bio/Phylo/PhyloXMLIO.py 89.46% <ø> (ø) ⬆️
Bio/Phylo/PAML/_parse_codeml.py 96% <100%> (+0.01%) ⬆️
Bio/Phylo/PAML/yn00.py 87.17% <100%> (+0.16%) ⬆️
Bio/Phylo/PAML/_paml.py 83.82% <100%> (+0.24%) ⬆️
Bio/Phylo/PAML/baseml.py 86.27% <100%> (+0.13%) ⬆️
Bio/Phylo/PAML/chi2.py 88.75% <100%> (+0.14%) ⬆️
Bio/Phylo/PAML/codeml.py 89.71% <100%> (+0.09%) ⬆️
... and 4 more

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 703ec76...981a4eb. Read the comment docs.

Comment thread Bio/Phylo/PhyloXML.py Outdated
# Shortcuts for list attributes that are usually only 1 item
# NB: Duplicated from Phylogeny class
def _get_confidence(self):
"""Return confident values (PRIVATE)."""

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.

confident --> confidence

Comment thread Bio/Phylo/PhyloXML.py Outdated
def __rdivmod__(self, other):
"""Return quotient and remainder.

of dividing and reversing the values of two Confidence objects.

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.

This isn't a self-contained sentence, and I'm unclear on your meaning.

Comment thread Bio/Phylo/PhyloXML.py Outdated
return divmod(other, self.value)

def __pow__(self, other, modulo=None):
"""Return the value of Confident object raised at power of.

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.

This does not make sense (unless you include the rest of the docstring). How about:

"""Return value of confidence object raised to the given power."""

Also, typo: Confident object.

Comment thread Bio/Phylo/PhyloXML.py Outdated
return pow(self.value, other)

def __rpow__(self, other):
"""Return the value of other Confident object raised at power of.

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.

This doesn't make sense either, see __pow__ comment.

Comment thread Bio/Phylo/PhyloXML.py
if self.value:
return self.value
"""Initialize the class."""
"""Initialize the class."""

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.

Those look like an accidental paste - well spotted. I wonder if there is a flake8 setting to report this kind of thing?

Comment thread Bio/Phylo/PhyloXMLIO.py Outdated
return taxonomy

def other(self, elem, namespace, localtag):
"""Set non-phyloXML element."""

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.

Is "set" the right word here? In the context of Python properties that verb is used to assign a new value.

(Same comment applies to the following methods too)

@svalqui

svalqui commented Dec 5, 2018

Copy link
Copy Markdown
Contributor Author

@peterjc , Thank you for the feedback, I think is better now, what do you think.

@peterjc

peterjc commented Dec 6, 2018

Copy link
Copy Markdown
Member

What do you think @etal? Is this ready to merge?

@peterjc

peterjc commented Feb 1, 2019

Copy link
Copy Markdown
Member

Looks like Eric has been too busy - I'm going to merge this anyway as I think it is an good improvement, even if with Eric's help we could make this even better.

@peterjc
peterjc merged commit 06f932b into biopython:master Feb 1, 2019
@peterjc

peterjc commented Feb 1, 2019

Copy link
Copy Markdown
Member

Thank you @svalqui 👍

@svalqui
svalqui deleted the issue_1203_Bio_Phylo branch April 1, 2019 02:07
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