EMAworkbench icon indicating copy to clipboard operation
EMAworkbench copied to clipboard

Create overview/docs of examples

Open EwoutH opened this issue 3 years ago • 1 comments

Currently there is no overview of which example show what. This could be in a readme.md and/or readthedocs page.

https://github.com/quaquel/EMAworkbench/tree/master/ema_workbench/examples

EwoutH avatar Aug 31 '22 09:08 EwoutH

This will be a main project for 2.4.0.

EwoutH avatar Oct 25 '22 10:10 EwoutH

Started thinking about this. It is relatively easy to autogenerate an examples page in the documentation with links to each example.

In conf.py, or a separate new .py file called from conf.py, you loop over all the .py files in the examples folder. For each file, you auocreate an .rst file with the literalinclude directive.

In a seperate examples.rst, you add a list with a toctree with all the autogenerated rst files. This is most easily done by creating the basic examples.rst, but from the new .py file overwrite the toctree part with the list of examples.

does this make sense?

The only minor drawback is that there is no easy way to add further structure to the toctre (e.g., organize examples by functionality they showcase).

quaquel avatar Mar 07 '23 07:03 quaquel

Have a first attempt up and running as part of https://github.com/quaquel/EMAworkbench/tree/examples_docs. Added it to readthedocs as well so docs should be available for viewing within a few minutes. The docs worked locally.

So the build docs can be found here.

Looks fine as far as I can tell, except that I want to check the character width of the literalinclude directive. It seems by default it is set to 80, so you need to scroll sideways for some examples.

quaquel avatar Apr 03 '23 19:04 quaquel

Nice, this is a great first step!

Next is also including the .ipynb Jupyter Notebooks I think.

EwoutH avatar Apr 03 '23 19:04 EwoutH

Closed with #244

quaquel avatar Apr 07 '23 18:04 quaquel