visit icon indicating copy to clipboard operation
visit copied to clipboard

Test and document quickrecipes

Open markcmiller86 opened this issue 4 years ago • 2 comments

Describe what needs to be documented.

We have a quickrecipes.rst which is, mostly (410 lines out of 1020 or 40%) python code...

% cat quickrecipes.rst | grep '^    ' | wc -l
     410
% cat quickrecipes.rst | wc -l
    1020

None of it is tested. How do we keep it up to date?

The solution is to turn all of the python code there into one or more src/test/tests/quickrecipies/*.py files and then literinclude the code blocks in those files in quickrecpes.rst very much like we do here...

https://github.com/visit-dav/visit/blob/0c18d465357df6bbd76ccf1ec4b354f653ddf3fa/src/doc/gui_manual/Quantitative/Expressions.rst#L789-L794

for tensor expressions which then appears in documentation like so (go to the Hide/Show Code Block arrow) Note that in Expressions.rst I choose to .. container:: collapsible which is not necessary here.

As an aside...I challenge anyone to figure out how I created the above permalink to that file 🤣 (hint: GitHub isn't rendering .rst files with line numbers with those helpful little elipsis next to them).

markcmiller86 avatar Jul 02 '21 01:07 markcmiller86

Take a look at what I did in #17452 there is a good example there of how to have tested .py code also be part of the documentation.

markcmiller86 avatar Mar 13 '22 01:03 markcmiller86

Ok, I am going to assign this one and try to get all qr code into a new test category, quick_recipes and then have that tested code appear in the docs as we want.

markcmiller86 avatar Aug 26 '22 20:08 markcmiller86