From 15c6bdb0d25f27ea9023933133627e9a8ec5b92c Mon Sep 17 00:00:00 2001 From: Martin Larralde Date: Mon, 14 Oct 2024 23:44:06 +0200 Subject: [PATCH] Document the `backend` parameter to `pyhmmer.hmmer` functions --- src/pyhmmer/hmmer/_hmmscan.py | 3 +++ src/pyhmmer/hmmer/_hmmsearch.py | 6 ++++++ src/pyhmmer/hmmer/_jackhmmer.py | 2 +- src/pyhmmer/hmmer/_nhmmer.py | 3 +++ src/pyhmmer/hmmer/_phmmer.py | 3 +++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/pyhmmer/hmmer/_hmmscan.py b/src/pyhmmer/hmmer/_hmmscan.py index 22bad79..2c4b3a2 100644 --- a/src/pyhmmer/hmmer/_hmmscan.py +++ b/src/pyhmmer/hmmer/_hmmscan.py @@ -129,6 +129,9 @@ def hmmscan( background (`pyhmmer.plan7.Background`, *optional*): A background object to use for configuring the profiles. If `None` given, create a default one. + backend (`str`): The parallel backend to use for workers to be + executed. Supports ``threading`` to use thread-based parallelism, + or ``multiprocessing`` to use process-based parallelism. Yields: `~pyhmmer.plan7.TopHits`: An object reporting *top hits* for each diff --git a/src/pyhmmer/hmmer/_hmmsearch.py b/src/pyhmmer/hmmer/_hmmsearch.py index c76d33b..ffc3a7a 100644 --- a/src/pyhmmer/hmmer/_hmmsearch.py +++ b/src/pyhmmer/hmmer/_hmmsearch.py @@ -135,6 +135,9 @@ def hmmsearch( callback (callable): A callback that is called everytime a query is processed with two arguments: the query, and the total number of queries. This can be used to display progress in UI. + backend (`str`): The parallel backend to use for workers to be + executed. Supports ``threading`` to use thread-based parallelism, + or ``multiprocessing`` to use process-based parallelism. Yields: `~pyhmmer.plan7.TopHits`: An object reporting *top hits* for each @@ -154,6 +157,9 @@ def hmmsearch( >>> hits[0].score 8.601... + Since *version 0.11.0*, ``mypy`` should be able to detection which + keywords can be passed to `hmmsearch` using a `TypedDict` annotation. + .. versionadded:: 0.1.0 .. versionchanged:: 0.4.9 diff --git a/src/pyhmmer/hmmer/_jackhmmer.py b/src/pyhmmer/hmmer/_jackhmmer.py index 518bcd8..ea3159b 100644 --- a/src/pyhmmer/hmmer/_jackhmmer.py +++ b/src/pyhmmer/hmmer/_jackhmmer.py @@ -306,7 +306,7 @@ def jackhmmer( builder (`~pyhmmer.plan7.Builder`, optional): A builder to configure how the queries are converted to HMMs. Passing `None` will create a default instance. - backend (`str`): The parallel backend to use for workers to be + backend (`str`): The parallel backend to use for workers to be executed. Supports ``threading`` to use thread-based parallelism, or ``multiprocessing`` to use process-based parallelism. diff --git a/src/pyhmmer/hmmer/_nhmmer.py b/src/pyhmmer/hmmer/_nhmmer.py index 47604fd..db7c67d 100644 --- a/src/pyhmmer/hmmer/_nhmmer.py +++ b/src/pyhmmer/hmmer/_nhmmer.py @@ -162,6 +162,9 @@ def nhmmer( builder (`~pyhmmer.plan7.Builder`, optional): A builder to configure how the queries are converted to HMMs. Passing `None` will create a default instance. + backend (`str`): The parallel backend to use for workers to be + executed. Supports ``threading`` to use thread-based parallelism, + or ``multiprocessing`` to use process-based parallelism. Yields: `~pyhmmer.plan7.TopHits`: A *top hits* instance for each query, diff --git a/src/pyhmmer/hmmer/_phmmer.py b/src/pyhmmer/hmmer/_phmmer.py index 4085e7a..2e5b4a3 100644 --- a/src/pyhmmer/hmmer/_phmmer.py +++ b/src/pyhmmer/hmmer/_phmmer.py @@ -128,6 +128,9 @@ def phmmer( builder (`~pyhmmer.plan7.Builder`, optional): A builder to configure how the queries are converted to HMMs. Passing `None` will create a default instance. + backend (`str`): The parallel backend to use for workers to be + executed. Supports ``threading`` to use thread-based parallelism, + or ``multiprocessing`` to use process-based parallelism. Yields: `~pyhmmer.plan7.TopHits`: A *top hits* instance for each query,