Skip to content

Commit

Permalink
move fwdpy11.ezparams to tests/ (#977)
Browse files Browse the repository at this point in the history
This module was undocumented and only used
in the test suite.  Moving it is a breaking
change that is unlikely to actually break
any user scripts.
  • Loading branch information
molpopgen committed Sep 1, 2022
1 parent c2a63b7 commit d37a2cd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/quick_pops.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
# This file contains functions for quickly
# obtaining simulated populations

from ezparams import mslike


def quick_neutral_slocus(N=1000, simlen=100):
from fwdpy11.ezparams import mslike
from fwdpy11 import ModelParams
from fwdpy11 import DiploidPopulation, GSLrng
from fwdpy11 import Multiplicative
Expand All @@ -39,7 +40,6 @@ def quick_neutral_slocus(N=1000, simlen=100):


def quick_nonneutral_slocus(N=1000, simlen=100, dfe=None):
from fwdpy11.ezparams import mslike
from fwdpy11 import ModelParams
from fwdpy11 import DiploidPopulation, GSLrng
from fwdpy11 import evolvets
Expand Down
6 changes: 3 additions & 3 deletions tests/test_custom_stateless_fitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unittest

import fwdpy11
import fwdpy11.ezparams
from ezparams import mslike

import custom_additive as ca
import custom_stateless_genotype as general
Expand All @@ -12,7 +12,7 @@ class testCustomAdditive(unittest.TestCase):
@classmethod
def setUp(self):
self.pop = fwdpy11.DiploidPopulation(1000, 1.0)
self.pdict = fwdpy11.ezparams.mslike(
self.pdict = mslike(
self.pop, dfe=fwdpy11.ExpS(0, 1, 1, -0.05), pneutral=0.95, simlen=10
)
self.pdict["gvalue"] = ca.additive()
Expand All @@ -33,7 +33,7 @@ class testGeneralModule(unittest.TestCase):
@classmethod
def setUp(self):
self.pop = fwdpy11.DiploidPopulation(1000, 1.0)
self.pdict = fwdpy11.ezparams.mslike(
self.pdict = mslike(
self.pop,
dfe=fwdpy11.ConstantS(0, 1, 1, -0.05, 0.05),
pneutral=0.95,
Expand Down
5 changes: 2 additions & 3 deletions tests/test_stateful_fitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import numpy as np

import fwdpy11 as fp11
import fwdpy11.ezparams
import snowdrift


Expand Down Expand Up @@ -54,12 +53,12 @@ def evolve_snowdrift(args):
"gvalue": snowdrift.DiploidSnowdrift(0.2, -0.2, 1, -2, 1, 0.3),
# evolve for 100 generations so that unit tests are
# fast
"demography": fwdpy11.DiscreteDemography(),
"demography": fp11.DiscreteDemography(),
"simlen": 20,
"rates": (0.0, 0.0025, 0.001),
"prune_selected": False,
}
params = fwdpy11.ModelParams(**p)
params = fp11.ModelParams(**p)
sampler = SamplePhenotypes(params.gvalue, 1, 0.3)
fp11.evolvets(rng, pop, params, 100, sampler)
# return our pop
Expand Down

0 comments on commit d37a2cd

Please sign in to comment.