From ef45d22628bd06c0282bd586206bc3494773f132 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 14 Oct 2026 16:23:41 -0500 Subject: Refactor design to allow processing file with multiple processes. If the file is larger (in bytes) than the value set in the `FILE_SIZE_THRESHOLD` constant, then the file will be chunked and processed with multiple processes, using the multiprocessing library, otherwise, it will be processed in a single-thread process. --- scripts/genotypes/types.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/genotypes/types.py') diff --git a/scripts/genotypes/types.py b/scripts/genotypes/types.py index 7f0e6cb..d765fe5 100644 --- a/scripts/genotypes/types.py +++ b/scripts/genotypes/types.py @@ -56,9 +56,14 @@ class UntransposedLineDetails: @dataclass(frozen=True) class FileStats:# pylint: disable=[too-many-instance-attributes] """Custom file statistics.""" + total_lines: int data_lines: int geno_symbols: Sequence[str] + comment_lines: int = 0 + blank_lines: int = 0 + dot_geno_lines: int = 0 + dot_geno_fields: Optional[DotGenoFields] = None samples_list: Sequence[str] = field(default_factory=tuple) markers_list: Sequence[str] = field(default_factory=tuple) errors: Sequence[LineError] = field(default_factory=tuple) -- cgit 1.4.1