Hi Björn, On Thu, Apr 7, 2016 at 4:09 AM, Björn Dahlgren <[email protected]> wrote: > > > On Sunday, 30 August 2015 23:00:43 UTC+2, Aaron Meurer wrote: >> >> That sounds like a good idea. Having them in a separate repo would make it >> less of a big deal to include inline plots in the notebooks. > > > Yes, I have strong feelings against checking in any inline plots (or > generated binary data in general) into the SymPy repository. > The issue recently surfaced here: https://github.com/sympy/sympy/pull/10869 > > Regarding doctesting the actual notebooks: I have been doing this in my > projects for a while (rendering notebooks as part of CI process, thus never > checking in any output data). See e.g. > http://hera.physchem.kth.se/~chempy/branches/master/examples/ for an > example. > The rendering (and testing) is achieved by using nbconvert: > > ipython2 nbconvert --to=html --debug --ExecutePreprocessor.enabled=True > *.ipynb > > In case someone wants to try to set this up (the CI servers would need to > push artifacts somewhere on success).
I converged to the same workflow. I write a simulation code in Fortran (check into git), which generates a log file (not checked in). Then I have an jupyter notebook that parses the log file and generates graphs. I check in the notebook, but without output cells. Then it's small, the "git diff" is very readable (say if I improve a plot in a new commit) etc. Finally, and I don't have it setup yet, the goal is for the CI to run the test (Fortran code) on some very small problem (for example, if I use FFT and I need 256^3 and 20,000 time steps to get fully converged results, I would run it with 16^3 PW and 20 time steps, so that it runs in few seconds), and then I test the notebook that it runs using nbconvert, exactly as you posted, to check that the analysis still runs. That way things should be 100% robust, and I can regenerate the graphs any time I want, yet no big files or binary blobs are checked into a git repository. Ondrej -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CADDwiVCGTNz-aEsOBkvep9Sz7AXsN8AKeRJ%3Dx9H2B_uDU6dU6g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
