Example-readme updated
This commit is contained in:
parent
d18ba0f785
commit
0578b552be
|
@ -1,12 +1,25 @@
|
||||||
# Example scripts
|
# Example scripts
|
||||||
|
|
||||||
|
Examples can be looked-up in the
|
||||||
|
[documentation](https://dlr-institute-of-future-fuels.github.io/gaspype/)
|
||||||
|
rendered with results.
|
||||||
|
|
||||||
|
The gaspype examples from this directory are available in the documentation as
|
||||||
|
downloadable Jupyter Notebooks or plain python scripts with comments.
|
||||||
|
|
||||||
|
The conversion is done like the following automated by the
|
||||||
|
[docs/source/render_examples.py](../docs/source/render_examples.py) script:
|
||||||
``` bash
|
``` bash
|
||||||
notedown .\docs\source\examples\soec_methane.md --to notebook --output .\docs\files\soec_methane.ipynb --run
|
# Converting markdown with code sections to Jupyter Notebook and run it:
|
||||||
|
notedown examples/soec_methane.md --to notebook --output docs/source/_autogenerated/soec_methane.ipynb --run
|
||||||
|
|
||||||
maybe: pip install ipykernel jupyter
|
# Converting the Jupyter Notebook to Markdown and a folder with image
|
||||||
maybe: python -m ipykernel install --user --name temp_kernel --display-name "Python (temp_kernel)"
|
# files placed in docs/source/_autogenerated/:
|
||||||
|
jupyter nbconvert --to markdown docs/source/_autogenerated/soec_methane.ipynb --output soec_methane.md
|
||||||
|
|
||||||
jupyter nbconvert --to markdown .\docs\files\soec_methane.ipynb --output .\docs\files\soec_methane_out.md
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
A new example Markdown file can be created from a Jupyter Notebook running
|
||||||
|
the following command:
|
||||||
|
``` bash
|
||||||
|
jupyter nbconvert --to new_example.ipynb --NbConvertApp.use_output_suffix=False --ClearOutputPreprocessor.enabled=True --output-dir examples/ --output new_example.md
|
||||||
|
```
|
Loading…
Reference in New Issue