QuantEcon / sphinxcontrib-jupyter

A Sphinx Extension for Generating Jupyter Notebooks
BSD 3-Clause "New" or "Revised" License
77 stars 23 forks source link

FEAT: Add support for solutions class #72

Closed mmcky closed 6 years ago

mmcky commented 6 years ago

This PR adds the capability to specify a code block as a solution using :class: solution. These solution blocks can then be included or excluded during the conversion from RST to IPYNB.

mmcky commented 6 years ago

Can we introduce a context manager? We will also need to know what to compare so may need to introduce a configuration matrix such that:

jupyter_drop_solutions = True  :  solutions_2.ipynb

otherwise we can generate conf.py from a template and use yaml for specifying a CI configuration set of tests:

A:
   sphinxcontrib-jupyter:
        options : { jupyter_drop_solutions = True }
        ipynb : {solutions_2.ipynb }
mmcky commented 6 years ago

merging this now to allow development of a related feature for adding code test blocks. Merging this will prevent a future merge conflict. @arnavs you can still view the diff of this PR from the closed list. I will add an issue for testing improvements.