Contributing To VisIt CLI Documentation


We are still refining this procedure!

The Python doc strings for most functions in VisIt’s cli are generated from the examples embedded in the cli_manual/functions.rst file. This allows us to have a single source for both our CLI sphinx docs and the doc strings embedded in VisIt’s compiled Python module. The helper script generates MethodDoc.C from the examples embedded in the rst source.

The Python doc strings for Attribute objects and Events are extracted from the CLI for use in the CLI sphinx docs. The runs VisIt to generate cli_manual/attributes.rst and cli_manual/events.rst

Steps to update the CLI Manual

  1. Modify cli_manual/functions.rst

  2. Run to generate

  3. Run 2to3 -p to check for Python syntax errors and Python 3 compatibly

  4. Run to regenerate MethodDoc.C

  5. Build and run the VisIt cli and assure yourself help(<your-new-func-doc>) produces the desired output

  6. Run the tool producing new attributes.rst and events.rst files. To do so, you may need to use a combination of the PATH and PYTHONPATH environment variables to tell the script where to find the VisIt module, visit in VisIt’s site-packages and where to find the Python installation that that module is expecting to run with. In addition, you may need to use the PYTHONHOME environment variable to tell VisIt’s visit module where to find standard Python libraries. For example, to use an installed version of VisIt on my OSX machine, the command would look like…

    env PATH=/Applications/$PATH \
    PYTHONHOME=/Applications/ \
    PYTHONPATH=/Applications/ \

    Note that the above command would produce CLI documentation for version 2.13.3 of VisIt. Or, to use a current build of VisIt on which you are working on documentation related to changes you have made to VisIt, the command would look something like…

    env PATH=../../build/third_party/python/2.7.14/i386-apple-darwin17_clang/bin:../../build/visit/build/bin:$PATH \
    PYTHONPATH=../../build/visit/build/lib/site-packages/ \

    The whole process only takes a few seconds.

  7. Assuming you successfully ran the above command, producing new attributes.rst and events.rst files, then do a local build of the documentation here and confirm there are no errors in the build

    sphinx-build -b html . _build -a
  8. Then open the file, _build/index.html, in your favorite browser to view.

  9. Add all the changed files to a commit and push to GitHub

  10. The GitHub integration with ReadTheDocs should result in your documentation updates going live a short while (<15 mins) after it has been merged to develop.