diff --git a/doc/source/conf.py b/doc/source/conf.py index ed33047dbcd..0b7fbbdd122 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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 @@ -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. diff --git a/doc/source/contributing/environment_variables.rst b/doc/source/contributing/environment_variables.rst index 75b47d6edd2..280b2b1505d 100644 --- a/doc/source/contributing/environment_variables.rst +++ b/doc/source/contributing/environment_variables.rst @@ -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() `. * - PYFLUENT_FLUENT_DEBUG - Starts Fluent in debug mode while launching Fluent in :func:`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() `. * - PYFLUENT_FLUENT_PORT @@ -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() `. * - 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 diff --git a/doc/source/user_guide/events.rst b/doc/source/user_guide/events.rst index 5616bad1d95..8fc207219c4 100644 --- a/doc/source/user_guide/events.rst +++ b/doc/source/user_guide/events.rst @@ -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(, 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 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