aboutsummaryrefslogtreecommitdiff
path: root/gn3/db
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-10-06 11:44:35 +0300
committerFrederick Muriuki Muriithi2023-10-06 11:49:04 +0300
commit0dfa02d39eeb7abdd9694c4a4829d45c537a2a51 (patch)
treed423277789b126e8583d3aee7e67fa1d0e7139de /gn3/db
parent164da23e29354a74e30db7348d93860f3d5b4ea1 (diff)
downloadgenenetwork3-0dfa02d39eeb7abdd9694c4a4829d45c537a2a51.tar.gz
Make argument mandatory
Make the `base_dir` argument mandatory to force it to be passed in from the point the function is called.
Diffstat (limited to 'gn3/db')
-rw-r--r--gn3/db/genotypes.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gn3/db/genotypes.py b/gn3/db/genotypes.py
index 6f867c7..81efda2 100644
--- a/gn3/db/genotypes.py
+++ b/gn3/db/genotypes.py
@@ -2,12 +2,12 @@
import os
import gzip
+from typing import Union
+from pathlib import Path
-from gn3.settings import GENOTYPE_FILES
-
-def build_genotype_file(
- geno_name: str, base_dir: str = GENOTYPE_FILES,
- extension: str = "geno"):
+def build_genotype_file(geno_name: str,
+ base_dir: Union[str, Path],
+ extension: str = "geno"):
"""Build the absolute path for the genotype file."""
return f"{os.path.abspath(base_dir)}/{geno_name}.{extension}"