You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have the code in the docs actually execute and produce output, presumably by transferring the docs to the tskit-docs Jupyter-book format.
One nice thing is that, if we have access to a SLiM executable, we can easily run the SLiM examples by defining our own cell magic, as follows:
oooo, this would be nice (and magic). I suggested on slack that the file still live outside the notebook, but I guess this is better because you can then edit it and re-run inside of the notebook.
I've switched over to jupyterbook, but have not done this magic. It's kinda nice to have a separate .slim script so that you can run slim on it more easily? I'm going to close this, but feel free to re-open (and/or go ahead and do it) if you think it's worthwhile.
OK, here's nicer Jupyterbook code to get the book to execute a SLiM file and also display the contents. I've prettified it by adding the filename on the top left:
Activity
jeromekelleher commentedon Feb 5, 2021
Very neat. Could you tell pygments to treat the SLiM cells a bit like R for code highlighting (I assume R is the closest common language?)
petrelharp commentedon Feb 5, 2021
oooo, this would be nice (and magic). I suggested on slack that the file still live outside the notebook, but I guess this is better because you can then edit it and re-run inside of the notebook.
petrelharp commentedon Jun 4, 2021
I've switched over to jupyterbook, but have not done this magic. It's kinda nice to have a separate .slim script so that you can run slim on it more easily? I'm going to close this, but feel free to re-open (and/or go ahead and do it) if you think it's worthwhile.
hyanwong commentedon Dec 7, 2021
OK, here's nicer Jupyterbook code to get the book to execute a SLiM file and also display the contents. I've prettified it by adding the filename on the top left:
Screenshot from a jupyterbook