Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial outline of simple models. #202

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jeromekelleher
Copy link
Member

We want easy ways to create standard models. This is a first pass for discussion. Use like

import demes

# 10 population island model, each of size 100
g1 = demes.models.island_model([100] * 10, migration_rate=0.1)
# 3 population stepping stone model, of size 10, 20 and 30
g2 = demes.models.stepping_stone([10, 20, 30], migration_rate=0.1)

Using the demes.models namespace here seems like a nice way to do this.

@grahamgower
Copy link
Member

That looks nice and clean, and I think the demes.models namespace is a good one. It probably does belong here in Demes, but in any event I'll link to the related stdpopsim issue.

@jeromekelleher
Copy link
Member Author

Great, I'll add some tests. Generic models always seemed like bloat in stdpopsim to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants