Skip to content

fix: geneset() and snp_dataset() are deprecated but emit no DeprecationWarning #1285

@Tanisha127

Description

@Tanisha127

Problem

geneset() and snp_dataset() have docstrings saying they are deprecated,
but they never call warnings.warn(). Users get zero indication at runtime
that they should switch to the new methods.

Steps to Reproduce

import warnings
warnings.simplefilter("always")
ag3.geneset()      # no DeprecationWarning raised
ag3.snp_dataset()  # no DeprecationWarning raised

Expected Behaviour

Both methods should raise DeprecationWarning pointing users to the
replacement methods genome_features() and snp_calls().

Files Affected

  • malariagen_data/anoph/genome_features.pygeneset()
  • malariagen_data/anoph/snp_data.pysnp_dataset()

Fix

Added warnings.warn(..., DeprecationWarning, stacklevel=2) to both methods.

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