You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding (PRIVATE) to summary line of private docstrings #1466
The following grep command identifies hundreds of private functions and methods where the one-line docstring summary does not end with (PRIVATE). as per current Biopython style:
$ grep --include '*.py' -rn -A 1 "def _[a-z]" Bio BioSQL | grep '"""'| grep -v "(PRIVATE)"
(The grep will miss any cases using a multi-line def statement).
i.e. Assuming we tell Sphinx to include the private functions/methods in the HTML documentation, can it flag these as private in some way (other than us having the text "(PRIVATE)" in the string)?
@peterjc Shall I do the Bio/Phylo/ directory first? Shall I give pull request for individual files?
I will add (PRIVATE) at the end of the docstrings wherever the grep points out. Do I need to write like this? for eg;
In line 460 Bio/Phylo/TreeConstruction.py
"""Calculate pairwise distance from two sequences.
Returns a value between 0 (identical sequences) and 1 (completely
different, or seq1 is an empty string.) (PRIVATE).
"""
def_pairwise(self, seq1, seq2):
"""Calculate pairwise distance from two sequences. Returns a value between 0 (identical sequences) and 1 (completely different, or seq1 is an empty string.) """score=0
Would become:
def_pairwise(self, seq1, seq2):
"""Calculate pairwise distance from two sequences (PRIVATE). Returns a value between 0 (identical sequences) and 1 (completely different, or seq1 is an empty string.) """score=0
Note we keep that blank line, see PEP257 for background. Thank you!
@peterjc Shall I do Bio/SearchIO/ directory? I will create new branch then I will proceed the changes. Is it ok to give single pull request for this directory changes? Thank you.
Hi @peterjc , I have opened a PR, it address the files found by the grep command, and few more I found, I think that covers the scope of this issue.
Regards,
Activity
JaeDukSeo commentedon Mar 5, 2018
Is this already closed? I see it merged.
peterjc commentedon Mar 5, 2018
@JaeDukSeo this issue is still open, lots of these docstrings are still missing the
(PRIVATE)suffix.A few were fixed in #1462 which was merged.
Amrithasuresh commentedon Mar 16, 2018
@peterjc Shall I do the
Bio/Phylo/directory first? Shall I give pull request for individual files?I will add
(PRIVATE)at the end of the docstrings wherever the grep points out. Do I need to write like this? for eg;In line 460
Bio/Phylo/TreeConstruction.pyIs that right?
Thank you.
peterjc commentedon Mar 19, 2018
@Amrithasuresh one pull request covering
Bio/Phylo/sounds good. Looking at the specific example:https://github.com/biopython/biopython/blob/biopython-170/Bio/Phylo/TreeConstruction.py#L458
Would become:
Note we keep that blank line, see PEP257 for background. Thank you!
Amrithasuresh commentedon Mar 20, 2018
@peterjc Shall I do
Bio/GenBank/folder as per the suggestions? Thank you.peterjc commentedon Mar 20, 2018
Sure - please make a new pull request for the
Bio/GenBank/changesAmrithasuresh commentedon Mar 20, 2018
@peterjc I just pushed in my biopython git repository it is automatically merged with yesterday's pull request. How to fix that?
peterjc commentedon Mar 20, 2018
You probably need to make a new branch, starting from the official Biopython repository's master branch.
Amrithasuresh commentedon Mar 21, 2018
@peterjc Shall I do
Bio/SearchIO/directory? I will create new branch then I will proceed the changes. Is it ok to give single pull request for this directory changes? Thank you.Add (PRIVATE) to summary line of private SearchIO docstrings
Add (PRIVATE) to summary line of private BioSQL docstrings
Add (PRIVATE) to summary line of private Bio.GA docstrings
Add (PRIVATE) to summary line of private GenBank + Phylo docstrings
peterjc commentedon Apr 24, 2018
@Amrithasuresh You've nearly finished based on the grep command I was using - impressive patience/dedication 👍
svalqui commentedon Jul 29, 2018
I'll have a look at this.
svalqui commentedon Aug 8, 2018
Hi @peterjc , I have opened a PR, it address the files found by the grep command, and few more I found, I think that covers the scope of this issue.
Regards,
Adding PRIVATE to docstrings (#1749)
peterjc commentedon Aug 17, 2018
Closed via #1749.