PLUME-37: Add tags to plugin run to identify the calling model#16
PLUME-37: Add tags to plugin run to identify the calling model#16cducher wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
|
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! |
| * on how the simulation and plugins are configured. | ||
| */ | ||
| static void run(); | ||
| static void run(int* caller = nullptr); |
There was a problem hiding this comment.
Overload instead of optional
|
Converted to draft PR as it shouldn't be merged for now. It is an option we keep in case the development of |
|
Closing in favour of this PR |
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)