Repository navigation
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
… feature_monitor
|
Nice addition! This complements the terminal tool from #2879 (su2live) well: SU2_MON covers the windowed case, and su2live covers headless runs over SSH, where there’s no display and often no PyQt5/matplotlib. It also classifies the run (converging with an ETA, stalled, limit-cycling, diverging). Once this is in, would you be open to a follow-up PR adding a terminal counterpart in bin/? I could do it as a single stdlib-only script next to monitor.py, or as a --terminal mode of SU2_MON, whichever you prefer. |
rois1995
left a comment
There was a problem hiding this comment.
Please address the three inline findings before merging.
The monitor also needs installation entries: neither SU2_MON nor monitor.py is included in the Meson install paths, so the normal prefix/bin installation does not contain the new command. Please install both with the launcher’s executable permission and relative module path preserved.
Please add small manufactured-history tests covering the header formats, sparse iteration values, reset/cache behavior, incremental append, and incomplete lines, plus a short dependency and launch note.
Validation: the exact reader and plotting methods were exercised with a real Matplotlib Agg canvas. Ten checks passed; four failing behavior assertions reproduced the three inline issues. Installation was checked statically.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Parse the separate VARIABLES line of TECPLOT histories, plot and filter against the iteration column, advance the reader version on reset, add manufactured-history tests, and install SU2_MON and monitor.py with meson. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ith 'import' and 'import from'' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
Meson: monitor.py and SU2_MON are installed to bindir from SU2_PY/meson.build, and the launcher keeps its executable bit and relative path. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… feature_monitor
|
@rois1995 anything left? |
rois1995
left a comment
There was a problem hiding this comment.
The original reproductions now pass. Please address the remaining P2 inline findings before approval; the P3 comments are smaller plotting corrections.
| "PyQt5.QtWidgets", | ||
| "matplotlib.backends.backend_qt5agg", | ||
| ): | ||
| sys.modules.setdefault(module, unittest.mock.MagicMock()) |
There was a problem hiding this comment.
[P2] Import unittest.mock explicitly before using it
A fresh python3 SU2_PY/tests/test_monitor.py exits here with AttributeError: module 'unittest' has no attribute 'mock', before running any tests. Importing unittest alone does not load its mock submodule.
Please add import unittest.mock. Preloading that import in the runner lets all seven tests pass, so this has a one-line fix.
| if zone.startswith(b"ZONE") and zone.endswith(b"\n"): | ||
| offset = f.tell() | ||
| elif zone and not zone.endswith(b"\n") and b"ZONE".startswith(zone): | ||
| return |
There was a problem hiding this comment.
[P3] Wait for the full optional ZONE line
If the optional line currently ends at ZONE T="Conv without a newline, b"ZONE".startswith(zone) is false because zone is longer than ZONE. The reader commits its header offset before this metadata line. Completing the line and appending numeric rows then leaves the reader stuck at the ZONE text, with zero rows loaded.
Please defer any incomplete line that begins with ZONE, while preserving the existing check for a partially written keyword.
|
Thanks, the original reproductions now pass, and the installation entries and dependency/launch note are present. I found three remaining issues to fix before approval and detailed them inline, along with three lower-priority corrections. Please also add the monitor tests to an automated test command so the standalone import failure is caught. The four GitHub Actions workflows are green; CodeFactor still reports failure, whose cause I have not established. |
Do not select time iterations for a steady history, normalize the legacy VARIABLES header, defer partial ZONE lines, keep the first row when it passes the start filter, follow the counter mode in the x-axis label, and import unittest.mock in the tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… feature_monitor
|
@rois1995 I have updated this PR, for the automated test there is a new workflow. we can also add the new aeroacoustics python test to it in another PR. |

Proposed Changes
Give a brief overview of your contribution here in a few sentences.
SU2_MON, a python based monitor to view residuals, in case you do not want to view the real time residuals in paraview.
[and my most recent pre-commit is also fixing a bunch of empty lines in unrelated python files]
related to #2879
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.