about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-10-01 11:37:05 -0500
committerFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-10-01 12:38:06 -0500
commit27ca6bc0677cc3ccfcfe4203e07f2dd9b5ac8889 (patch)
tree20ca08f65bc8027c1a63b368b40a20bcc6a4e1e1
parent76a840ea6535b75e094e4bc5bb8d86bb7b244c48 (diff)
downloadgn-uploader-27ca6bc0677cc3ccfcfe4203e07f2dd9b5ac8889.tar.gz
Improve function documentation.
Use python's official documentation format, specified by PEP 287 for
documenting the function's parameters, return and exceptions.
-rw-r--r--uploader/genotypes/models.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/uploader/genotypes/models.py b/uploader/genotypes/models.py
index f3e6798..0a1a1e2 100644
--- a/uploader/genotypes/models.py
+++ b/uploader/genotypes/models.py
@@ -163,7 +163,19 @@ def genotype_dataset(
 ) -> Optional[dict]:
     """Retrieve genotype datasets from the database.
 
-    Apparently, you should only ever have one genotype dataset for a population.
+    There should only ever be one genotype dataset for each population.
+
+    :param conn: The SQL database connection object.
+    :type conn: MySQLdb.Connection
+    :param species_id: The ID of the species.
+    :type species_id: int
+    :param population_id: The ID of the population.
+    :type population_id: int
+    :param dataset_id: The ID of the dataset.
+    :type dataset_id: int
+
+    :rtype: dict
+    :raises uploader.dataerrors.NotFoundError: If dataset is not found.
     """
     _query = (
         "SELECT gf.* FROM Species AS s INNER JOIN InbredSet AS iset "