Skip to content

Add type hints and comprehensive docstrings to utility functions in util.py #1141

@aadi-9

Description

@aadi-9

Problem

Hi,
As a new user interested in this project for GSOC 2026, I noticed several utility functions in malariagen_data/util.py lack complete type hints and/or have minimal or missing docstrings. This makes the code harder to understand, maintain, and use in new functionality—especially for natural-language interfaces and other tools that need to understand parameter and return types.

Affected functions:

  • _true_runs()
  • _hash_params()
  • _jitter()
  • _value_error()
  • _da_concat()
  • _jackknife_ci()
  • _pdist_abs_hamming()

Proposed Solution

Add type hints (PEP 484) and NumPy-style docstrings to all listed functions, following the project's numpydoc format.

Impact

•Improves code clarity and IDE support
•Helps contributors understand function purpose and usage
•Supports type checking tools (mypy)
•Enables better natural-language interface development
•Aligns with project code style guidelines

This contributes to overall code quality and maintainability

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions