Skip to content

Update PAML docstrings - #1824

Closed
funcylambda wants to merge 3 commits into
biopython:masterfrom
funcylambda:master
Closed

funcylambda wants to merge 3 commits into
biopython:masterfrom
funcylambda:master

Conversation

@funcylambda

@funcylambda funcylambda commented Oct 6, 2018 •

Copy link
Copy Markdown
Contributor

This pull request addresses issue #1708

  • 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.)

@funcylambda

Copy link
Copy Markdown
Contributor Author

Fixed docstring issues mentioned in #1708

Comment thread Bio/Phylo/PAML/baseml.py

Check that the file exits, that the results file is not empty, and then
parse the file. Check there is a version in the results and then return
the results. Otherwise raise an exception."""

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.

Move the triple quote to its own line please - this and three other cases are failing the automated style checks using flake8:

$ flake8 Bio/
Bio/Phylo/PAML/baseml.py:93:1: D209 Multi-line docstring closing quotes should be on a separate line
Bio/Phylo/PAML/baseml.py:181:1: D209 Multi-line docstring closing quotes should be on a separate line
Bio/Phylo/PAML/codeml.py:94:1: D209 Multi-line docstring closing quotes should be on a separate line
Bio/Phylo/PAML/codeml.py:193:1: D209 Multi-line docstring closing quotes should be on a separate line

@peterjc peterjc changed the title #1708 - Updated docstrings as per issues 1708. Update PAML docstrings Oct 8, 2018
@peterjc

peterjc commented Oct 8, 2018

Copy link
Copy Markdown
Member

@brandoninvergo any views on upper case PAML (etc) versus lower case paml in the docstrings? In the specific case of the run methods, one might argue for lower case to match the binary name (and put it in reStructuredText markup too to be explicit)?

@brandoninvergo

Copy link
Copy Markdown
Contributor

Throughout the PAML documentation, the programs are referred to in all-lower case. Only the package itself is written in all caps.

When originally writing Bio.Phylo.PAML I opted to capitalize the first letter of the class names to match the usual Python style (e.g. Bio.Phylo.PAML.Baseml). Unless the actual class names change, any reference to the class or an instance of it should have the first letter capitalized (e.g. "Baseml"). Any reference to the binary or the method should be lower case ("baseml"). Any reference to the package should be in all caps ("PAML").

@peterjc

peterjc commented Jul 30, 2025

Copy link
Copy Markdown
Member

Closed by #5034 building on this - thank you all!

@peterjc peterjc closed this Jul 30, 2025
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.

3 participants