popsim-consortium / stdpopsim

A library of standard population genetic models
GNU General Public License v3.0
124 stars 87 forks source link

Automatically run code blocks when building documentation in CI #1390

Open nspope opened 2 years ago

nspope commented 2 years ago

It's a bit tedious to go through every code block in the tutorial, check that these work, and fix them. I wonder if they could be automatically run as part of the CI. There would probably need to be some sort of caching, as the example simulations take ~10 minutes to run in some cases.

jeromekelleher commented 2 years ago

This is one of the reasons we moved to JupyterBook for msprime/tskit etc @nspope. I don't think there is a way to run this stuff well without it - but conversion is a significant task, and examples would need to be rejigged to run in much less time (since they'll be run every time the docs are built)

petrelharp commented 2 years ago

I'm happy to have a go at this at some point, as I've done it for others, but I won't get to it soon.

nspope commented 2 years ago

Makes sense! I don't think there's a rush as the examples are up-to-date with #1391, and probably won't drift too much before 0.2.1 or whatever is next.