- Notebooks are stored in version control system (git) without output.
Makefileis 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 nbconvertis used to automatically execute and clean notebooks.- It will work with different Jupyter kernels: we tested against SageMath and Python.
- Notebook will use
PDFenvironment variable to distinguish between interactive output or static one. In thePythonprocess is it easily accesible asos.environ['PDF']. This can be an option when using interactive features like@interactin Sage, which should be replaced by static figures in pdf format. SeeMakefilefor imlementation details. - All cells with tags
nbtestwill 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. SeeMakefilefor implementation details. - We will include
Dockerfilewhich 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). |