Repository navigation
Add optional authentication for qblast, and email and tool variables. - #4149
Conversation
|
@mdehoon @sorsaffari @peterjc Has anyone of you access to an AWS instance for testing this? |
I don't. |
|
Does the (old) code follow those (newly added to the docstring) usage guidelines? |
|
@peterjc These rules are in the code as comments, for a long time. But more than controlling the polling (which is done in the code, only once in a minute), we cannot do much more, can we? |
|
Good - I recall the same for the Entrez limits, those trivial to implement in code we do so, but best the user is aware too (e.g. for multiple instances/jobs). |
|
Can I proceed and merge this? |
|
I think I left some comments, didn't you see them? |
|
@MarkusPiotrowski I don't see any comments other than a reply to my query. Might you still have an open browser tab waiting to post? |
| megablast=None, | ||
| template_type=None, | ||
| template_length=None, | ||
| username=None, |
There was a problem hiding this comment.
According to https://ncbi.github.io/blast-cloud/usage/authentication.html , username is always 'blast'. So default to 'blast' here and below only check for password?
|
|
||
| if url_base == NCBI_BLAST_URL: | ||
| parameters.update({"email": email, "tool": tool}) | ||
| parameters = {key: value for key, value in parameters.items() if value is not None} |
There was a problem hiding this comment.
Is there a reason for switching to dics instead of lists as before?
There was a problem hiding this comment.
It allows me to use
parameters = {key: value for key, value in parameters.items() if value is not None}on line 248, which I found more readable than what we had before:
query = [x for x in parameters if x[1] is not None]There was a problem hiding this comment.
This is a matter of taste then, fine.
|
Sorry, obviously I forgot to press "submit", but I could see the comments.... |
|
Except the fact that we couldn't really test this on an AWS instance, I'm fine with this. Again, sorry for the delay, but it wasn't very obvious to me that you couldn't see my comments. |
|
@MarkusPiotrowski No problem at all. Thanks for checking the PR in detail. |
This PR adds
toolandemailvariables toBio.Blast.NCBIWWW, and optionalusernameandpasswordarguments toqblast. This PR supersedes #2866 and #1819, but is simpler as we only need to consider python3 now.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.rstfile, have runpre-commitlocally, and understand that continuous integration checks 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.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)