Skip to content

PLUME-37: Add tags to plugin run to identify the calling model#16

Closed
cducher wants to merge 2 commits into
developfrom
feature/enable-tagged-plugin-runs
Closed

PLUME-37: Add tags to plugin run to identify the calling model#16
cducher wants to merge 2 commits into
developfrom
feature/enable-tagged-plugin-runs

Conversation

@cducher

@cducher cducher commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

This PR introduces a change in the run api of Plume so integer tags can be passed as run arguments. This integer can then be used by plugins to determine if they should run or not, or if so which part should run. It is kept as simple as an int for now to keep any actual model knowledge out of Plume, but it may be refined into a more complete tag api if needed in the future.
The plugins can run as before, or use the tag if one is provided, ideally no model knowledge will be hardcoded in plugin, and the mapping int - model will come from the configuration. (This is open for discussion)

@cducher cducher requested review from antons-it and dsarmany July 1, 2025 14:49
@cducher cducher self-assigned this Jul 1, 2025
@codecov-commenter

codecov-commenter commented Jul 1, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.33333% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.03%. Comparing base (1749712) to head (ed7b171).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/plume/PluginCore.cc 0.00% 3 Missing ⚠️
src/plume/PluginHandler.cc 0.00% 3 Missing ⚠️
src/plume/Manager.cc 66.66% 2 Missing ⚠️
examples/example1.c 0.00% 1 Missing ⚠️
src/plume/api/plume_manager.F90 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #16      +/-   ##
===========================================
- Coverage    68.17%   68.03%   -0.15%     
===========================================
  Files           77       77              
  Lines         3086     3100      +14     
  Branches       270      273       +3     
===========================================
+ Hits          2104     2109       +5     
- Misses         982      991       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@antons-it

Copy link
Copy Markdown
Collaborator

Thanks for this development! my only comment was to leave the association tag-to-model outside of plume and this commit indeed addresses this (ref to my initial comment: 91dd019#r161105964). As you said, perhaps we can also consider having a bit more structured "tag", but as discussed this is indeed a very good working solution! happy to approve and thanks again!

antons-it
antons-it previously approved these changes Jul 7, 2025

@antons-it antons-it left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved - thanks!

Comment thread src/plume/Manager.h
* on how the simulation and plugins are configured.
*/
static void run();
static void run(int* caller = nullptr);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overload instead of optional

@cducher cducher marked this pull request as draft July 11, 2025 16:24
@cducher

cducher commented Jul 11, 2025

Copy link
Copy Markdown
Contributor Author

Converted to draft PR as it shouldn't be merged for now. It is an option we keep in case the development of listUpdatedParameters extends beyond the moment we need to have a version of Plume able to pass run metadata to the plugins.

@cducher

cducher commented Aug 4, 2025

Copy link
Copy Markdown
Contributor Author

Closing in favour of this PR

@cducher cducher closed this Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants