Make participant argument optional, analyze all if omitted#24
Conversation
This comment was marked as spam.
This comment was marked as spam.
|
This pull request has been mentioned on preCICE Forum on Discourse. There might be relevant details there: https://precice.discourse.group/t/gsoc-2026-aditya-gupta/2773/1 |
|
hi @fsimonis, addressed both of your points Extracted the DataFrame computation into a separate computeAnalysis() function so analyzeCommand is purely control flow with no recursion. Also added an early error with a clear message to stderr when --output is provided without a participant. Added two tests covering both behaviors all 26 tests pass. |
|
Hi @fsimonis , addressed all three points:Moved print(f"Output timings are in {unit}.") to analyzeCommand so it prints once per invocation,computeAnalysis now purely computes and returns the DataFrame all printing is handled by the caller ,Moved the assertion directly below all_participants |
|
Tested locally and looks good. |
Fixes #7
Problem
Running
precice-cli profiling analyzewith no participant argument led to anerror instead of showing stats for all participants.
Fix
participantan optional positional argument (nargs="?",default=None)analyzeCommandnow loops over all participantsand displays analysis for each one
Now both of these work correctly:
precice-cli profiling analyze <participant>— analyze a single participantprecice-cli profiling analyze— analyze all participants