Skip to content

Commit

Permalink
Merge branch 'develop' into mcm86-04oct24-methdoc-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
markcmiller86 committed Oct 4, 2024
2 parents 762492d + 84db3b8 commit 33e2f89
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
4 changes: 4 additions & 0 deletions src/doc/dev_manual/UpdatingPythonDocStrings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The Python doc strings for most functions in VisIt_'s scripting interface are ge
This allows us to have a single source for both our scripting interface sphinx docs and the doc strings embedded in VisIt_'s compiled Python module.
The ``functions_to_method_doc.py`` helper script generates ``MethodDoc.C`` from the examples embedded in the rst source.

When editing any of these ``.rst`` files, it is important to maintain consistency with existing formatting.
For each function documented there, it is important to use the same heading levels with the same heading names, the same indentation, etc., etc.
If there is nothing to include for a particular heading, still including the heading but with a body indicating ``Nothing more`` or something to that effect.

The Python doc strings for Attribute objects and Events are extracted from the scripting interface for use in the Python scripting sphinx docs.
The ``sphinx_cli_extractor.py`` runs VisIt to generate ``python_scripting/attributes.rst`` and ``python_scripting/events.rst``.

Expand Down
23 changes: 13 additions & 10 deletions src/doc/python_scripting/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,15 @@ variableName : string

inheritSIL : integer
An integer flag indicating whether the plot should inherit the
active plot's SIL restriction.
active plot's SIL restriction. A zero value indicates that the SIL
should **not** be inherited. A non-zero value indicates that the SIL
should be inherited.

applyOperators : integer
An integer flag indicating whether the operators from the active
plot should be applied to the new plot.
plot should be applied to the new plot. A zero value indicates that
the operators should **not** be applied. A non-zero value indicates that
the operators should be applied.

return type : CLI_return_t
The AddPlot function returns an integer value of 1 for success and 0 for
Expand Down Expand Up @@ -4342,14 +4346,16 @@ return type : dictionary
For example, a Curve plot will return the xy pairs that comprise the curve.
The tuple is arranged <x1, y1, x2, y2, ..., xn, yn>.

For time queries that create multiple curves, e.g. Time Pick with multiple variables, the dictionary contains a 'Curves' object, and each curve is referenced by it's associated variable name.
This was introduced in VisIt 3.4.1.
For time queries that create multiple curves, e.g. Time Pick with multiple
variables, the dictionary contains a 'Curves' object, and each curve is
referenced by it's associated variable name. This was introduced in
VisIt 3.4.1.


**Single Curve Example:**
**Example:**

::

# Single curve example
#% visit -cli
OpenDatabase("/usr/gapps/visit/data/rect2d.silo")
AddPlot("Pseudocolor", "d")
Expand All @@ -4360,10 +4366,7 @@ return type : dictionary
lineout = info["Curve"]
print("The first lineout point is: [%g, %g] " % lineout[0], lineout[1])

**Multiple Curve Example:**

::

# Multiple curve example
#% visit -cli
OpenDatabase("/usr/gapps/visit/data/wave.visit")
AddPlot("Pseudocolor", "pressure")
Expand Down
22 changes: 11 additions & 11 deletions src/visitpy/common/MethodDoc.C
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,14 @@ const char *visit_AddPlot_doc =
" A valid variable name for the open database.\n"
"inheritSIL : integer\n"
" An integer flag indicating whether the plot should inherit the\n"
" active plot's SIL restriction.\n"
" active plot's SIL restriction. A zero value indicates that the SIL\n"
" should **not** be inherited. A non-zero value indicates that the SIL\n"
" should be inherited.\n"
"applyOperators : integer\n"
" An integer flag indicating whether the operators from the active\n"
" plot should be applied to the new plot.\n"
" plot should be applied to the new plot. A zero value indicates that\n"
" the operators should **not** be applied. A non-zero value indicates that\n"
" the operators should be applied.\n"
"\n"
"\n"
"Returns:\n"
Expand Down Expand Up @@ -3653,12 +3657,9 @@ const char *visit_GetLastMessage_doc =
"\n"
"GetLastMessage() -> (message, severity)\n"
"GetLastMessage(int-clr) -> (message, severity)\n"
"\n"
"\n"
"Returns:\n"
"\n"
" GetLastMessage returns a tuple containing 2 strings, the last message and its severity.\n"
" If int-clr is present and is non-zero, once the message is retrieved it is also cleared.\n"
"GetLastMessage returns a tuple containing 2 strings, the last message and its severity.\n"
"If int-clr is present and is non-zero, once the message is retrieved it is also cleared.\n"
"\n"
"\n"
"Description:\n"
Expand Down Expand Up @@ -4193,8 +4194,9 @@ const char *visit_GetPlotInformation_doc =
"VisIt 3.4.1.\n"
"\n"
"\n"
"Single Curve Example:\n"
"Example:\n"
"\n"
"# Single curve example\n"
"#% visit -cli\n"
"OpenDatabase(\"/usr/gapps/visit/data/rect2d.silo\")\n"
"AddPlot(\"Pseudocolor\", \"d\")\n"
Expand All @@ -4204,9 +4206,7 @@ const char *visit_GetPlotInformation_doc =
"info = GetPlotInformation()\n"
"lineout = info[\"Curve\"]\n"
"print(\"The first lineout point is: [%g, %g] \" % lineout[0], lineout[1])\n"
"\n"
"Multiple Curve Example:\n"
"\n"
"# Multiple curve example\n"
"#% visit -cli\n"
"OpenDatabase(\"/usr/gapps/visit/data/wave.visit\")\n"
"AddPlot(\"Pseudocolor\", \"pressure\")\n"
Expand Down

0 comments on commit 33e2f89

Please sign in to comment.