- Notebooks are stored in version control system (git) without output.
Makefile
is used to keep all prescriptions for bulting pdf/html etc.- All notebooks which are going to be included in pdf-book have to start with number, e.g.:
01-*.ipynb
nbconvert
is used to automatically execute and clean notebooks.- It will work with different Jupyter kernels: we tested against SageMath and Python.
- Notebook will use
PDF
environment variable to distinguish between interactive output or static one. In thePython
process is it easily accesible asos.environ['PDF']
. This can be an option when using interactive features like@interact
in Sage, which should be replaced by static figures in pdf format. SeeMakefile
for imlementation details. - All cells with tags
nbtest
will be removed from pdf or html output. This mechanism can be used for regression testing i.e. some tests can be placed in cells which will be removed from pdf-book output automatically. SeeMakefile
for implementation details. - We will include
Dockerfile
which allows to run a given repository on mybinder service.
- Clone this repository.
- Setup your environment according to your needs (e.g. modify requirements.txt)
- Check following commands:
make pdf
- execute notebooks using nbconvert and assemble pdf file using bookbook scripts.make html
- execute notebooks using nbconvert and assemble html versionmake clear_output
- removes output from all source files.make clean
- remove html files and executed notebooksnotebooks4pdf/
, except pdf-file
Notebooks after execution are stored in notebooks4pdf/
temporary subfolder, which might be usefull for debugging. Note that the source version of notebooks are in main direcory.
This package was created as part of the Horizon 2020 European Research Infrastructure project OpenDreamKit (grant agreement #676541). |