Skip to content

Commit

Permalink
Deprecate unused kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmore500 committed May 18, 2024
1 parent 5fb2d63 commit 783334a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/dendropy/simulate/popgensim.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import copy

from dendropy.utility import GLOBAL_RNG
from dendropy.utility import deprecate
from dendropy.interop import seqgen
from dendropy.model import discrete
from dendropy.model import coalescent
Expand Down Expand Up @@ -67,7 +68,12 @@ def generate_sequences(self,
species_name,
samples_per_pop=10,
seq_len=2000,
use_seq_gen=True):
use_seq_gen=None):
if use_seq_gen is not None:
deprecate.dendropy_deprecation_warning(
message="Argument use_seq_gen is deprecated as of Dendropy 5. "
"Note that in previous versions of Dendropy, it was ignored and had no effect.",
)

self.generate_pop_tree(species_name=species_name, samples_per_pop=samples_per_pop)
self.generate_gene_tree(species_name=species_name, samples_per_pop=samples_per_pop)
Expand Down Expand Up @@ -96,7 +102,13 @@ def generate_sequences(self,
d.add_char_matrix(char_matrix)
return d

def generate_pop_tree(self, species_name, samples_per_pop=10):
def generate_pop_tree(self, species_name, samples_per_pop=None):
if samples_per_pop is not None:
deprecate.dendropy_deprecation_warning(
message="Argument samples_per_pop is deprecated as of Dendropy 5. "
"Note that in previous versions of Dendropy, it was ignored and had no effect.",
)

tree_data = { 'sp': species_name, 'divt': self.div_time_gens }
desc_lineages = []
for i in range(self.num_desc_pops):
Expand Down

0 comments on commit 783334a

Please sign in to comment.