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 16dd404
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 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
4 changes: 2 additions & 2 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
The general signature of the callback function is cb(<additional arguments>, session, event_info), where session is the session instance

Check failure on line 28 in doc/source/user_guide/events.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/events.rst#L28

[Vale.Spelling] Did you really mean 'event_info'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'event_info'?", "location": {"path": "doc/source/user_guide/events.rst", "range": {"start": {"line": 28, "column": 87}}}, "severity": "ERROR"}
and event_info instance holds information about the event. The event_info classes for each event are documented in the

Check failure on line 29 in doc/source/user_guide/events.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/events.rst#L29

[Vale.Spelling] Did you really mean 'event_info'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'event_info'?", "location": {"path": "doc/source/user_guide/events.rst", "range": {"start": {"line": 29, "column": 5}}}, "severity": "ERROR"}

Check failure on line 29 in doc/source/user_guide/events.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/events.rst#L29

[Vale.Spelling] Did you really mean 'event_info'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'event_info'?", "location": {"path": "doc/source/user_guide/events.rst", "range": {"start": {"line": 29, "column": 64}}}, "severity": "ERROR"}
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.
function.


Examples
Expand Down

0 comments on commit 16dd404

Please sign in to comment.