From de65a31777ae824d7e72b34120e02940c5b604e5 Mon Sep 17 00:00:00 2001 From: Ziad Kassem Date: Fri, 3 Apr 2026 23:15:50 +0200 Subject: [PATCH] add DeprecationWarning to geneset() and snp_dataset() --- malariagen_data/anoph/genome_features.py | 8 +++++++- malariagen_data/anoph/snp_data.py | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/malariagen_data/anoph/genome_features.py b/malariagen_data/anoph/genome_features.py index 44bdc9a0b..194ce560d 100644 --- a/malariagen_data/anoph/genome_features.py +++ b/malariagen_data/anoph/genome_features.py @@ -1,3 +1,4 @@ +import warnings from typing import Dict, Optional, Tuple, Mapping import bokeh.models @@ -53,7 +54,12 @@ def _geneset_gff3_path(self): return self.config["GENESET_GFF3_PATH"] def geneset(self, *args, **kwargs): # pragma: no cover - """Deprecated, this method has been renamed to genome_features().""" + """Deprecated, use genome_features() instead.""" + warnings.warn( + "geneset() has been renamed to genome_features() - please update your code.", + DeprecationWarning, + stacklevel=2, + ) return self.genome_features(*args, **kwargs) def _genome_features(self, *, attributes: Tuple[str, ...]): diff --git a/malariagen_data/anoph/snp_data.py b/malariagen_data/anoph/snp_data.py index e0be4a228..0910d238d 100644 --- a/malariagen_data/anoph/snp_data.py +++ b/malariagen_data/anoph/snp_data.py @@ -1279,7 +1279,12 @@ def _snp_calls( return ds def snp_dataset(self, *args, **kwargs): # pragma: no cover - """Deprecated, this method has been renamed to snp_calls().""" + """Deprecated, use snp_calls() instead.""" + warnings.warn( + "snp_dataset() has been renamed to snp_calls() - please update your code.", + DeprecationWarning, + stacklevel=2, + ) return self.snp_calls(*args, **kwargs) def _prep_region_cache_param(