Skip to content

Commit

Permalink
docs: event streaming callback
Browse files Browse the repository at this point in the history
  • Loading branch information
mkundu1 committed Dec 3, 2024
1 parent c6319dd commit 7b27d14
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
19 changes: 9 additions & 10 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@

toggleprompt_offset_right = 35

skip_examples = int(os.getenv("PYFLUENT_SKIP_EXAMPLES_DOC", 0))
if skip_examples:
pass
else:
if os.getenv("PYFLUENT_DOC_SKIP_EXAMPLES") != "1":
extensions.append("sphinx_gallery.gen_gallery")

typehints_document_rtype = False
Expand Down Expand Up @@ -197,14 +194,16 @@ def _stop_fluent_container(gallery_conf, fname):
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
"navigation_depth": -1,
"collapse_navigation": True,
# "cheatsheet": {
# "file": "cheatsheet/cheat_sheet.qmd",
# "pages": ["index", "getting_started/index", "user_guide/index"],
# "title": "PyFluent cheat sheet",
# "version": __version__,
# },
}

if os.getenv("PYFLUENT_DOC_SKIP_CHEATSHEET") != "1":
html_theme_options["cheatsheet"] = {
"file": "cheatsheet/cheat_sheet.qmd",
"pages": ["index", "getting_started/index", "user_guide/index"],
"title": "PyFluent cheat sheet",
"version": __version__,
}

# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
Expand Down
6 changes: 4 additions & 2 deletions doc/source/contributing/environment_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Following is a list of environment variables that can be set to control various
- Specifies the path inside the container where the host path is mounted while starting a Fluent container in :func:`launch_fluent() <ansys.fluent.core.launcher.launcher.launch_fluent>`.
* - PYFLUENT_FLUENT_DEBUG
- Starts Fluent in debug mode while launching Fluent in :func:`launch_fluent() <ansys.fluent.core.launcher.launcher.launch_fluent>`.
* - PYFLUENT_DOC_SKIP_CHEATSHEET:
- Skips the generation of cheatsheet.
* - PYFLUENT_DOC_SKIP_EXAMPLES
- Skips the generation of examples documentation.
* - PYFLUENT_FLUENT_IP
- Specifies the IP address of the Fluent server in :func:`connect_to_fluent() <ansys.fluent.core.launcher.launcher.connect_to_fluent>`.
* - PYFLUENT_FLUENT_PORT
Expand All @@ -47,8 +51,6 @@ Following is a list of environment variables that can be set to control various
- Shows the Fluent GUI while launching Fluent in :func:`launch_fluent() <ansys.fluent.core.launcher.launcher.launch_fluent>`.
* - PYFLUENT_SKIP_API_UPGRADE_ADVICE
- Disables printing of TUI to settings API upgrade advice.
* - PYFLUENT_SKIP_EXAMPLES_DOC
- Skips the generation of examples documentation.
* - PYFLUENT_TIMEOUT_FORCE_EXIT
- Enables force exit while exiting a Fluent session and specifies the timeout in seconds.
* - PYFLUENT_WATCHDOG_DEBUG
Expand Down
8 changes: 4 additions & 4 deletions doc/source/user_guide/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ The following code triggers a callback at the end of every iteration.
>>>
>>> callback_id = solver.events.register_callback(SolverEvent.ITERATION_ENDED, on_iteration_ended)
The general signature of the callback function is cb(\*args, session, event_info), where session is the session instance
and event_info instance holds information about the event. The event_info classes for each event are documented in the
The general signature of the callback function is ``cb(<optional arguments>, session, event_info)``, where ``session`` is the session instance
and ``event_info`` instance holds information about the event. The event information classes for each event are documented in the
API reference of the :obj:`~ansys.fluent.core.streaming_services.events_streaming` module. See the callback function
on_case_loaded_with_args() in the below examples for an example of how to pass additional arguments to the callback
function via the args parameter.
``on_case_loaded_with_args()`` in the below examples for an example of how to pass optional arguments to the callback
function.


Examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from ansys.fluent.core.warnings import PyFluentDeprecationWarning

__all__ = [
"EventsManager",
"Event",
"SolverEvent",
"MeshingEvent",
Expand Down

0 comments on commit 7b27d14

Please sign in to comment.