From 27353fa85655c118750e9ea9a0ae06563814d353 Mon Sep 17 00:00:00 2001 From: Mainak Kundu Date: Wed, 8 Apr 2026 19:53:27 +0530 Subject: [PATCH 1/2] fix: Safely populate report-def-changed/plot-set-changed event-info --- .../core/streaming_services/events_streaming.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ansys/fluent/core/streaming_services/events_streaming.py b/src/ansys/fluent/core/streaming_services/events_streaming.py index a73c30aa000..50ee873623e 100644 --- a/src/ansys/fluent/core/streaming_services/events_streaming.py +++ b/src/ansys/fluent/core/streaming_services/events_streaming.py @@ -193,20 +193,24 @@ class IterationEndedEventInfo(EventInfoBase, event=SolverEvent.ITERATION_ENDED): index: int +@dataclass class CalculationsStartedEventInfo( EventInfoBase, event=SolverEvent.CALCULATIONS_STARTED ): """Information about the event triggered when calculations are started.""" +@dataclass class CalculationsEndedEventInfo(EventInfoBase, event=SolverEvent.CALCULATIONS_ENDED): """Information about the event triggered when calculations are ended.""" +@dataclass class CalculationsPausedEventInfo(EventInfoBase, event=SolverEvent.CALCULATIONS_PAUSED): """Information about the event triggered when calculations are paused.""" +@dataclass class CalculationsResumedEventInfo( EventInfoBase, event=SolverEvent.CALCULATIONS_RESUMED ): @@ -265,12 +269,14 @@ class DataLoadedEventInfo(EventInfoBase, event=SolverEvent.DATA_LOADED): data_file_name: str = field(metadata=dict(deprecated_name="datafilepath")) +@dataclass class AboutToInitializeSolutionEventInfo( EventInfoBase, event=SolverEvent.ABOUT_TO_INITIALIZE_SOLUTION ): """Information about the event triggered just before solution is initialized.""" +@dataclass class SolutionInitializedEventInfo( EventInfoBase, event=SolverEvent.SOLUTION_INITIALIZED ): @@ -291,12 +297,14 @@ class ReportPlotSetUpdatedEventInfo( """Information about the event triggered when a report plot set is updated.""" +@dataclass class ResidualPlotUpdatedEventInfo( EventInfoBase, event=SolverEvent.RESIDUAL_PLOT_UPDATED ): """Information about the event triggered when residual plots are updated.""" +@dataclass class SettingsClearedEventInfo(EventInfoBase, event=SolverEvent.SETTINGS_CLEARED): """Information about the event triggered when settings are cleared.""" @@ -409,7 +417,10 @@ def _construct_event_info( solver_event = SolverEvent(event.value) event_info_cls = EventInfoBase.derived_classes.get(solver_event) # Key names can be different, but their order is the same - return event_info_cls(*event_info_dict.values()) + kwargs = { + f.name: v for f, v in zip(fields(event_info_cls), event_info_dict.values()) + } + return event_info_cls(**kwargs) def _process_streaming( self, service, id, stream_begin_method, started_evt, *args, **kwargs From bdfd5ef3f2634d2ed82fee0256087e267e876614 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 8 Apr 2026 14:38:42 +0000 Subject: [PATCH 2/2] chore: adding changelog file 5060.fixed.md [dependabot-skip] --- doc/changelog.d/5060.fixed.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/5060.fixed.md diff --git a/doc/changelog.d/5060.fixed.md b/doc/changelog.d/5060.fixed.md new file mode 100644 index 00000000000..8a81e4c23de --- /dev/null +++ b/doc/changelog.d/5060.fixed.md @@ -0,0 +1 @@ +Safely populate report-def-changed/plot-set-changed event-info